MOSS-Image-Edit for OpenVINO (Intel Arc GPUs), experimental
OpenMOSS-Team/MOSS-Image-SFT with the community edit LoRA chinoll/Moss-Image-Edit (rank 64, project Chenkin-x/Moss-Image-Edit) merged into the weights and converted to OpenVINO IR. Tested on an Intel Arc Pro B60 24 GB with OpenVINO 2026.4. Staged and tested, never put into production.
Licences: base model Apache-2.0; the edit project's code is GPLv3; the LoRA repo states no weight licence. These merged weights inherit whatever terms apply upstream: check both before using them. Not affiliated with either project.
Needs the text-to-image repo
Only the edit DiT is here. The text encoder, VAE decoder and tokenizer are identical to
aqualaguna/MOSS-Image-SFT-OpenVINO (te/, vae/, tokenizer/).
| folder | content | size |
|---|---|---|
dit_edit_fp16/ |
text_refine, edit_a, edit_b, edit_c (fp16), vae_encoder_f32, host weights |
9.8 GB |
dit_edit_int8/ |
same, NNCF per-channel INT8_ASYM, ffn_down kept fp16 |
6.4 GB |
code/ |
pipeline + server with both text-to-image and edit samplers (edit_ops.py, edit_export.py) |
<1 MB |
The reference image enters as timestep-0 prefix tokens whose K/V are computed once per request.
What works
- Box-JSON layout edits localise: 88β99.5 % of the pixel change lands inside the given box; outside the box ~30 dB PSNR to the input.
- Text is only correct when the exact words are written in the prompt. Asked for e.g. an "infographic" without the text, it draws plausible-looking but garbled lettering.
- One reference image (the LoRA accepts up to 3; more were not measured). Capped at 1024Γ1024.
Speed and memory (Arc Pro B60, 1024Β², 30 steps, guidance 4)
| time | peak GPU memory | |
|---|---|---|
| fp16 | ~105 s | 21.6 GB |
| int8 | ~95 s | 17.6 GB |
Benchmark (2026-11-02, 12 edits fp16 + 6 int8 over 5 scenes: living room, kitchen, park, street, cafe, anime; box-JSON and plain-text prompts; 1024Β², 30 steps, guidance 4, 4096 reference tokens, all outputs finite):
| total per edit | s/step | DiT load | text encoder | ref prefill | VAE | peak GPU (peak_gpu_usm_device_mb) |
|
|---|---|---|---|---|---|---|---|
| fp16 | 103.5β106.6 s | 2.96β3.02 | 6.1β6.9 s | 5.7β6.4 s | 1.4β1.7 s | 0.4β0.9 s | 20.9k (short text prompt) β 21.6k (box JSON) |
| int8 keepdown | 92.7β95.6 s | 2.80β2.84 | 6.4β7.3 s | cached* | 1.4β1.5 s | 0.4 s | 17.6k |
* the int8 runs reused the prompt embeddings from the fp16 runs; add ~6 s for a new prompt.
The edit DiT is unloaded after each call: OV scratch memory grows per distinct token count (reached 27.8 GB without that). The fp16 residual is scaled by 1/8 inside the graph to avoid fp16 overflow.
Use
Same requirements as the text-to-image repo. Put the folders as models/{te,tokenizer,vae,dit_sft_edit,dit_sft_edit_int8_keepdown}
(rename dit_edit_fp16 β dit_sft_edit, dit_edit_int8 β dit_sft_edit_int8_keepdown).
import sys; sys.path.insert(0, "code")
import numpy as np
from moss_pipeline import MossImage
from PIL import Image
pipe = MossImage(models_dir="models", device="GPU", cache_dir="ov_cache", variant="edit-int8")
src = np.asarray(Image.open("in.png").convert("RGB").resize((1024, 1024)))
img, stats = pipe.generate_edit([src], "replace the sky with a sunset", width=1024, height=1024, steps=30, guidance=4.0, seed=1)
Image.fromarray(img).save("out.png")
code/server.py serves it over HTTP ("model": "edit" or "edit-int8" with an image field). Paths like
/opt/mossimage/... are from the original box; adjust them.
Model tree for aqualaguna/MOSS-Image-Edit-OpenVINO
Base model
OpenMOSS-Team/MOSS-Image-Base