Z Image Lora Training on a 3060 12GB + AI Toolkit Guide that a child can use
Here are the results and my settings + an easy guide anyone can use without writing a single terminal command.
__________________
##What I used to train Loras
I've used Ostris' implementation which can be found here:
https://github.com/ostris/ai-toolkit
https://huggingface.co/ostris/zimage_turbo_training_adapter
##Installation instruction that even a child can follow
________________
Easiest way to install even if it's your first day using a computer
The only thing you need to install is Google Anti-Gravity which is a free software.
1) Install google antigravity for free
https://antigravity.google/
2) Sign into antigravity using your google account and let it setup for the first time. Now create a folder in any drive and name it whatever you want. Then click "select folder" option in antigravity and this is where it will install the LORA trainer. Now wait for the LLM to load. On first load it will download lots of extension and ask for permissions but do it because this can install and code anything for you in the future.
3) After its setup just tell the antigravity in chat like you would talk to chat GPT what you want it to do
"Yo broski install and setup this for me in this folder, download nodejs or any tools you need, setup and check the environment for me, also tell me an easy way to run it afterwards
https://github.com/ostris/ai-toolkit"
Antigravity using Gemini will make every single folder, download everything, run every console command for you and setup the environment. Best part? it then runs the environment itself and fixes any errors it finds itself, it even auto upgrades/downgrades dependencies to as it sees would work best if there is indeed an error. You don't have to even open cmd or google anything, it does it all for you. Just click "accept" whenever it asks as its asking for folder and download permissions onto your pc.
After it successfully installs tell it
"ok now install this training adapter for it
https://huggingface.co/ostris/zimage_turbo_training_adapter"
It will know how to download this and exactly where to put it, you don't even have to open the folder.
In the end it will give you a complete step by step guide on how to run it from CMD and if you don't like that you can even ask antigravity itself "run it for me" and it will start the server for you and give you the IP to train LORAs in AI toolkit.
Best part about anti-gravity? you can tell it to customize the toolkit as you want without having any coding or command line knowledge/research on issues.
For example my C drive only has 10gb left while AI Toolkit downloads 30gb worth of models for first use. I simply told anti-gravity that "my c drive doesn't have space make sure the LORA trainer downloads all models to this folder" and that's it, it will look up the commands needed and set the folder to another drive. Similarly it can solve any and all issues you have like this, even custom code this toolkit for you visually/feature wise if you need for free purely from your vague text inputs.
**NOTE** : The first time I ran the trainer it was giving me 24+ hours to train a 512x512 model but closing everything and restarting fixed it. Do not jump straight into LORA training the first time, let it get to that first training and then quit everything and restart for a faster speed.
You can now follow any AI Toolkit basic guide to start training or use my settings below.
___________________
##My Setup + Load info
Very old CPU with RTX 3060 12GB + 32GB Ram (cheap 3000mhz one)
Load info below for a 1024x1024 training session:
https://i.ibb.co/KtkxkZL/44766iaw2-JDanishswedishfarmdog.png
________________
##My config for a RTX 3060 that worked first try
I kept
Here are the results and my settings + an easy guide anyone can use without writing a single terminal command.
__________________
##What I used to train Loras
I've used Ostris' implementation which can be found here:
https://github.com/ostris/ai-toolkit
https://huggingface.co/ostris/zimage_turbo_training_adapter
##Installation instruction that even a child can follow
________________
Easiest way to install even if it's your first day using a computer
The only thing you need to install is Google Anti-Gravity which is a free software.
1) Install google antigravity for free
https://antigravity.google/
2) Sign into antigravity using your google account and let it setup for the first time. Now create a folder in any drive and name it whatever you want. Then click "select folder" option in antigravity and this is where it will install the LORA trainer. Now wait for the LLM to load. On first load it will download lots of extension and ask for permissions but do it because this can install and code anything for you in the future.
3) After its setup just tell the antigravity in chat like you would talk to chat GPT what you want it to do
"Yo broski install and setup this for me in this folder, download nodejs or any tools you need, setup and check the environment for me, also tell me an easy way to run it afterwards
https://github.com/ostris/ai-toolkit"
Antigravity using Gemini will make every single folder, download everything, run every console command for you and setup the environment. Best part? it then runs the environment itself and fixes any errors it finds itself, it even auto upgrades/downgrades dependencies to as it sees would work best if there is indeed an error. You don't have to even open cmd or google anything, it does it all for you. Just click "accept" whenever it asks as its asking for folder and download permissions onto your pc.
After it successfully installs tell it
"ok now install this training adapter for it
https://huggingface.co/ostris/zimage_turbo_training_adapter"
It will know how to download this and exactly where to put it, you don't even have to open the folder.
In the end it will give you a complete step by step guide on how to run it from CMD and if you don't like that you can even ask antigravity itself "run it for me" and it will start the server for you and give you the IP to train LORAs in AI toolkit.
Best part about anti-gravity? you can tell it to customize the toolkit as you want without having any coding or command line knowledge/research on issues.
For example my C drive only has 10gb left while AI Toolkit downloads 30gb worth of models for first use. I simply told anti-gravity that "my c drive doesn't have space make sure the LORA trainer downloads all models to this folder" and that's it, it will look up the commands needed and set the folder to another drive. Similarly it can solve any and all issues you have like this, even custom code this toolkit for you visually/feature wise if you need for free purely from your vague text inputs.
**NOTE** : The first time I ran the trainer it was giving me 24+ hours to train a 512x512 model but closing everything and restarting fixed it. Do not jump straight into LORA training the first time, let it get to that first training and then quit everything and restart for a faster speed.
You can now follow any AI Toolkit basic guide to start training or use my settings below.
___________________
##My Setup + Load info
Very old CPU with RTX 3060 12GB + 32GB Ram (cheap 3000mhz one)
Load info below for a 1024x1024 training session:
https://i.ibb.co/KtkxkZL/44766iaw2-JDanishswedishfarmdog.png
________________
##My config for a RTX 3060 that worked first try
I kept
GitHub
GitHub - ostris/ai-toolkit: The ultimate training toolkit for finetuning diffusion models
The ultimate training toolkit for finetuning diffusion models - ostris/ai-toolkit
most things default but here are the things I changed + screenshots of my settings. I also only use 1 sample prompt as after the first time setup it may get stuck for an hour on each prompt (no issue on second time use).
https://i.ibb.co/wFbMzxwr/94767iaw2-QJaguar.png
https://i.ibb.co/jvzVt5bk/54768iaw29-Mantisray.png
https://i.ibb.co/Xfy3s9TG/24769iaw2n-Germanshorthairedpointer.png
______
##How much time did it take
I've tried 3 LORAS of a person with images ranging from 15-30, step speed varies with how much you're using your PC on the side but generally
- 512X512 takes 2-3 hours with around 3-4s per step. Faster than FLUXGYM for me.
- 1024X1024 takes 6-7 hours with around 8-11s per step
https://i.ibb.co/wFFpMYpq/54771iaw2x-Admiralbutterfly.png
- 768x768 takes somewhere in between
Yes you don't run out of VRAM for 1024x1024, 12GB VRAM works great if you have enough RAM.
I cannot post the results as they are of my wife but trust me I use LORA trainers for FLUX from sites like FAL and also train FLUX loras locally. This is both faster + the result is better even for 512 vs 512 in FLUX and I haven't even fine tuned the settings. I will post the results of other LORAs I train from it here when I do.
________
Please note, I'm new to AI toolkit and I know most of you will be experts at this but this is a guide for newbies, do add your suggestions or questions below.
If you have any questions let me know below
https://redd.it/1p9k8td
@rStableDiffusion
https://i.ibb.co/wFbMzxwr/94767iaw2-QJaguar.png
https://i.ibb.co/jvzVt5bk/54768iaw29-Mantisray.png
https://i.ibb.co/Xfy3s9TG/24769iaw2n-Germanshorthairedpointer.png
______
##How much time did it take
I've tried 3 LORAS of a person with images ranging from 15-30, step speed varies with how much you're using your PC on the side but generally
- 512X512 takes 2-3 hours with around 3-4s per step. Faster than FLUXGYM for me.
- 1024X1024 takes 6-7 hours with around 8-11s per step
https://i.ibb.co/wFFpMYpq/54771iaw2x-Admiralbutterfly.png
- 768x768 takes somewhere in between
Yes you don't run out of VRAM for 1024x1024, 12GB VRAM works great if you have enough RAM.
I cannot post the results as they are of my wife but trust me I use LORA trainers for FLUX from sites like FAL and also train FLUX loras locally. This is both faster + the result is better even for 512 vs 512 in FLUX and I haven't even fine tuned the settings. I will post the results of other LORAs I train from it here when I do.
________
Please note, I'm new to AI toolkit and I know most of you will be experts at this but this is a guide for newbies, do add your suggestions or questions below.
If you have any questions let me know below
https://redd.it/1p9k8td
@rStableDiffusion
Humans of Z-Image: How many celebrities can you fit into 6GB?
https://redd.it/1p9m78k
@rStableDiffusion
https://redd.it/1p9m78k
@rStableDiffusion
Reddit
From the StableDiffusion community on Reddit: Humans of Z-Image: How many celebrities can you fit into 6GB?
Explore this post and more from the StableDiffusion community