🤖 EZ LoRA Trainer Assistant – ComfyUI Workflow
Created by Me – a filmmaker & AI workflow designer. This tool automates the entire process of generating a diverse character dataset and building the training command for Z‑Image (or Qwen) LoRA training using DiffSynth‑Studio. I’m sharing it on Civitai to help creators train high‑quality character LoRAs without manual hassle.
🧩 Overview
This workflow takes a single reference image of a character, automatically generates 10–20 variations (different angles, expressions, and lighting) using a prompt list, saves them with proper metadata, and finally outputs a ready‑to‑run training command for the DiffSynth‑Studio trainer. It handles all path configurations and file organisation – you just provide the image and a few parameters.
1️⃣ Prerequisites & Setup
Before using this workflow, make sure you have:
DiffSynth‑Studio installed in your ComfyUI
custom_nodes/folder:bash
git clone https://github.com/modelscope/DiffSynth-Studio.git cd DiffSynth-Studio pip install -r requirements.txtThe Python executable path from your ComfyUI virtual environment (e.g.,
...\.venv\Scripts\python.exe).The trainer script path inside DiffSynth‑Studio (e.g.,
examples/z_image/model_training/train.py).A base output folder for your dataset and LoRA (e.g.,
B:\ComfyUI\output\).
⚠️ The training uses the Z‑Image base model from HuggingFace – it will be downloaded automatically when you run the generated command.
3️⃣ How It Works (Automated Dataset & Command Builder)
Load your reference image – a clear portrait of the character.
Set the character name and the number of variations (up to 20).
The workflow uses a pre‑defined prompt list (e.g., close‑up, profile, low‑angle, etc.) to generate multiple augmented images via the Qwen‑based sampler.
It saves all generated images with filenames like
_00001_.pngand creates ametadata.csvfile containing image‑prompt pairs.Finally, it assembles the full training command with your chosen parameters (repeat, epochs, LoRA rank, max pixels, etc.) and outputs it as a single string – ready to copy and paste into your terminal.
6️⃣ Advanced Settings (Customise Your Training)
number of pictures– how many variations to generate (max 20).DataSet Repeat– how many times each image is repeated during training (e.g., 40–50 for 15–20 images).Epochs– training epochs (10–15 recommended).LoRA Rank– higher rank (16, 32) gives more identity fidelity but may reduce expression variety; lower (4, 8) is more flexible.Image Quality– sets the--max_pixelsparameter (e.g., 768, 1024) – higher values preserve more detail but need more VRAM.Paths – you can set Python, trainer script, and output directories directly in the UI.
📦 Final Output
After running the workflow, you’ll get:
A folder containing all generated character images (ready for training).
A
metadata.csvfile mapping each image to its prompt.A complete training command (displayed in the
ShowTextnode) that you can copy and execute in your CMD (inside the DiffSynth‑Studio folder) to start training your LoRA.
Why I built this: As a filmmaker, I often need to train character‑specific LoRAs for consistent storytelling. Manually preparing datasets and writing training commands is tedious and error‑prone. This workflow cuts down preparation time from hours to minutes, letting me focus on creativity. I hope it helps you bring your characters to life – happy training! 🎬✨


