Z-Image i2L v2 — Extract LoRA
Your reference images become a LoRA in one pass — no training involved
- template
- images
- lora
This is the node that makes the whole pack make sense. Drop in a few reference images, get a LoRA out the other end, and you never touched a trainer, a dataset folder, or a GPU-hour budget. That's the entire image-to-LoRA pitch, compressed into one node.
What it is: the i2L v2 hypernetwork, called through DiffSynth's TemplatePipeline. Where normal LoRA creation is a training run that iterates over a dataset for hours, i2L v2 predicts the LoRA weights in a single forward pass. You're not learning anything - you're running a model that was trained (by DiffSynth-Studio) to extract style from images. The result is a ZIMAGE_LORA you can sample with or save to disk.
Two inputs, both obvious: template (from the Loader) and images (your references). One image works, but 3–8 capture the style noticeably better; the pack's Load Images From Folder node is the clean way to feed several at once. One output: lora.
A detail people miss: there's no seed. Extraction is a deterministic forward pass, so the same images always produce the same LoRA. No seed means no "I liked the first result better" - rerun with identical references and you get the identical LoRA. Change the images and the LoRA changes.
Where it goes: lora plugs into Sample, Sample (Img2Img), Sample (ControlNet), or Save LoRA. If you just want a styled image with the best quality, the Generate node does all of this internally and you never see Extract - but for the "extract once, reuse forever" workflow, this is the node you'll live in.
The honest caveat, worth reading before you get excited: community consensus is that i2L captures style loosely. It's excellent for a quick one-off style match, and the effort-to-result ratio is absurd - seconds instead of hours. It is not a replacement for a properly trained LoRA when you need a consistent character across a project or a style that has to survive hundreds of generations. Think "instant style transfer with a file you can keep," not "a character model."
Troubleshooting is thin because it's a thin node. An empty images batch throws a "received no images" error, so make sure something is actually wired in. A single tiny or heavily-cropped reference tends to produce a weak LoRA - give it a few varied images at a decent size. And if the node errors on import, that's the DiffSynth-from-git install issue below, not this node.
Install
Install the pack via ComfyUI Manager (search ComfyUI_ZImageI2L_v2) or git clone https://github.com/jzhang-POP/ComfyUI_ZImageI2L_v2 into ComfyUI/custom_nodes/, then install the dependency the right way:
git clone https://github.com/modelscope/DiffSynth-Studio.git
cd DiffSynth-Studio && pip install -e . && cd ..
v2 needs DiffSynth's Diffusion Templates API (diffsynth.diffusion.template.TemplatePipeline), which the PyPI build can lag - install from git or extraction fails on import. Then pip install -r ComfyUI/custom_nodes/ComfyUI_ZImageI2L_v2/requirements.txt, restart ComfyUI, and let the Loader do its one-time model download (tens of GB from ModelScope) before you run this node.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| template | ZIMAGE_I2L_TEMPLATE | — | |
| images | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| lora | ZIMAGE_LORA | — |