Files
HM-RunningHub-ComfyUI_RH_ZI…/README.md
T

3.1 KiB

ComfyUI Z-Image I2L (Image to LoRA)

License

ComfyUI custom nodes for Z-Image Image-to-LoRA generation. Generate personalized LoRA weights from reference images using DiffSynth-Studio's Z-Image pipeline.

✨ Features

  • Image to LoRA: Generate LoRA weights directly from reference images
  • No Training Required: Instant LoRA generation without traditional fine-tuning
  • ComfyUI Integration: Seamless workflow integration with standard LoRA nodes

🛠️ Installation

  1. Clone this repository into your ComfyUI custom nodes folder:
cd ComfyUI/custom_nodes
git clone https://github.com/HM-RunningHub/ComfyUI_RH_ZImageI2L.git
  1. Install dependencies:
pip install -r requirements.txt

📦 Model Downloads

Models will be automatically downloaded from ModelScope/HuggingFace on first run:

Model Description
Tongyi-MAI/Z-Image Base transformer
Tongyi-MAI/Z-Image-Turbo Text encoder & VAE
DiffSynth-Studio/General-Image-Encoders Image encoders (SigLIP2, DINOv3)
DiffSynth-Studio/Z-Image-i2L Image to LoRA model

Model Installation Path

Models are cached in the HuggingFace/ModelScope default cache directory:

OS Default Path
Linux ~/.cache/huggingface/hub/
Windows C:\Users\<username>\.cache\huggingface\hub\
macOS ~/.cache/huggingface/hub/

You can customize the cache directory by setting environment variables:

# HuggingFace cache
export HF_HOME=/path/to/your/cache

# or ModelScope cache
export MODELSCOPE_CACHE=/path/to/your/cache

🚀 Usage

Nodes

Node Description
ZImageI2L Loader Load the Z-Image I2L pipeline
ZImageI2L LoRA Generator Generate LoRA from input images
ZImageI2L Saver Save generated LoRA to output folder

Basic Workflow

  1. Add ZImageI2L Loader to load the pipeline
  2. Connect your reference images to ZImageI2L LoRA Generator
  3. Use ZImageI2L Saver to save the generated LoRA
  4. Use the generated LoRA with any standard LoRA loader node

📝 Parameters

ZImageI2L LoRA Generator

Parameter Type Description
pipeline RH_ZImageI2LPipeline Pipeline from Loader node
training_images IMAGE Reference images for LoRA generation
seed INT Random seed for reproducibility

⚠️ Requirements

  • VRAM: 24GB+ recommended (tested on RTX 4090)
  • Python: 3.10+
  • ComfyUI: Latest version

🙏 Acknowledgments

📄 License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.