If you find the video useful and would like to tip, TH-cam does have the Super Thanks option. Those are greatly appreciated so I can have my coffee!! ☕ BUY ME A CUP OF ELECTRICITY: ko-fi.com/kleebztech - My Patreon: www.patreon.com/KleebzTech
Trained a Lora with 16 photos on a 3090 and it took 1 hour and 29 minutes. Honestly not bad at all considering you can do this for free. Thanks a ton for sharing this Kleebz, you're the best!
Thanks for the info! Curious what you used for image dimensions and if you recall how many steps so others may get an idea of timing. I know going with something like 512 is much faster than 1024. Latest update now allows for custom sizes.
Yeah because 3090 has 24gb vram. I'd buy one right now If it didn't suck ass for 4k gaming thanks to nvidia locking frame gen down to 40s. Nice planned obsolescence from them. And they fked me with 12gb vram om a 4070ti. Disgusting, it should be minimum 16gb vram for any card over $800 USD now days. The 50s are going to be super expensive and same shit I bet you. Even though it costs them next to nothing to put 48gb vram on card. They just want to sell their server cards for $10-$30k
Thanks for the tutorial! I can confirm, this DOES in fact work with 8GB VRAM, I tested it with my GTX 1070 laptop, it took around 24 hours to complete but it worked.
I've been hoping for this but didn't expect it given what I've read about training requirements. I tried this yesterday and it seemed to be working but be aware there is a very long pause where the log mentions something about C++. Give it time (maybe a lot). However, the time it takes overall is a MAJOR factor. On my RTX 3060 with 12Gb VRAM, 25 images at 1024 and I think 1500 steps (everything else was default). I wasn't expecting it to be quick, overnight-ish would be fine for me but when the predicted time came back at over 23 hours, I quit. That's too long for me as it's also my work computer. I'll likely give it another go with different settings to try and reduce that time but I'm not sure about accepting less quality.
Йо чувак. Пишу на русском языке (через ютуб можно перевести). У мня тоже 4060ti 16gb, подскажи, получилось что-нибудь? Сколько времени ушло на обучение?
for reasons unknown the trigger word I field in didn't appear in the options after the training, instead what was there is a lot of trigger words that were taken from the caption the software created for each image. also full sentences.... what can be the reason for that? tnxxx
I got it working and added my images and had it add captions. I hit "start training" and after about 10 seconds it says "Training Complete. Check the outputs folder for the LoRA files." Which is obviously way too fast. Any idea why it thinks it's done when it didn't do anything? I kept all the settings at default and I have a beefy NVidia card.
I do know someone who had that happen. He tried again and it worked. You could also look over the terminal output it shows and see if any hints. I have one earlier where it did not like a file which caused issues.
@@KLEEBZTECH I'll try it... Appreciate the feedback. I just reinstalled Flux Gym and it still did the same thing. Someone else online recommended updating the Nvidia drivers. I'll try that too.
@@KLEEBZTECH There was one error in the train log... on line 39 it said " RuntimeError: use_libuv was requested but PyTorch was build without libuv support" Any idea what that could be? Thanks again!
@@KLEEBZTECH same error, and I tried around 30 times, so we might need a better resolution process than "try again", something definitely is going on when encountering this error...
Check to see if any other errors listed potentially before that. For example if a dual gpu system it could be this: github.com/cocktailpeanut/fluxgym/issues/41 which would have another error listed before it exiting.
@@lockos I have the same error, fraustrated enough to uninstall. I use a 8gb vram and I think that is what is causing the issue and Fluxgym simply can't run on 8gb vram... Did you find a solution? any one has ideas on how to train Loras on 8gb vram?
You can significantly speed up your training time by a factor of 4. Use a minimum of Train batch size 2, Gradient accumulate steps of 4. Teach not on a unique token, but on a consistently repeatable one. Scale weight norms - 1 or up to 1.5. And you will have speed.
Thanks, but I don’t see any of the options that you mention. Please provide the equivalent speed optimizations based on Fluxgym options. Many thanks in advance!
Hi Anyone got this error when the training started? it happen during the flux-dev.sft downloading. i tried downloading flux-dev manually and put in the models folder but its still downloading this. any fix to this issue? "RuntimeError: An error occurred while downloading using `hf_transfer`. Consider disabling HF_HUB_ENABLE_HF_TRANSFER for better error handling."
Possibly. I don't use Forge so can only go by what cocktail peanut has mentioned. He posted this about issues with Forge and that is what he is using. Hopefully this helps point you in the right direction. 1. Checkpoint: flux1-dev-bnb-nf4-v2.safetensors 2. Diffusion in Low Bits: bnb-nf4 (fp16 LoRA) -- the default "automatic" often doesn't work and another person mentioned "the Diffusion in Low Bits (was on automatic) was the reason why I thought my lora didn't work!"
In Goat we trust. If I want to train a character, why should I describe the environment in the image caption? Are things like a plant or a window in the background irrelevant? Wouldn't it be better to describe the character in more detail?
That I am not sure about yet with Flux. Will say when it comes to the best way of captioning I am not an expert. I do know the one I did of my goat has worked very well. I am working on a concept one now which has been much more challenging.
1080TI 11GB 1000 pictures, 10 repeats trains per image, 10 Max Train Epochs, 2000 steps. Save every 4 N epochs. 512. Result: Fire Fighters, PC Exploded, House on Fire.
@@mardel5466 اتحلت اه.. في كذا مشكلة في البرنامج نفسه.. سيب الاعدادات زي ماهي كلها وجرب.. منفعش.. سطب عن طريق pinokio عدل اسماء الموديلات وحطها في مكانها ف الفولدر وبينوكيو مش هيحملها من الاول
Cool! Good tutorial and explanation for the install and usage side of this! I didn't see all the variants of Flux shown as options for base model, but I'm assuming that's pretty straight forward? Also, anything like this for Pony? Thanks!!
Not something simple for pony that I know of. There have been some updates since I made the video including the option for different models. But it's still pretty much all the same overall.
not working for me : UserWarning: cuDNN SDPA backward got grad_output.strides() != output.strides(), attempting to materialize a grad_output with matching strides...
If I get any info I will let you know. I do get that warning just before it starts the first epoch but it still does the training and I can see the GPU active.
Hi Kleebz tech AI, Thanks for the intuitive video, I have a problem, when I try to start the generation, the flux model starts to download as expected, but at the end it just gets stuck downloading, waited a couple of hours but still nothing. I already tried putting in the flux model directly in the folder but it seems to just ignore that and start downloading again. Would you happen to know any fixes for this? Thanks!
Could you show us how to use the Lora in Flux forge? It´s available in Pinokio, I use it for Flux. It´s just called "Forge". Thanks! Or do I simply choose it as the model/checkpoint? I doubt it. I know how to find the lora folder , I just don´t know how to use a lora in forge yet, I´ll probably find out how...I think forge uses WebUI... Edit: I think I´ve got it now.
When I start Training...it's showing "RuntimeError: use_libuv was requested but PyTorch was build without libuv support" than stop working... how can I fix it?
Hi! I was using Fluxgym for a while, it's great. But recently it stops to work. At the 66th steps it says training complete, but there is no Lora on the output file. I've retried many times but this problem persists. Is there any solution?
Is there a way to use ADAMW over ADAMW8bit ? How the rank is affecting the output apart from the lora size, 4 by default seems really low? Also I didn't managed to load .txt captions idk why
As I have learned, that is going to be determined by the LoRA rank (--network_dim) setting in the advanced settings. The default in fluxgym is 4. You can increase that to 8,16, etc which will increase the file size. But for most things you probably don't need to. The more complex of a LoRA for example maybe a concept you might want to go larger. I often use 8 myself. But I am still experimenting to learn.
@@KLEEBZTECH thanks! it did work. I observed that since I was training for a face it indeed didn't make too much of a difference - the 17mb ones pretty much did the best it could. if I wanted to train postures, say 2 men fighting, could it work if I uploaded screenshots from fight scenes in different movies?
It might. But honestly it is hard to say with concepts. I am still struggling to understand it all myself. But I do find that variety is a big factor and good quality source material. Using scenes from movies can be difficult but if you pick out the best ones it can work.
I tried training a LoRa for the first time with this, but my PC went to sleep before completing the training. It did manage to produce a LoRa model, but it's just the first 'save point'. Is there a way for me to pick up from where it left of with that LoRa? Or, at the very least, is there a saved file containing the captions for the images that I can reuse? I did them by hand and would rather not go through that again (but I would do it rather than simply using the text generator).
So as of right now I don't know a way of continuing and cocktail peanut is not sure and was asking how to add that. And as for the captions I fully understand since I am dealing with that for my next version of my miniature people LoRA which I have to manually do the captions. The is a folder that is created for the datasets once it starts training. There are txt files with the captions in there. But I have not found an easy way to just drop them in and reuse but I am experimenting right now since if you just drop the txt files with the images on the next run it will seem like it works and add the captions but will get an error when you start it. I am trying to find a workaround. So far I think you can have the dataset folder created in advance and have the image and txt files with captions in the folder when you hit start. It will get an error but seems to work. You would still need to drop both into the image area first so it adds the captions. Hopefully that makes a little sense. I will try to make a more clear explanation once I fully test things or hear back about it.
Okay so I have figured out what will work. You can just add the txt files with the image files in the UI and use that. Just be aware the calculated steps will be wrong and double the actual amounts.
I did give fluxgym a try today. Since I only have a 4060 I started with very low setting. Only 8 pictures on 512 resolution. Training took roundabout one hour, and the results are fine. Problem is, that the Lora has no effect with a normal weight. When I double the weight everything works fine. Simple solution would be to just double the training length, but since the Lora works fine I link to avoid this. Any idea how to solve this, for example double the learning rate?
Usually I find if you need to use more weight then it is probably undertrained and could use more steps. That would be the first thing I would try and really the easiest.
I'm running a training on 16 gb VRAM RTX 5000 and it goes at maximum memory usage and 80C temperature for long time and there is no progress whatsoever, the epoch is stuck at 1/16... Default settings, 20 pics, 512 pixels, Flux Schnell model
Can I point pinokkio to a folder where I've installed models already? I don't feel like downloading those big flux models all over again. Edit: Found it, there's a models.yaml file you can edit and or copy the right names from. (check this before you start installing fluxgym )
Do you mean to create a set of source images for a LoRA? If so I have not experimented with trying to get a consistent character with Flux. If you have some source images then you can just train a LoRA like shown.
One of the updates added the ability to generate samples as it goes. It is under the advanced options. You would have had to set it to have it generate every so many steps.
I tried making a couple Loras the first one 1000 steps, and the second one 2200. The first doesn't show any resemblace at all. The second one just came out blurry. It was really disapponting having wasted over 10+ for nothing. I followed the OP guidance, and the results for me were crap. I tested them using forgeui. I might try test them in comfy, but I don't think that'll make a difference. So far, forgeui works well with all the loras I've made in Replicate Ai, and Civitai.
I have been having good luck overall. I don't use Forge so can only go by what cocktail peanut has mentioned. He posted this about issues with Forge and that is what he is using. Hopefully this helps point you in the right direction. 1. Checkpoint: flux1-dev-bnb-nf4-v2.safetensors 2. Diffusion in Low Bits: bnb-nf4 (fp16 LoRA) -- the default "automatic" often doesn't work and another person mentioned "the Diffusion in Low Bits (was on automatic) was the reason why I thought my lora didn't work!"
@@KLEEBZTECH I don't use the alternate diminished versions of Flux ( I tried a good bunch including 2 versions of nf4 and q4,q5 and q8 guff) all of them have issues with loras. My setting for forgeui which doesn't give problems at all is: flux-dev-fp8, clipL, and t5fp16. I'll try changing that which you mention; see if that works out. Thank you. However, it shouldn't need something special to work since I have also trained loras using kohyass , and those work great! So, it might be something similar to what happens with OT flux trainer; who knows?
Thanks for the epic video! One question though, say I generated 10 epochs and I want to continue training it after finishing, can I continue where I left off and use my file of 10 epochs to add more with the same dataset?
@@KLEEBZTECH Thanks for letting me know! I made my first lora and it went a lot faster than expected on my RTX 3080 10GB VRAM. About an hour for 420 iterations and the lora works great! The only thing I found out is that the trigger word somehow isn't working very well, but as you said in your video adding some of the text, which repeats in the captions, fixed it!
Yeah I am still learning the best way to caption things. It seems to really depend on what you are doing. But how you do it can have a big impact and sometimes may need some manual tuning.
@@KLEEBZTECH I found someone who did a lot of testing and research and he's saying captions actually reduce the likeliness of loras that are created for single things like a character or person. You could however add the trigger word to the caption, this only applies for flux btw. He's also saying for a character or person setting repeat to 1 and epochs higher gives better results. I have yet to test the captioning as I tried out the auto caption, but for the lora I created I used repeat 1 and epochs only 15 with 29 pictures. I thought it would be pretty bad, but since I didn't know how long it was going to take I just wanted to see where it could take me with these settings. It worked out very well, the outputted images are way better quality than the images I used for training. I just got them from google and they're pretty scuffed ngl. Hope this information may help you!
Will keep in mind. The one I did in the video for my goat has been working very well and it nails him almost every time except sometimes it adds horns.
I am not really familiar with that UI but my understanding is it is very simple and may not support LoRAs? I personally am using SwarmUI myself for Flux and using LoRAs.
My swarm video only covers the basics but will be doing another one in the next few days that should give a bit more info on using it now that I have been messing with it.
First try works perfect. Now i want to build another LoRa, but FluxGym says it's done training after 10 seconds. 😞Anybody a Workaround? (adding a num processes line in starting script dont work)
Are you choosing the lower VRAM option? I can say for 100% certain it should run on a 3080 with 10GB since that is what I have been training all mine on at this point.
@@KLEEBZTECH yes, the 12gb vram option. I have 32gb of ram. Later will try again maybe with a bigger pagefile.sys, just to be sure it's not the system ram
I have 32GB of RAM on that system as well. I did not do a full training with my 8GB card since it was going to take way to long but I did run it for a couple hours to verify that it would run.
If there's no file on the output folder then I would look through the log on the user interface and see if there's anything in there that might indicate an issue. Often you can even copy and paste the log into something like chatGPT or something
Did you make sure the correct naming? I have not tested doing that but I know when I reinstalled to do the video without deleting the folders it skipped downloading them.
(according to the video) It hangs on line 298 and there is no movement Vram also flows constant It does not move to the Steps section. I could not solve the problem, you passed to the next step before 1 minute.
According to cocktail peanut the images are resized. So if you were to pick 512 Fluxgym resizes the images to 512px either on the width or height (whichever side is shorter) while preserving the aspect ratio. I used original large images of my goat and it worked great.
I didn't see a bucket option either but in advanced options there are options for 512 and 1024, which I believe are for resizing. I only tried this once and my images were already 1024, so I'm not 100% sure.
This was on my machine with 64GB but I normally am using it on my other system which only has 32GB and works fine. It does use most of the RAM on that one while running.
@@KLEEBZTECH not sure if you got any cuda out of memory issue while in 32GB? I am getting that on my machine, the graphics card has memory when that error appears but noticed the RAM was maxed out which caused the issue.
@@pyrho307 I have not run into that yet and that 32gb system is what I am actually doing all my training on since it is also my recording pc and often not being used. But I also don't have anything else running on it at the same time.
*7 hours* for ~2000 steps on 512px🤐🤐 I think VRam is way more important than Raw Performance of the GPU in Flux Lora training. I Read on the Reddit that RTX 4060ti 16GB takes around 1 Hour for 1000 steps 512px, so would take around 2 Hours for 2000 steps (for ai-toolkit). I have 4060ti I will try this fluxgym ( this seems way easier)
Insane thing is that it doesnt matter of you have your models downloaded, it will download it again. So u and up with 80gb space taken for comfyui models and fluxgym and they are the same models 🤣
D:\pinokio\api\fluxgym.git\env\lib\site-packages\torch\utils\checkpoint.py:1399: FutureWarning: `torch.cpu.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cpu', args...)` instead. [2024-10-30 10:56:13] [INFO] with device_autocast_ctx, torch.cpu.amp.autocast(**cpu_autocast_kwargs), recompute_context: # type: ignore[attr-defined] Excuse, this step is stuck, how to solve?
I ran it for a couple of hours to get through the first epoch when testing without issue. I didn't wait for it to complete since it would have taken a day on that GPU. You likely will need to use a resolution like 512. When do you run into issues?
From what little I've read online. Your probably better off for a human character. To try lower images. Best quality as possible, png lossless. Mask it. Some have gotten amazing results with just 2x images. It's just way too slow for us 😒 12gb "thanks for the fk you nvidia to your customers who bought a 4070ti for $1000" Also sucks the 3090 is really good but sucks ass for 4k and stuff and no frame gen. Another fk you from nvidia to their customers. Please amd or Intel.. make faster drivers. Someone needs to take their throne monopoly.
100% not clickbait. It can work on 8GB but can depend on other factors. You can check with other comments and see people have it working with 8. I do not create clickbait videos. This was the first one on FluxGym.
If you find the video useful and would like to tip, TH-cam does have the Super Thanks option. Those are greatly appreciated so I can have my coffee!! ☕ BUY ME A CUP OF ELECTRICITY: ko-fi.com/kleebztech - My Patreon: www.patreon.com/KleebzTech
Trained a Lora with 16 photos on a 3090 and it took 1 hour and 29 minutes. Honestly not bad at all considering you can do this for free. Thanks a ton for sharing this Kleebz, you're the best!
Thanks for the info! Curious what you used for image dimensions and if you recall how many steps so others may get an idea of timing. I know going with something like 512 is much faster than 1024. Latest update now allows for custom sizes.
Thanks I have 3090
I did 7 images on the same card and it took 2 in a half hours. What are your settings?
Yeah because 3090 has 24gb vram. I'd buy one right now If it didn't suck ass for 4k gaming thanks to nvidia locking frame gen down to 40s. Nice planned obsolescence from them. And they fked me with 12gb vram om a 4070ti. Disgusting, it should be minimum 16gb vram for any card over $800 USD now days. The 50s are going to be super expensive and same shit I bet you. Even though it costs them next to nothing to put 48gb vram on card. They just want to sell their server cards for $10-$30k
Thanks for the tutorial! I can confirm, this DOES in fact work with 8GB VRAM, I tested it with my GTX 1070 laptop, it took around 24 hours to complete but it worked.
Great to hear!
how ? my RTX 4060 8gb is not working.. help ?
@@KLEEBZTECH how ? my RTX 4060 8gb is not working.. help ?
@@ApexArtistX what kind of error are you getting?
@@PsychedelicCyberpunkmy 3060 8gb errors out saying not enough vram. Did you lower any other settings?
I was waiting for something like this, thank you
Perfect! Great tool and as always a tutorial that goes at just the right pace. I have my first Lora in the oven...
GOAT, a Nubian Ibex is one of my favourite kind of goat.
May your Goat live on in Flux :)
Thank you, and he already is.
You have a favorite kind of goat?? 😛(My daughter does too!!).
ty for the tutorial, it's great to have 12GB VRAM able to train.
10GB works very well also. It is what I am using mostly.
Fantastic video and super helpful info! This is a very easy way to train locally! The Tego lora looks amazing!!
Thank you! And thanks again for the support!
I've been hoping for this but didn't expect it given what I've read about training requirements. I tried this yesterday and it seemed to be working but be aware there is a very long pause where the log mentions something about C++. Give it time (maybe a lot).
However, the time it takes overall is a MAJOR factor. On my RTX 3060 with 12Gb VRAM, 25 images at 1024 and I think 1500 steps (everything else was default). I wasn't expecting it to be quick, overnight-ish would be fine for me but when the predicted time came back at over 23 hours, I quit. That's too long for me as it's also my work computer.
I'll likely give it another go with different settings to try and reduce that time but I'm not sure about accepting less quality.
Great Video/Tutorial. All work fine here!
Great to hear!
Fantastic! Will try when I get my rtx 4060 ti 16Gb soon.
Йо чувак. Пишу на русском языке (через ютуб можно перевести). У мня тоже 4060ti 16gb, подскажи, получилось что-нибудь? Сколько времени ушло на обучение?
for reasons unknown the trigger word I field in didn't appear in the options after the training, instead what was there is a lot of trigger words that were taken from the caption the software created for each image. also full sentences.... what can be the reason for that? tnxxx
I got it working and added my images and had it add captions. I hit "start training" and after about 10 seconds it says "Training Complete. Check the outputs folder for the LoRA files." Which is obviously way too fast. Any idea why it thinks it's done when it didn't do anything? I kept all the settings at default and I have a beefy NVidia card.
I do know someone who had that happen. He tried again and it worked. You could also look over the terminal output it shows and see if any hints. I have one earlier where it did not like a file which caused issues.
@@KLEEBZTECH I'll try it... Appreciate the feedback. I just reinstalled Flux Gym and it still did the same thing. Someone else online recommended updating the Nvidia drivers. I'll try that too.
@@KLEEBZTECH Ugh, Nvidia says I have the latest drivers... Can my images be too big? Some are 3000x2000px.... They are all png files. Thanks!
@@KLEEBZTECH There was one error in the train log... on line 39 it said " RuntimeError: use_libuv was requested but PyTorch was build without libuv support" Any idea what that could be? Thanks again!
I have used large images and no issues. It resizes them to what you set it for. As for the error... That could be the issue. Do you have dual GPUs?
This is what I was waiting for!! 🎉🎉🎉
[ERROR] Command exited with code 1 I ran the trainer and got this error. Can you help me?
I would try again. I do know someone who got an error like that and when he tried again it worked so we never looked into it further.
@@KLEEBZTECH same error, and I tried around 30 times, so we might need a better resolution process than "try again", something definitely is going on when encountering this error...
Check to see if any other errors listed potentially before that. For example if a dual gpu system it could be this: github.com/cocktailpeanut/fluxgym/issues/41 which would have another error listed before it exiting.
맞아요 듀얼 gpu가 문제였어요 내장 그래픽을 제거하고 듀얼 모니터도 꺼야해요
@@lockos I have the same error, fraustrated enough to uninstall. I use a 8gb vram and I think that is what is causing the issue and Fluxgym simply can't run on 8gb vram... Did you find a solution? any one has ideas on how to train Loras on 8gb vram?
You can significantly speed up your training time by a factor of 4. Use a minimum of Train batch size 2, Gradient accumulate steps of 4.
Teach not on a unique token, but on a consistently repeatable one. Scale weight norms - 1 or up to 1.5. And you will have speed.
i cannot see "Gradient accumulate steps" on that script. Just Gradient checkpointing mate ..
Thanks, but I don’t see any of the options that you mention. Please provide the equivalent speed optimizations based on Fluxgym options. Many thanks in advance!
@@Ekkivokwere you able to implement any speed optimizations? If you did, please let me the modifications. Thanks
Hi Anyone got this error when the training started? it happen during the flux-dev.sft downloading. i tried downloading flux-dev manually and put in the models folder but its still downloading this. any fix to this issue?
"RuntimeError: An error occurred while downloading using `hf_transfer`. Consider disabling HF_HUB_ENABLE_HF_TRANSFER for better error handling."
i have asus rtx 3050 8 gb + 24 gb ram i tried and worked. Thank you so much really.
[2024-10-20 20:28:53] [INFO] steps: 100%|██████████| 80/80 [19:42
I keep getting "failed to recognize model type!" when i place the safetensor file in forge. Any ideas?
Possibly. I don't use Forge so can only go by what cocktail peanut has mentioned. He posted this about issues with Forge and that is what he is using. Hopefully this helps point you in the right direction.
1. Checkpoint: flux1-dev-bnb-nf4-v2.safetensors
2. Diffusion in Low Bits: bnb-nf4 (fp16 LoRA) -- the default "automatic" often doesn't work
and another person mentioned "the Diffusion in Low Bits (was on automatic) was the reason why I thought my lora didn't work!"
Thanks man. Subbed and liked.
Thanks for the sub!
thank you for the awesome video!
You are welcome!
Hi! First of all, thank you for the tutorial!
I have a double 3080TI setup, is there any way to make LoRA use them both to run the training?
Having an issue with Florence-2 not captioning. Any work around for this?
Have not had any issues. Might try reinstalling. Or updating if you have not tried that.
In Goat we trust. If I want to train a character, why should I describe the environment in the image caption? Are things like a plant or a window in the background irrelevant? Wouldn't it be better to describe the character in more detail?
That I am not sure about yet with Flux. Will say when it comes to the best way of captioning I am not an expert. I do know the one I did of my goat has worked very well. I am working on a concept one now which has been much more challenging.
4060TI 16GB : 25pictures, 8 Repeat trains per image, 10 Max Train Epochs, 2000 steps. Save every 4 N epochs. 512. Result: 2 Hours.
1080TI 11GB 1000 pictures, 10 repeats trains per image, 10 Max Train Epochs, 2000 steps. Save every 4 N epochs. 512. Result: Fire Fighters, PC Exploded, House on Fire.
@@VinciSid 🤣
Training Complete. Check the outputs folder for the LoRA files. after seconds. read your discussion with the guy with dual gpu. any ideas?
Did you check out the link I posted in those comments? If so I assume it did not help?
@@KLEEBZTECH i did, it didn't help unfortunately.. tried to trackback a few times, didn't catch where it went wrong
@@AmrAbdeenازيك يا استاذ عمرو انا متفاجئ اني لقيت حضرتك هنا 😀 بس للاسف نفس المشكلة هتجنني مش لاقيلها حل هل اتحلت معاك؟
@@mardel5466 اتحلت اه.. في كذا مشكلة في البرنامج نفسه.. سيب الاعدادات زي ماهي كلها وجرب.. منفعش.. سطب عن طريق pinokio
عدل اسماء الموديلات وحطها في مكانها ف الفولدر وبينوكيو مش هيحملها من الاول
@@AmrAbdeenشكرا لحضرتك انا اصلا مجربتش غير بينوكيو فا هجرب الطريقة بالmanual installation
Cool! Good tutorial and explanation for the install and usage side of this! I didn't see all the variants of Flux shown as options for base model, but I'm assuming that's pretty straight forward? Also, anything like this for Pony? Thanks!!
Not something simple for pony that I know of. There have been some updates since I made the video including the option for different models. But it's still pretty much all the same overall.
not working for me : UserWarning: cuDNN SDPA backward got grad_output.strides() != output.strides(), attempting to materialize a grad_output with matching strides...
Are you checking your task manager to see if the GPU is doing anything? It will not update the terminal output for some time.
@@KLEEBZTECH many people have this issue. My GPU are clean on task manager
If I get any info I will let you know. I do get that warning just before it starts the first epoch but it still does the training and I can see the GPU active.
I get the same error
@@KLEEBZTECH thanks. It doesnt progress forward for me, it just sits there
Hi Kleebz tech AI, Thanks for the intuitive video, I have a problem, when I try to start the generation, the flux model starts to download as expected, but at the end it just gets stuck downloading, waited a couple of hours but still nothing. I already tried putting in the flux model directly in the folder but it seems to just ignore that and start downloading again. Would you happen to know any fixes for this? Thanks!
Could you show us how to use the Lora in Flux forge? It´s available in Pinokio, I use it for Flux. It´s just called "Forge". Thanks! Or do I simply choose it as the model/checkpoint? I doubt it. I know how to find the lora folder , I just don´t know how to use a lora in forge yet, I´ll probably find out how...I think forge uses WebUI... Edit: I think I´ve got it now.
Просто полученный файл кинуть в папку Lora и потом в промте указать подсказку в виде тега
Hi, what total size of fluxgym folder after all installed and downloaded all model? cz i have limited spaces on my drive. TIA
I don't have a fresh install to give exact but it needs the models so probably more than 25GB.
Omg always wanted that. Thanks man 🖤🖤
Thank you. 😀
You're welcome 😊
When I start Training...it's showing "RuntimeError: use_libuv was requested but PyTorch was build without libuv support" than stop working... how can I fix it?
You probably need to add a line to the script before hitting start github.com/cocktailpeanut/fluxgym/issues/41
Great tut. I have a question, How do we resume an interrupted training from the last state?
I don't know if you can. But there is a pretty extensive advanced section that I have not explored.
I will see if I can get an answer from cocktail peanut.
Just got a response and he is looking into potentially adding that.
@@KLEEBZTECH Thanks brother. Really appreciate your reply. Im looking forward for the update.
Hi! I was using Fluxgym for a while, it's great. But recently it stops to work. At the 66th steps it says training complete, but there is no Lora on the output file. I've retried many times but this problem persists. Is there any solution?
Odd. No error messages?
@@KLEEBZTECH no error message. I've tried to reinstall Flux gym but that didn't solve the issue.
Is there a way to use ADAMW over ADAMW8bit ? How the rank is affecting the output apart from the lora size, 4 by default seems really low? Also I didn't managed to load .txt captions idk why
is there a reason the outputs are all only 17mb? many face loras I got from civitai are 70+mb
As I have learned, that is going to be determined by the LoRA rank (--network_dim) setting in the advanced settings. The default in fluxgym is 4. You can increase that to 8,16, etc which will increase the file size. But for most things you probably don't need to. The more complex of a LoRA for example maybe a concept you might want to go larger. I often use 8 myself. But I am still experimenting to learn.
@@KLEEBZTECH thanks! it did work. I observed that since I was training for a face it indeed didn't make too much of a difference - the 17mb ones pretty much did the best it could.
if I wanted to train postures, say 2 men fighting, could it work if I uploaded screenshots from fight scenes in different movies?
It might. But honestly it is hard to say with concepts. I am still struggling to understand it all myself. But I do find that variety is a big factor and good quality source material. Using scenes from movies can be difficult but if you pick out the best ones it can work.
I tried training a LoRa for the first time with this, but my PC went to sleep before completing the training. It did manage to produce a LoRa model, but it's just the first 'save point'. Is there a way for me to pick up from where it left of with that LoRa? Or, at the very least, is there a saved file containing the captions for the images that I can reuse? I did them by hand and would rather not go through that again (but I would do it rather than simply using the text generator).
So as of right now I don't know a way of continuing and cocktail peanut is not sure and was asking how to add that. And as for the captions I fully understand since I am dealing with that for my next version of my miniature people LoRA which I have to manually do the captions. The is a folder that is created for the datasets once it starts training. There are txt files with the captions in there. But I have not found an easy way to just drop them in and reuse but I am experimenting right now since if you just drop the txt files with the images on the next run it will seem like it works and add the captions but will get an error when you start it. I am trying to find a workaround. So far I think you can have the dataset folder created in advance and have the image and txt files with captions in the folder when you hit start. It will get an error but seems to work. You would still need to drop both into the image area first so it adds the captions. Hopefully that makes a little sense. I will try to make a more clear explanation once I fully test things or hear back about it.
@@KLEEBZTECH Thank you!
Okay so I have figured out what will work. You can just add the txt files with the image files in the UI and use that. Just be aware the calculated steps will be wrong and double the actual amounts.
@@KLEEBZTECH Oh interesting. Thanks again for looking into that!
I did give fluxgym a try today. Since I only have a 4060 I started with very low setting. Only 8 pictures on 512 resolution. Training took roundabout one hour, and the results are fine. Problem is, that the Lora has no effect with a normal weight. When I double the weight everything works fine. Simple solution would be to just double the training length, but since the Lora works fine I link to avoid this. Any idea how to solve this, for example double the learning rate?
Usually I find if you need to use more weight then it is probably undertrained and could use more steps. That would be the first thing I would try and really the easiest.
I'm running a training on 16 gb VRAM RTX 5000 and it goes at maximum memory usage and 80C temperature for long time and there is no progress whatsoever, the epoch is stuck at 1/16... Default settings, 20 pics, 512 pixels, Flux Schnell model
i have a 4060ti 8gb and it has been training for around 8 hours and nothing is changing on the output, should i just leave it or is something wrong?
@@aidendeans5569 yeah that doesn't sound like it is going anywhere. What resolution did you set the images at?
Can I point pinokkio to a folder where I've installed models already? I don't feel like downloading those big flux models all over again.
Edit: Found it, there's a models.yaml file you can edit and or copy the right names from. (check this before you start installing fluxgym )
can i use on stable diffision with lora created with pinokio ?
Hi, I have 4070, 32gb ram.
Any way to get consistent Character Image?
I'm using Flux.1 S with SwarmUI.
Have been following your tutorial.
Do you mean to create a set of source images for a LoRA? If so I have not experimented with trying to get a consistent character with Flux. If you have some source images then you can just train a LoRA like shown.
@@KLEEBZTECH Yes I wanted it for lora training.
Ok will check myself.
Why my gym is showing me some samples in training? I seeing a lot of images in process, it’s normal?
One of the updates added the ability to generate samples as it goes. It is under the advanced options. You would have had to set it to have it generate every so many steps.
That way you can see how the training is going as it progresses. I usually set for every 200 steps myself
Is there any way to use flux on foocus as checkpoint model?
Not with the regular Fooocus. Would need to use something like SimpleSDXL2 fork.
Sorry about your goat. He looked like a real character.
I have been trying to make it work in my laptop with a 16GB 4090 but it just exits while training the first epoch :(
Check the log.
I tried making a couple Loras the first one 1000 steps, and the second one 2200. The first doesn't show any resemblace at all. The second one just came out blurry. It was really disapponting having wasted over 10+ for nothing. I followed the OP guidance, and the results for me were crap. I tested them using forgeui. I might try test them in comfy, but I don't think that'll make a difference. So far, forgeui works well with all the loras I've made in Replicate Ai, and Civitai.
I have been having good luck overall. I don't use Forge so can only go by what cocktail peanut has mentioned. He posted this about issues with Forge and that is what he is using. Hopefully this helps point you in the right direction.
1. Checkpoint: flux1-dev-bnb-nf4-v2.safetensors
2. Diffusion in Low Bits: bnb-nf4 (fp16 LoRA) -- the default "automatic" often doesn't work
and another person mentioned "the Diffusion in Low Bits (was on automatic) was the reason why I thought my lora didn't work!"
@@KLEEBZTECH I don't use the alternate diminished versions of Flux ( I tried a good bunch including 2 versions of nf4 and q4,q5 and q8 guff) all of them have issues with loras. My setting for forgeui which doesn't give problems at all is: flux-dev-fp8, clipL, and t5fp16. I'll try changing that which you mention; see if that works out. Thank you. However, it shouldn't need something special to work since I have also trained loras using kohyass , and those work great! So, it might be something similar to what happens with OT flux trainer; who knows?
I can't really say much when it comes to forge. I am using all of mine in SwarmUI without issue with the flux-dev-fp8. Hopefully you figure it out.
@@KLEEBZTECH Well, it actually worked using flux-dev-fp8 and removing the automatic thing.
Excellent!
Thanks for the epic video! One question though, say I generated 10 epochs and I want to continue training it after finishing, can I continue where I left off and use my file of 10 epochs to add more with the same dataset?
Welcome! Not that I know of. I tend to do more epochs than I expect since I can always use one of the earlier files and I set it to save every 2.
@@KLEEBZTECH Thanks for letting me know! I made my first lora and it went a lot faster than expected on my RTX 3080 10GB VRAM. About an hour for 420 iterations and the lora works great! The only thing I found out is that the trigger word somehow isn't working very well, but as you said in your video adding some of the text, which repeats in the captions, fixed it!
Yeah I am still learning the best way to caption things. It seems to really depend on what you are doing. But how you do it can have a big impact and sometimes may need some manual tuning.
@@KLEEBZTECH I found someone who did a lot of testing and research and he's saying captions actually reduce the likeliness of loras that are created for single things like a character or person. You could however add the trigger word to the caption, this only applies for flux btw. He's also saying for a character or person setting repeat to 1 and epochs higher gives better results. I have yet to test the captioning as I tried out the auto caption, but for the lora I created I used repeat 1 and epochs only 15 with 29 pictures. I thought it would be pretty bad, but since I didn't know how long it was going to take I just wanted to see where it could take me with these settings. It worked out very well, the outputted images are way better quality than the images I used for training. I just got them from google and they're pretty scuffed ngl. Hope this information may help you!
Will keep in mind. The one I did in the video for my goat has been working very well and it nails him almost every time except sometimes it adds horns.
hi i trained my pictures with flux gym in pinokio. but how can i use it in flux web ui in pinokio?
I am not really familiar with that UI but my understanding is it is very simple and may not support LoRAs? I personally am using SwarmUI myself for Flux and using LoRAs.
@@KLEEBZTECH thx i just found your video how to instal swarm ui and just starting to download it.
@@KLEEBZTECH can i use my training outputs from flux gym on pinokio and use it with swarm ui? O did i just train my model in swarm from scratch?
You can use that model with SwarmUI. Any issues just ask. Just need to put the LoRA in the lora folder in the models folder.
My swarm video only covers the basics but will be doing another one in the next few days that should give a bit more info on using it now that I have been messing with it.
Great work
Thank you! Cheers!
First try works perfect. Now i want to build another LoRa, but FluxGym says it's done training after 10 seconds. 😞Anybody a Workaround? (adding a num processes line in starting script dont work)
Any errors? Have you updated if not recently?
doesnt work with 8 vram also how to change the --highVram option
TH-cam asked me, 'What did you think of this video?' I rated it five stars.
⭐⭐⭐⭐⭐
Just tried with 3080 10gb but i got an error after around 1 minute, out of vram. How could you run it on 8gb ?
Are you choosing the lower VRAM option? I can say for 100% certain it should run on a 3080 with 10GB since that is what I have been training all mine on at this point.
@@KLEEBZTECH yes, the 12gb vram option. I have 32gb of ram. Later will try again maybe with a bigger pagefile.sys, just to be sure it's not the system ram
I have 32GB of RAM on that system as well. I did not do a full training with my 8GB card since it was going to take way to long but I did run it for a couple hours to verify that it would run.
its not generating me a safetensors file
Sweet spot step is 1800 step
It went through the whole training, said it completed the training, created a sample folder of images, but no safetensor file. Anyone else get this?
If there's no file on the output folder then I would look through the log on the user interface and see if there's anything in there that might indicate an issue. Often you can even copy and paste the log into something like chatGPT or something
can i train a model ?
Even though I put the models in the folder, it still downloads again, and my internet is too slow to handle it.
Did you make sure the correct naming? I have not tested doing that but I know when I reinstalled to do the video without deleting the folders it skipped downloading them.
@@KLEEBZTECH Thanks, it's fixed
(according to the video) It hangs on line 298 and there is no movement Vram also flows constant It does not move to the Steps section. I could not solve the problem, you passed to the next step before 1 minute.
I have problem with my laptop. It doesn't use the Nvidia GPU, it uses Intel instead.
Don't think this will work with intel.
There is no buckets option, so I thing the picture needs to be 512x512 or 1024x1024
According to cocktail peanut the images are resized. So if you were to pick 512 Fluxgym resizes the images to 512px either on the width or height (whichever side is shorter) while preserving the aspect ratio. I used original large images of my goat and it worked great.
I didn't see a bucket option either but in advanced options there are options for 512 and 1024, which I believe are for resizing. I only tried this once and my images were already 1024, so I'm not 100% sure.
Yes it resizes them.
got OOM on 3080 10gb. Did set 12gb and 512px.
What are you running for other specs like regular RAM?
@@KLEEBZTECH ddr5 32gb*2,am5,3080
Odd. Maybe something to do with swap space? Probably the next thing I would look into. That is about that same as I run without issue.
@@KLEEBZTECH I just enabled cuda fall back policy, it can run now, I just experiment with 2 images, 2080steps expect 3 hours.
RIP T3go ❤
The RAM (NOT THE GPU) is taking 48 GB?
This was on my machine with 64GB but I normally am using it on my other system which only has 32GB and works fine. It does use most of the RAM on that one while running.
@@KLEEBZTECH not sure if you got any cuda out of memory issue while in 32GB? I am getting that on my machine, the graphics card has memory when that error appears but noticed the RAM was maxed out which caused the issue.
@@pyrho307 I have not run into that yet and that 32gb system is what I am actually doing all my training on since it is also my recording pc and often not being used. But I also don't have anything else running on it at the same time.
Will this work with MacOs?
I don't think there is any mac support.
why lora just 17mb ?
*7 hours* for ~2000 steps on 512px🤐🤐
I think VRam is way more important than Raw Performance of the GPU in Flux Lora training.
I Read on the Reddit that RTX 4060ti 16GB takes around 1 Hour for 1000 steps 512px, so would take around 2 Hours for 2000 steps (for ai-toolkit).
I have 4060ti I will try this fluxgym ( this seems way easier)
Yeah the extra VRAM makes things quicker. I just trained one on my 3080 with 10GB and took about 20 hours but more than 2000 steps and 1024.
at some point it took almost 64GB RAM? wtf?
I have 16GB RAM and RTX2060 12GB and i can do the training by increasing the virtual memory to 60GB
My other system with 32GB RAM and 3080 10GVARM worked fine.
@@pitowvideos that worked for me too! I am going to experiment with the other options too.
Rip my 2070 sup
I did not test long enough on my 2070 Super but it seemed to be working. Slowly though.
I have gtx 3050 I think I can.i will test it
Would love to hear how it goes. Do you have 8GB VRAM? I don't know how it would do on something like that.
Insane thing is that it doesnt matter of you have your models downloaded, it will download it again. So u and up with 80gb space taken for comfyui models and fluxgym and they are the same models 🤣
🤩🤩🤩🤩
D:\pinokio\api\fluxgym.git\env\lib\site-packages\torch\utils\checkpoint.py:1399: FutureWarning: `torch.cpu.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cpu', args...)` instead.
[2024-10-30 10:56:13] [INFO] with device_autocast_ctx, torch.cpu.amp.autocast(**cpu_autocast_kwargs), recompute_context: # type: ignore[attr-defined]
Excuse, this step is stuck, how to solve?
I think better than comfy ui coz that’s very complicated 😭
Has anyone actually succeeded with 8 GB VRAM?
I ran it for a couple of hours to get through the first epoch when testing without issue. I didn't wait for it to complete since it would have taken a day on that GPU. You likely will need to use a resolution like 512. When do you run into issues?
@@KLEEBZTECH I'd love to make it running on 8GB through FG since seeting OneTrainer is a bit frustrating to me and doesn't work neither.
Yes, just tried on my 3070 ti with 8GB VRAM. Took 5,5 hours.
steps: 100%|██████████| 2500/2500 [5:25:54
@@KLEEBZTECH on the very begining, out of memory, even if I use smaller model
@@lom1910 system specs?
‘How to poorly train a low quality Lora’
From what little I've read online. Your probably better off for a human character. To try lower images. Best quality as possible, png lossless. Mask it.
Some have gotten amazing results with just 2x images.
It's just way too slow for us 😒 12gb "thanks for the fk you nvidia to your customers who bought a 4070ti for $1000"
Also sucks the 3090 is really good but sucks ass for 4k and stuff and no frame gen. Another fk you from nvidia to their customers.
Please amd or Intel.. make faster drivers. Someone needs to take their throne monopoly.
report for fake misleading title
Lol. Nothing fake or misleading.
another clickbait video, do not work on 8gb
100% not clickbait. It can work on 8GB but can depend on other factors. You can check with other comments and see people have it working with 8. I do not create clickbait videos. This was the first one on FluxGym.