Z-Image i2L v2 — Make Gray Images
The boring-looking node that makes asymmetric CFG work
- images
- gray_images
The most forgettable node in this pack is also one of the more interesting once you know the story. Make Gray Images takes an IMAGE and returns a neutral-gray copy of it - every pixel set to 128. That's the whole node. One input, one output, no knobs.
Why it exists: the i2L paper's headline trick is asymmetric classifier-free guidance. The positive branch gets a style LoRA extracted from your actual reference images. The negative branch gets a LoRA extracted from neutral-gray versions of those same images. Sampling steers the style branch against a gray baseline, which is what keeps the style strong without the artifacts a single-LoRA-on-both-branches setup produces. It's the difference between "this image looks styled" and "this image looks cooked."
In practice: feed your references into Extract LoRA for the positive lora, feed the gray copies into a second Extract LoRA for negative_lora, and plug both into a Sample node. That's the exact two-branch graph the Generate node builds internally - if you use Generate, you never touch this node and you don't need to.
Mechanically it's a torch.full_like fill, which is why it's near-instant and why you shouldn't think of it as a tunable "preprocessing" step. The gray value 128 is chosen to match what the i2L paper used. Don't fiddle.
Honest take: if you're new to this pack, don't build the two-branch graph by hand. Use Generate. Reach for Gray Images only when you're going the atomic/Sample route and want the paper's quality - it exists so you can see exactly what Generate hides from you, and so the atomic workflow stays fully assembled.
Install
Installs as part of the pack: ComfyUI Manager (search ComfyUI_ZImageI2L_v2) or git clone https://github.com/jzhang-POP/ComfyUI_ZImageI2L_v2 into ComfyUI/custom_nodes/. The dependency that bites is DiffSynth-Studio, which must be installed from git because v2 needs its Diffusion Templates API:
git clone https://github.com/modelscope/DiffSynth-Studio.git
cd DiffSynth-Studio && pip install -e . && cd ..
pip install -r ComfyUI/custom_nodes/ComfyUI_ZImageI2L_v2/requirements.txt
Restart ComfyUI. This node needs no models of its own - the Loader does the big first download.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| gray_images | IMAGE | — |