Home Creators Posts Import Register Favorites Logout

Downloads

Content

Video - https://youtu.be/qC0oTkg1Egk

Overview

Training a LoRA can feel complicated, but thanks to ComfyUI Realtime LoRA that is no longer the case as you can just set up loads of training runs right in ComfyUI!

If you like, you can even see what it looks like right there and than after training :)

I used these two:

ComfyUI Realtime LoRA - https://github.com/shootthesound/comfyUI-Realtime-Lora

Musubi Tuner - https://github.com/kohya-ss/musubi-tuner

but it also supports AI Toolkit if that is more your cup of tea.

For copy & paste ease, here is the fastest way to get Musubi Tuner installed:

cd ~/github # pick your own location - this is mine!

git clone https://github.com/kohya-ss/musubi-tuner.git

cd musubi-tuner

python3.10 -m venv venv

source venv/bin/activate

pip install torch torchvision # Linux default - see https://pytorch.org/get-started/locally/ for other options such as Mac & Windows

pip install -e .

Full instructions are in the workflow if you're looking to use conda, pyenv or whatever:

The key things to remember are:

Use Python 3.10-3.12 - python 3.13 is not a good idea

Call your venv "venv" - it doesn't currently support other names (may change in the future!)

Workflow Information

The training workflow is an updated version of the Musubi Tuner one, but there are also workflows included with the custom node for Qwen Image Edit, SDXL and more.

The default it set up for 3 images:

As you can see, the fourth is there ready to go, and if you want to use more than four just copy & paste until you have the number required. Set the number in inputcount and then click Update inputs:

You will need to download a version of the "base" model, and set things to your choice, as detailed in the instructions:

You can get pretty decent results with just 200 steps, but it all depends on what you're going for. Start there (because it's quick) and then mess around later to taste.

Captioning can impact the result, so I added some tips on those too!

In my case I had a couple of images with fire in that I didn't want, so I included fire in the captions.

If you're doing multiple runs, I suggest turning the inference group OFF:

This will prevent the "out of memory" (Error 1) issues if you try to train again after generating an image.

The "Apply LoRA" is simply for the "realtime" version.

If you're happy with the result, simply copy the *_comfyui.safetensors files into your models/loras directory as usual and select via the power LoRA loader in the Z-Image-Turbo workflow.

The Z-Image-Turbo workflow now includes groups for:

Image Upscale

SeedVR2

Also a slight re-work of the CLIP loader ;)

ComfyUI SeedVR2 - https://github.com/numz/ComfyUI-SeedVR2_VideoUpscaler

In the Get node for images/latents, remember you can select whatever image/latent you like:

So if you fancy using the default Text to Image first, then HiRes Fix on that, followed by an Image Upscale before finally using SeedVR2, then you can do that :)

Also included is a LoRA file for you to play with as well - have fun!

Files

Comments

Nic Montemayor

I can't seem to get past a "Latent caching failed with code 1" error

PTMarks

I've tried running this a few times. It hangs consistently on at this point: [musubi-tuner] steps: 0%| | 0/200 [00:00