Train your own LORA model in 30 minutes LIKE A PRO!

preview_player
Показать описание
In today’s video I want to show you how to train your own Lora. What is Lora first of all, and why do you need to train it.

Link to my copy:

If you ever tried to make images in stable diffusion with the same character, pose or object, you might have noticed that its hard and default model will not give you consistent results.
So, Lora models are here to solve this problem.

LoRA stands for Low-Rank Adaptation. It allows you to use low-rank adaptation technology to quickly fine-tune diffusion models. The LoRA training model makes it easier to train Stable Diffusion on different concepts, such as characters, objects, animals, or a specific style. These trained models then can be exported and used by others in their own generations.

There are plenty of Loras pre-trained for you on websites like civitai but the best fun is to train your Lora yourself. It requires small amount of pictures and pretty low effort comparing to other types of models. So if you have your data ready you can do it for 10 minutes. And that’s what we gonna do now.
Рекомендации по теме
Комментарии
Автор

Your'e a life saver.Can't thank you enough. Since the Google colab file really changed, it was hard to follow any other tutorial. Your saved version of Google colab file really helped! The newer version had some weird problem, it was not detecting any of my images. This tutorial was really easy to follow. But your copy of google colab was the real MVP for me. Thanks and keep making these tutorial.

Justsomeloner-ur
Автор

Probably you don´t know it but is really funny that you choose a parrot to train a Lora wich in Spanish is called Loro, :-) Nice tutorial !!!

vizeverse
Автор

i just want to see one comment that says this worked

CRIMELAB
Автор

"errorCode=24 Authorization failed." - When selecting Stable-Diffusion-v1-5, is there a way to point to a functioning URL?

robwahl
Автор

Nice, although, as it has been pointed out by other users, the colab sheet is deprecated (October, 2024)

homunculus-sq
Автор

I triple checked everything but I get this error. Would you help me out please?

CUDA backend failed to initialize: Found cuDNN version 8700, but JAX was built against version 8904, which is newer. The copy of cuDNN that is installed must be at least as new as the version against which JAX was built. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)
not found.

Amir-rlh
Автор

Great tutorial. Sadly, when I ran the training using your Colab copy, I got this error: RuntimeError:
CUDA Setup failed despite GPU being available.

bahethelmy
Автор

Thank you. I want to do one for myself and one for my dog.

darrenvarley
Автор

You mention the sampler DDIM helps to not lose much quality in training. I was under the impression that samplers were just used for generating sample images, and not affecting the actual training itself. Will you elaborate on this?

saintgio
Автор

After successfully making one lora, if I want to make another lora I have to start from the beginning again or where can I start?

ahmadzaini
Автор

Thank you for the tutorial!
4.2.3 On the custom captioning when I execute, I'm getting this error:
" in <cell line: 20>:23
NameError: name 'train_data_dir' is not defined"

I know it's referring to the path but not sure what I have to change. right now I have /My Drive/ LoRA/train_data/my_photos
Thanks in advance any help is appreciated.

shig
Автор

Took all of the steps you did... still wasn't able to get an output folder or a config folder. Any thoughts on how to fix this?

sambrainard
Автор

I managed to run through this successfully a couple of times, but all of a sudden I am now getting the following error every time I start to train: "CUDA backend failed to initialize: Found cuDNN version 8700, but JAX was built against version 8904, which is newer. The copy of cuDNN that is installed must be at least as new as the version against which JAX was built. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)"

I've tried multiple gmail accounts as well to no avail. Is the google colab broken?

StudentDrivers-dt
Автор

is there an option to train a lora localy? on my own pc? thx in advance!

erdbeerbus
Автор

Hi I used some months ago your notebook with success, but I try it today and I get a lot of errors:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tf-keras 2.15.1 requires tensorflow<2.16, >=2.15, but you have tensorflow 2.16.2 which is incompatible.
torchaudio 2.3.0+cu121 requires torch==2.3.0, but you have torch 2.1.0 which is incompatible.
torchtext 0.18.0 requires torch>=2.3.0, but you have torch 2.1.0 which is incompatible.
Has u an id how resolve this error?

ArcadeForeverMF
Автор

There is an error: ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pandas-gbq 0.19.2 requires google-auth-oauthlib>=0.7.0, but you have google-auth-oauthlib 0.4.6 which is incompatible.
How Can I Solve it? Thanks <3

julietawibel
Автор

would it be a bad idea to have like 70 pictures?

kimjongoof
Автор

I've noticed the Google collab notebook no longer works. It seems to no longer have CUDA resources? Anyone else run into this?

infra
Автор

what about using SDXL model instead of SD1.5 or SD2, does this colab can use it ?

fadysaber-bp
Автор

At around 15:23 you say “…then we go into our web UI, you remember in the last video I showed you how to upload LoRAs here.” Where is our web UI (do you mean Google Drive?) and where is this previous video please? You mention the video again at 16:33 without telling us where it is.

DavidCoffey-iq