ghost
Sign In

How to train a SDXL Style with only 12GB of VRam - RTX 2060 - OneTrainer

How to train a SDXL Style with only 12GB of VRam - RTX 2060 - OneTrainer

Here I am with a new article. It will be very brief because I am quite tired, and especially because there is little to say since I am providing you with the configuration files.

The attached configuration files are to be considered purely illustrative and as a starting point. You will need to find the correct values for LR, scheduler, scaler, etc., because each training session has different values based on many factors, such as the number of images in the dataset.

I finally managed to find the configuration to train with Stable Diffusion XL on a full checkpoint, having only 12GB of VRAM on my graphics card (I have an RTX 2060) using OneTrainer.

I experimented with hundreds of settings (I’m not sure if it was actually a hundred, but believe me, I did a lot of testing), and it took me about a month to find this working configuration. This configuration is generic, and of course, you can tweak the various parameters, but at your own risk, because it takes very little to run out of Memory/Out of Cuda. Another risk is ending up with a very high it/s because the VRAM has been exceeded, and the system is using normal RAM.

With these parameters, with my 2060 and 12GB of VRAM, I get a fluctuating it/s between 5.80/6.20.

The configuration files are for OneTrainer, not for kohya.

A BIG THANK YOU TO:

  • The entire Civitai Italia group on Telegram

  • nuaion, who physically supported me by providing a dataset of images for the training I am doing and also the first base training model I used (which I will use in another training sooner or later, trust me)

  • Francy (or GattaPlayer) who tolerated my ramblings in chat, trying to help me find a working setting.

  • Furkan, who suggested, through his articles, that training with 12GB was possible (even though unfortunately his setting didn’t work for me).

That said, you might ask why I am sharing my "secrets." Simply because I searched like a fool for a working JSON file everywhere, but no one had made one available. Since I believe in the sharing of knowledge, it seems obligatory to share this setting of mine so that more people (maybe in my shoes) can improve it and share it in turn.

Have a good day, everyone, and if you find a better working setting, I ask you to share it as well.

PS: My next goal is to find a working setting for Pony Diffusion as well. If you have any suggestions, ideas, or anything else, they are more than welcome.

PSS: A little gallery of testing of my future XL Model (not the final version):

30

Comments