Image-to-Image
Diffusers
Safetensors
ZenImageEditPipeline
text-to-image
image-editing
qwen-image
text-encoder
adapter
Instructions to use AiArtLab/zen-image-edit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use AiArtLab/zen-image-edit with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("AiArtLab/zen-image-edit", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Commit History
29 days ago
-
README: note the VAE runs in fp16
Verified signature3d57175 -
README: link the GGUF Q5_K transformer for low-VRAM
Verified signatureb1618f6 -
README: correct the documented cfg default
Verified signatureac09d03 -
README: trim the VAE section, drop the scheduler detail
Verified signature2da6558 -
README: state plainly that the bundled VAE is no longer Qwen-Image-2.1's
Verified signature40e93dd -
finetuned VAE decoder: phase-pattern lattice penalty, 5300 steps
Verified signaturea3f1736
-
Adapter v12 in the DiT: 2304-slot position table, trained at the real edit geometry
The bundled text_fusion is now revision v12 (vision cosine against the native Qwen3-VL-8B encoder 0.930 -> 0.971, text unchanged at 0.951/24.2%). Two things moved: the attention-branch position table covers 2304 slots, and the fine-tune ran at the real inference geometry (--geom 1024), so the ~2000 token condition of a two-image edit no longer falls into a zero-padded tail. transformer/config.json text_fusion_config.max_len goes 512 -> 2304 to match the table; the model card, the conditioning row and the card media are re-rendered with the shipped weights.0e81ff1
-
Fix the editing convention: the FIRST image is the target, not the last
The tag/build order in the usage example was inverted, which made swaps silently fail: the model edits <image1>, so passing the reference first asks it to edit the reference. Verified on one pair both ways (identity transfers only with the target first); the two edit examples in media/ are regenerated with the correct order.88a93c1 -
model_index: plain _class_name string, select the shipped pipeline with custom_pipeline
Hub tooling requires _class_name to be a string, while the [file, class] form diffusers accepts for custom pipelines makes it print a configuration warning. A string plus custom_pipeline="pipeline" resolves the same class (verified against the Hub) without the warning.d264d52 -
Model card: link the ComfyUI nodes and workflow
bf162a3 -
Default scheduler: plain static shift 5.0 instead of dynamic shifting (sdxs-micro schedule)
Verified bit-identical to the approved A/B frame; --scheduler-test now compares the shipped static shift against Qwen-Image-2.1's original dynamic schedule. Also fixed a silent config trap: a loaded scheduler config carries _use_default_values, which makes from_config drop every key set afterwards.6e9de70 -
CLI: --scheduler-test renders the default dynamic shift and a static shift side by side
6adfac7 -
CLI: --width/--height, --negative and --cfg
ae62186 -
CLI: --prompts-file for batches, the pipeline is loaded once per file
395408e -
State the text-encoder provenance: upstream Qwen3.5-0.8B re-saved to fp16, tokenizer untouched
8c54d99 -
Support DiffusionPipeline.from_pretrained(repo, trust_remote_code=True)
model_index.json uses the [file, class] form, pipeline.py imports transformer.py relatively so the dynamic-module loader fetches it too, and the transformer class is published on the diffusers module (the stock component loader has no auto_map/trust_remote_code path). Tokenizer resolved from the processor before register_modules, VAE pinned to fp32 on every entry point.8165e1e -
Set the model card thumbnail (social preview) to media/hero.jpg
1409b69 -
Zen Image Edit: Qwen-Image-2.1 on Qwen3.5-0.8B with a text-fusion adapter inside the DiT
Text encoder replaced (Qwen3-VL-8B -> Qwen3.5-0.8B + 158M adapter), adapter embedded in the transformer as text_fusion before txt_in. Weights fp16 (VAE fp32, 13 files via LFS), 8 example images generated by this pipeline, NOTICE/LICENSE included per the Qwen Research License.3a93d0e