Nodes/ComfyUI_ZImageI2L_v2/Z-Image i2L v2 — Generate
ComfyUI Node

Z-Image i2L v2 — Generate

Style extraction and asymmetric CFG in a single pass

By jzhang-POP·Created 3 months ago·Updated 3 months ago· 6
Z-Image i2L v2 — Generate
  • pipe
  • template
  • images
  • image
promptA cat is sitting on a stone
seed0
cfg_scale4.0
num_inference_steps50
sigma_shift8.0

If you wire up only one node from this pack, make it this one. Generate is the whole image-to-LoRA experience in a single node: reference images in, styled image out, with the i2L paper's asymmetric CFG handled internally so you get the best quality the model can produce without thinking about branches.

What it does under the hood: it runs the same extraction as Extract LoRA on your reference images (the positive branch), then builds neutral-gray copies of them and extracts a second LoRA from those for the negative branch. Sampling applies the style LoRA on the positive pass and the gray LoRA on the negative pass. That asymmetry is the paper's core trick - it's what prevents the washed-out or over-stylized results you'd get from applying a single style LoRA to both CFG branches.

The inputs that matter:

  • pipe and template - both from the Loader.
  • images - your references, one or several. More images = a fuller style capture.
  • prompt - what you're generating. The default is "A cat is sitting on a stone," a fine sanity-check prompt.
  • seed - normal random-seed control, with control-after-generate.
  • cfg_scale (4) - note this is Z-Image base territory, not Turbo's guidance-distilled CFG 1. Here negative prompts and a CFG of 4 do real work.
  • num_inference_steps (50) - base model range; 25–50 is the useful band.
  • sigma_shift (8) - matches the v1 i2L example; set it to 0 to omit the kwarg entirely.

The output is a single image, ready for a preview or save node.

Why this path exists: the README is explicit that Loader → Generate is the best-quality route because it keeps asymmetric CFG. The alternative - Extract → Save → load with a stock LoRA loader - applies the LoRA to both branches and loses the asymmetric trick. So if you care more about the result than about ending up with a portable LoRA file, this is the node. It's also the honest baseline: whatever else you build, this is the quality bar the atomic nodes have to beat.

Troubleshooting is mostly pack-wide rather than node-specific: the first run downloads the models (tens of GB, one-time), 24 GB cards need the Loader's low_vram on, and the DiffSynth-from-git import error is the classic install failure. The one Generate-specific gotcha: it doesn't do ControlNet. If you want structure from a control map, that's the separate Sample (ControlNet) node, which additionally forces the Loader onto z-image-turbo.

Install

Install via ComfyUI Manager (search ComfyUI_ZImageI2L_v2) or clone into ComfyUI/custom_nodes/:

cd ComfyUI/custom_nodes
git clone https://github.com/jzhang-POP/ComfyUI_ZImageI2L_v2

Then install DiffSynth-Studio from git - v2 needs the Diffusion Templates API the PyPI build can lag:

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, let the Loader finish its one-time ModelScope download, and Generate is ready.

CategoryZImage-i2L

Inputs (8)

NameTypeDefaultDescription
pipeZIMAGE_PIPE
templateZIMAGE_I2L_TEMPLATE
imagesIMAGE
promptSTRINGA cat is sitting on a stone
seedINT00–18446744073709550000
cfg_scaleFLOAT4.00–30
num_inference_stepsINT501–200
sigma_shiftFLOAT8.00–20

Outputs (1)

NameTypeDescription
imageIMAGE