MOSS-Image-Edit-HQ
π v5 is out β
armV5is live. Everything v4 was, plus full scene captions (Fibo/Klein-style rich captions folded from ConceptEdit metadata) and a 256-token reference budget (vs MOSS's 144) for better identity and fine detail β with the masked loss, preservation contracts, and text-edit data on top. Download:weights/armV5/armV5.safetensors(ai-toolkit format, loads natively in ComfyUI) Β·armV5-moss-edit-lora.safetensors(ComfyUI plugin format) Β· Try the demo Space (Quality + 8-step Fast modes) Β· Grids below, judge them yourself.
An open effort to build an instruction-based image-editing LoRA for OpenMOSS-Team/MOSS-Image-SFT that beats chinoll/Moss-Image-Edit on quality β every experiment, checkpoint, and side-by-side published, including the ones that lost.
An unofficial community fine-tune of MOSS-Image-SFT. Not an official OpenMOSS-Team model, and not affiliated with or endorsed by OpenMOSS.
Showcase
Watch v5 edit β before β after, with the instruction on each:
Every edit here is a real instruction on a real photo, run through the demo's exact settings (50 steps, CFG 3). The full side-by-side eval grids that used to live on this card: akhaliq/wiki-eval-images.
Use in ComfyUI
Option A β native ComfyUI (recommended, no conversion)
ComfyUI merged native MOSS-Image Edit support (PR #17296, Oct 22) β it loads ai-toolkit-format edit LoRAs directly, which is exactly our checkpoint format:
- Update ComfyUI past v0.42.1 (master/nightly β the PR merged after the tag).
- Drop
weights/armV5/armV5.safetensorsintoComfyUI/models/loras/(no conversion, no rename needed). - Standard LoRA loader after Load Diffusion Model (MOSS-Image single-file weights from Comfy-Org/MOSS-Image).
- Encode with the experimental Text Encode MOSS-Image Edit node:
connect VAE + reference images, set
edit_format = ai-toolkit(that's our training layout βindex_timestep_zero_isolatedwith KV cache; chinoll's LoRA uses theMoss-Image-Editoption instead). - References are downscaled to β€384Γ384 automatically; 50 steps, CFG 3, Euler, SLG layer 22.
"Where is the workflow?" (native path): after updating, open
Workflow β Browse Templates β MOSS-Image Edit (the built-in template
ships with the merged support), then drop the LoRA into its LoRA-loader
node and set edit_format = ai-toolkit. No template in your build? The
graph is minimal: Load Diffusion Model β LoRA loader β VAE loader β
Text Encode MOSS-Image Edit (positive + negative, references connected)
β KSampler β VAE Decode β Save.
Option B β Chenkin-x plugin (moss-edit-lora format)
Use the armV5-moss-edit-lora.safetensors file (root of this repo) β
it's in the moss-edit-lora format that the
ComfyUI-Moss-Image-Edit
nodes load, same as chinoll's adapter.
- Install the plugin (ComfyUI Manager β search "Moss-Image-Edit", or
git clone https://github.com/Chenkin-x/ComfyUI-Moss-Image-EditintoComfyUI/custom_nodes/). Requires ComfyUI 0.42.3 or newer. - Base model: OpenMOSS-Team/MOSS-Image-SFT (+ the Qwen3.5 text encoder and Flux2 VAE the plugin's README lists).
- Drop
armV5-moss-edit-lora.safetensorsintoComfyUI/models/model_patches/(NOTmodels/loras/). - Download a ready workflow (LoRA filename and settings filled in):
- workflows/armV5_workflow_single.json β single reference (most edits)
- workflows/armV5_workflow_multi.json β up to 4 reference images
Recommended settings (what our evals and demo use): flow-matching Euler sampler, shift 5.0, 50 steps, CFG 3.0, reference at source resolution, output up to 1024px. For edits that land too weak, raise CFG to 3.5β4.
FAQ
- Can I run this on 6 GB VRAM? No. The pipeline needs ~20 GB+ (bf16). Community int8/convrot MOSS builds get lower, but not to 6 GB.
- Does it work on MOSS-Image-Base or Kromoss? It's trained on SFT; the native ComfyUI path (Option A) is the reliable one. Base/Kromoss compatibility is unverified β if the ModelPatchLoader crashes on Base, that's why.
- Can it relight a scene without changing the people? Yes β dramatic relighting is one of its strengths (see the lighting row in the grids). For an overexposed photo, try "fix the overexposed lighting, natural balanced exposure, keep everything else the same" at CFG 3.5.
- Combining photos (multi-reference compositing) β limited. v4 is trained on single-reference edit pairs; the architecture accepts up to 4 references, but putting a person/object from one photo into another is a compositing task it wasn't trained for (a v5 direction).
- Colors come out more saturated than the source β a known v3 trait (thanks @maryann088 for the report). v4 (in training) directly targets it: masked loss keeps unedited regions pixel-identical to the source, including their color.
Troubleshooting
- "Load Model Patch failed" β the LoRA is in the wrong folder. It goes in
ComfyUI/models/model_patches/, notmodels/loras/. - Nodes won't load / "requires 0.42.3" β upgrade ComfyUI to 0.42.3+.
- Edits too weak β raise steps to 50 and CFG to 3.5β4; make sure the ModelPatch strength is 1.0.
Status
Latest: armV5 is the recommended checkpoint. Try it in the demo Space.
| Version | Recipe | Result |
|---|---|---|
| v1 | warm-start + from-scratch, molbal multi-reference data, 1024px | β Lost the eval gate β chinoll preserves identity better. Kept for reproducibility. |
| v2 (armV2-lo) | warm-start, OmniEdit surgical data, lr 1e-5, 300 steps | Superseded by v3. |
| v3 (armV3) | continue from armV2-lo, ConceptEdit-12M surgical data (quality + purity filtered, 6,000 rows), lr 1e-5, 700 steps | Superseded by v4. |
| v4 (armV4) | continue from armV3, removal+facial+env/style data (4,644 rows) with edit-region masks, masked loss + inverted_mask_prior, preservation-contract captions, lr 1e-5, 1,000 steps |
Superseded by v5. |
| v5 (armV5) | continue from armV4, 5,644 rows (removal/facial/env-style/text) with full scene captions, pixel-diff masks, masked loss, 256-token ref budget, lr 1e-5, 1,200 steps | β Published β latest checkpoint; see the v5 grid. |
Older eval grids (v1, v2): akhaliq/moss-edit-hq-eval.
Artifacts
weights/armV5/β v5 LoRA checkpoints (495 MB each, peft format): final + step-250/500/750/1000, samples, config.armV5-moss-edit-lora.safetensorsβ v5 in ComfyUImoss-edit-loraformat.weights/armV4/,armV4-moss-edit-lora.safetensorsβ the v4 checkpoint (masked-loss arm), kept for comparison.weights/armV3/,armV3-moss-edit-lora.safetensorsβ the v3 checkpoint (ConceptEdit surgical arm), kept for comparison.workflows/β ready ComfyUI workflows with the LoRA filename and settings filled in.eval/real_grid_v3.jpgβ the portrait head-to-head grid.training/β everything needed to reproduce: ai-toolkit arm configs, adapters/converters, training/eval orchestrators, dataset builders. Training runs on ostris/ai-toolkit @14f8f95(moss_imagearch, edit mode + KV cache, single GPU per arm).- Training data: akhaliq/moss-image-edit-conceptedit-packed (6,000 ConceptEdit-12M surgical rows, quality + purity filtered, TAR shards).
- Live training metrics: trackio dashboard.
Notes for reproducing
- chinoll's adapter uses split q/k/v LoRA keys; ai-toolkit's MOSS transformer
fuses qkv.
training/convert_chinoll_adapter.pyconverts with an exact rank-192 block-diag fusion (verified 336/336 tensor match) β warm-starting at rank 64 would silently truncate. The reverse (training/convert_to_moss_format.py) converts our checkpoints back to ComfyUImoss-edit-loraformat. - v3 warm-starts from armV2-lo (
INIT_LORA) rather than chinoll β building on v2's verified atmosphere/style gains while retraining on ConceptEdit data. - The v3 dataset filters surgical rows for local-edit purity (reject rows where sourceβtarget differ on >65% of pixels) β OmniEdit-style global tonal shifts in training targets are what teach edit models to darken/re-tone whole images. env/style categories are exempt (global change is their point).
- Gradient checkpointing is required at 1024px.
- Keep the text encoder frozen (OpenMOSS guidance).
Credits
- OpenMOSS-Team/MOSS-Image-SFT (Apache-2.0) β base model; technical report.
- chinoll/Moss-Image-Edit β the LoRA to beat and our original warm-start init.
- ostris/ai-toolkit β training framework.
- inclusionAI/ConceptEdit-12M (Apache-2.0) β v3 training data (paper).
- TIGER-Lab/OmniEdit-Filtered-1.2M (MIT) β v1/v2 training/eval data.
- gaunernst/pexels-portrait β portrait eval images (Pexels license).
Model tree for akhaliq/MOSS-Image-Edit-HQ
Base model
OpenMOSS-Team/MOSS-Image-Base