Skip to content

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.

Emanuele Serra · 3 min read · Leggi in italiano
Training a LoRA in ComfyUI: Consistent Characters, Products and Styles (Even From Your 3D Renders)

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:

  1. Load the base model (the same one you’ll use the LoRA with).
  2. Load images and captions from a folder and turn them into latents (VAE Encode) and conditioning (text encode).
  3. Connect model, latents and positive to Train LoRA.
  4. 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

  1. Save several checkpoints during training (say every 250 steps) and compare them with the same seed.
  2. Test poses, environments and styles that aren’t in the dataset.
  3. Try strength 0.6 / 0.8 / 1.0.
  4. 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.

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.

Sources

Emanuele Serra

London-based Motion Design Director specializing in 3D animation and digital compositing, founder of 3DArt and producer of award-winning films.

Emanuele Serra →

Join the 3DArt community on Discord

Feedback on your work, live sessions, jobs and resources shared every day by 3D, VFX and motion artists.

Newsletter

The best of 3D, every week

Free resources with verified licenses, open contests, new tutorials and jobs. One email a week, no spam.