Training a LoRA in ComfyUI: Consistent Characters, Products and Styles (Even From Your 3D Renders)
Lesson 9 of the ComfyUI path: when training a LoRA is worth it, how to build the dataset (even from 3D renders), how to caption, how to use the native Train LoRA node and how to tell whether the LoRA turned out well.
In this article
- First question: do you really need one?
- 1. The dataset: where you win or lose
- The 3D artist’s trick
- 2. Captions and the trigger word
- 3. Native training in ComfyUI
- Parameters to know
- 4. Alternatives if the native node isn’t enough
- 5. Telling whether it worked
- Download the prompts
- Recommended videos
- Common problems
- Sources
With Midjourney, consistency meant chasing it with character sheets and the Edit Model. In ComfyUI you can go a step further: teach the model your character, product or style with a LoRA you train yourself. And 3D artists have an unfair advantage: we can render the perfect dataset.
First question: do you really need one?
- Yes if you need dozens of images of the same character, product or style, across several projects.
- No if you need five images: Qwen-Image-Edit with a reference image (lesson 6) is faster.
1. The dataset: where you win or lose
- 15–40 images is a good starting point for a character or product.
- Variety in everything you don’t want to teach: angles, light, backgrounds, poses, framing.
- Consistency in what you do want to teach: same face, same costume, same colours.
- Quality: no blurry, compressed or watermarked images. The LoRA learns the flaws too.
- Rights: use only images you own or have rights to. No real people’s faces without consent.
The 3D artist’s trick
Got the character or product in 3D? Render it: a turntable at 8–12 angles, three or four lighting setups, a few different backgrounds, a couple of poses. You get a clean, consistent dataset that’s entirely yours. Even a fairly rough model with good materials works.
2. Captions and the trigger word
Every image gets a caption. Start with an invented, unique trigger word (mara3d, not woman), then describe what changes in the image: pose, framing, background, light. Whatever you describe, the model treats as variable; whatever you leave out gets tied to the trigger word.
mara3d, a young woman with a short silver undercut and freckles, wearing a green bomber jacket, [pose], [framing], [background], [lighting]
mara3d, a young woman with a short silver undercut and freckles, wearing a green bomber jacket, standing, full body, front view, plain grey background, soft studio light
th3rmos bottle, matte sage green, bamboo lid, [angle], [surface], [lighting]
3. Native training in ComfyUI
ComfyUI has a built-in Train LoRA node in the training category. In practice the graph is:
- Load the base model (the same one you’ll use the LoRA with).
- Load images and captions from a folder and turn them into latents (VAE Encode) and conditioning (text encode).
- Connect model, latents and positive to Train LoRA.
- Save the result with the LoRA-weights save node and, if you like, look at the loss graph.
Search “train” in the node library to see what’s available in your version: the feature is evolving, so note the ComfyUI version you’re working with.
Parameters to know
- steps: the default is tiny (16), meant for a test. A real LoRA needs hundreds or thousands of steps, depending on the dataset.
- learning_rate: default 0.0005. Too high = the LoRA “overcooks” and copies the dataset.
- rank: default 8. Higher = more capacity and a bigger file. For a character, 8–16 is almost always enough.
- batch_size and grad_accumulation_steps: control how many images per step, depending on VRAM.
- gradient_checkpointing (on by default) and offloading: save memory at the cost of speed.
- existing_lora: resumes an existing training run instead of starting from scratch.
4. Alternatives if the native node isn’t enough
- Training custom nodes for specific models (Flux, Qwen, Wan): check update dates and safety before installing (lesson 1).
- External trainers such as AI-Toolkit or Kohya: more options, steeper learning curve.
- Cloud training: useful if your GPU can’t cope; read the terms for the data you upload.
5. Telling whether it worked
- Save several checkpoints during training (say every 250 steps) and compare them with the same seed.
- Test poses, environments and styles that aren’t in the dataset.
- Try strength 0.6 / 0.8 / 1.0.
- Run the same prompt without the trigger word: if your character still shows up, the LoRA is overtrained.
mara3d riding a bicycle through a rainy market street at night, neon reflections, medium shot, cinematic
mara3d as a watercolour illustration, sitting on a harbour wall at sunset
a young woman riding a bicycle through a rainy market street at night, neon reflections, medium shot, cinematic
Download the prompts
Lesson 09 prompt pack (.txt): caption templates and test prompts.
Recommended videos
Train Your Own LoRA in ComfyUI with Its Built-In Trainer – YouTube
Training LoRA inside ComfyUI for character and style – YouTube
Common problems
- The LoRA copies dataset images: too many steps or a learning rate that’s too high. Use an earlier checkpoint.
- The LoRA learns nothing: too few steps, or captions that describe exactly what you wanted it to learn.
- Backgrounds always the same: the dataset always had the same background. Vary it.
Final lesson: ComfyUI in a pipeline, with upscaling, automation and the API.