Тёмный

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

Code & bird
Подписаться 4,2 тыс.
Просмотров 32 тыс.
50% 1

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 original notebook: colab.research.google.com/git...
Link to my copy:
colab.research.google.com/dri...
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.

Опубликовано:

 

8 окт 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 62   
@user-se3ey1ey7s
@user-se3ey1ey7s 6 месяцев назад
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.
@codeandbird
@codeandbird 6 месяцев назад
Glad it was helpful! I haven't seen the new colab yet, but hope you'll figure out how to use it too :)
@saintgio3
@saintgio3 3 месяца назад
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?
@ahmadzaini
@ahmadzaini 3 месяца назад
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?
@user-jy4tr4bh1m
@user-jy4tr4bh1m 2 месяца назад
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.) /content/LoRA/config/config_file.toml not found.
@everythingsfine3064
@everythingsfine3064 7 месяцев назад
awesome!
@shig100
@shig100 3 месяца назад
Thank you for the tutorial! 4.2.3 On the custom captioning when I execute, I'm getting this error: " in :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.
@baheth3elmy16
@baheth3elmy16 2 месяца назад
Great tutorial. Sadly, when I ran the training using your Colab copy, I got this error: RuntimeError: CUDA Setup failed despite GPU being available.
@user-kk2ve1un4u
@user-kk2ve1un4u 7 месяцев назад
what about using SDXL model instead of SD1.5 or SD2 , does this colab can use it ?
@codeandbird
@codeandbird 7 месяцев назад
no, this one won't work, but there is a colab for XL from the same author too - colab.research.google.com/github/Linaqruf/kohya-trainer/blob/main/kohya-LoRA-trainer-XL.ipynb you can use it :)
@user-kk2ve1un4u
@user-kk2ve1un4u 7 месяцев назад
Thanks a lot , and keep going with more tutorials @@codeandbird 👍
@sambrainard3487
@sambrainard3487 7 месяцев назад
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?
@codeandbird
@codeandbird 7 месяцев назад
Could be mistake in one of the paths? Try them without drive/MyDrive/ part maybe? Also make sure you allowed colab to write on google drive
@darrenvarley105
@darrenvarley105 Месяц назад
Thank you. I want to do one for myself and one for my dog.
@danielortizespinoza740
@danielortizespinoza740 6 месяцев назад
Hello! I found your video, and I just wanted to say спасибо тебе большое!! (Увидел, что твой Драйв на русском 😅). But I had a question. Does the use of google colab for stable diffusion depend on my GPU? I know that Stable Diffusion doesn't work for AMD processors, which is my case.
@codeandbird
@codeandbird 6 месяцев назад
Ah thank you glad it was helpful ☺️ It doesn’t matter what gpu you’ve got, it all runs in colab environment, so you should be fine 👌
@erdbeerbus
@erdbeerbus 6 месяцев назад
is there an option to train a lora localy? on my own pc? thx in advance!
@codeandbird
@codeandbird 6 месяцев назад
Yes you can do it locally too, if your hardware is powerful:)
@georgea.3562
@georgea.3562 7 месяцев назад
Cool stuff! btw have you kept contact with your bird? So cute!
@codeandbird
@codeandbird 7 месяцев назад
Her new family sends me pictures and vids :)
@CRIMELAB357
@CRIMELAB357 6 месяцев назад
i just want to see one comment that says this worked
@talhak3667
@talhak3667 7 месяцев назад
how can we upload the model on the replicate after training?
@codeandbird
@codeandbird 7 месяцев назад
Personally I've never done that, but there's a guide on the website replicate.com/docs/guides/push-a-model Try it out, for now, maybe I'll do a video about it later.
@mrdrsir2324
@mrdrsir2324 4 месяца назад
Is this notebook still working? i heard that some simmilar note from civitai lora tutorial was banned by google.
@codeandbird
@codeandbird 4 месяца назад
it works for me with colab pro - not sure about the free tier though
@julietawibel4793
@julietawibel4793 5 месяцев назад
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
@codeandbird
@codeandbird 5 месяцев назад
Hmm, not sure, does the notebook still run with this errors? I think you probably could ignore it if it works
@user-ev5yn6kn1q
@user-ev5yn6kn1q 5 месяцев назад
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?
@codeandbird
@codeandbird 5 месяцев назад
which colab do you run? the one I saved to gdrive or the original one? whichever it is, try to run another one:) if it won't help, i recommend you to google the error and see what people say, usually adding a cell to the colab and force install the right version of the lib it complains about will fix it
@My_Chaotic_Record_Collection
@My_Chaotic_Record_Collection 5 месяцев назад
@@codeandbird it is confirmed that your version still works? Thank you for your work
@aseideman
@aseideman 4 месяца назад
same error, did you find a fix?
@codeandbird
@codeandbird 4 месяца назад
Check if you run runtime with GPU
@user-li1qo2ic1w
@user-li1qo2ic1w 3 месяца назад
Just got the same error. Did you find a way to fix this?
@discodisco3063
@discodisco3063 7 месяцев назад
can You explain how to use XL ?
@inkyinc2541
@inkyinc2541 7 месяцев назад
👍
@RianTuanakotta
@RianTuanakotta 7 месяцев назад
can you train models in google colab without premium subscription?
@codeandbird
@codeandbird 7 месяцев назад
Haven’t tried, but I guess even if you can - it’s gonna be slow
@sylvia4764
@sylvia4764 6 месяцев назад
yes
@SamuelBoreas
@SamuelBoreas 2 месяца назад
I have no Lora folders in my drive...and they won't create.
@kimjongoof5000
@kimjongoof5000 4 месяца назад
would it be a bad idea to have like 70 pictures?
@codeandbird
@codeandbird 4 месяца назад
you can have as many pictures as you want, just make sure that all the pics are different - it doesn't make sense to use many similar pics, it will slow down training and won't make results better
@kimjongoof5000
@kimjongoof5000 4 месяца назад
@@codeandbird Well... I want the AI to make pictures of this "Geumsaegi" character from a badly drawn TV show called "Squirrel And Hedgehog" (look it up). Pictures of the character in full body are few and far between and most of them, despite being drawn by human artists back in the 90s and 2000s, look like badly done AI pictures (I am not kidding)
@user-li1qo2ic1w
@user-li1qo2ic1w 3 месяца назад
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.
@codeandbird
@codeandbird 3 месяца назад
I was talking about this one: Forbidden Desires: Generate Adult Content with AI ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-YWsE1qYkVzU.html
@ROBOTRIX_eu
@ROBOTRIX_eu 3 месяца назад
@blendfile3_3
@blendfile3_3 5 месяцев назад
сначала не понял почему гугл на русском xd
@codeandbird
@codeandbird 5 месяцев назад
😅
@AlizerLeHaxor
@AlizerLeHaxor 5 месяцев назад
the notebook got banned :(
@codeandbird
@codeandbird 4 месяца назад
it works for me with colab pro - not sure about the free one though
@allcash3314
@allcash3314 4 месяца назад
Очень сложно. Можно было бы и по русски(((
@infra1
@infra1 5 месяцев назад
I've noticed the Google collab notebook no longer works. It seems to no longer have CUDA resources? Anyone else run into this?
@codeandbird
@codeandbird 4 месяца назад
Can be just the wrong cuda version, or you need to switch your runtime to gpu
Далее
LORA training EXPLAINED for beginners
27:33
Просмотров 88 тыс.
Train XL LoRA on Mac & IOS with DRAW THINGS
10:51
Просмотров 7 тыс.
Idea for an image in a presentation
0:46
Просмотров 699 тыс.