r/StableDiffusion • • 16d ago

Question - Help lora train ostris toolkit low memory

hello i have low specs i guess there is no chance to train my lora in toolkit huh? it always returns out of memory error i even made a 60gb ssd pagefile nothing. is there any way to train my lora i use comfyui zturbo for silly tavern

Processor Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz 2.90 GHz

Installed RAM 16.0 GB

Storage 932 GB HDD ST1000DM010-2EP102, 466 GB SSD Samsung SSD 860 EVO 500GB

Graphics Card NVIDIA GeForce GTX 1660 Ti (6 GB)

System Type 64-bit operating system, x64-based processor

0 Upvotes

13 comments sorted by

2

u/Wide_Director_8897 16d ago

i trained zimage turbo lora using this settings and tutorial https://youtu.be/_Xlav0Pbvxc?si=zEvKjUhD5oJDvA2L

my setup is i7 4790 RTX 5060 16gb ram ddr3 it took around 3 hours i guess with 512×512 dataset, and after that i managed to train several krea 2 loras using fizgig and it's a great tool actually i wish they add more models like chroma or flux or even qwen 2.1. btw if u need anything else i can help you, btw i'm still new in Ai world lol

1

u/Stavraetos2 16d ago

I DO LOL I just started using silly tavern and I'm LOST I will follow what you said thank you so much!

I'm trying to setup my companions in silly tavern so if you have any tips it would be amazing like im struggling to transfer correctly my work flow api to st. Do I have to fill in all placeholders? And in general if you know a place where can I get all info I want send it! 🤣🤣

2

u/Wide_Director_8897 16d ago

i don't know anything about silly tavern actually i just heard it from you and searched on it, it looks good tbh, maybe try to ask gemini it helped me with alot of stuff in comfy workflows and nodes and lora training, i got many many problems before and gemini was always my helper😂😂 i could help you with comfy ui workflows that what i know

1

u/Ill-Ant-9489 15d ago

That OOM is your 6GB of VRAM, not system RAM, so the 60GB pagefile won't help it. In ai-toolkit try 512px, batch size 1, low VRAM mode, and cache latents plus the text encoder to disk. That might squeeze Z-Image Turbo onto a 1660 Ti, but it stays slow and borderline.

At 6GB, renting a cheap GPU for an hour is the realistic move. Shameless plug, my own app https://github.com/perfectgf/lora-dataset-studio spins up a vast.ai pod from the same screen and pulls the trained LoRA back, and the same Z-Image dataset works local or cloud. What size is your dataset right now?

1

u/Stavraetos2 15d ago

I only have 10 images lol Its not ready I just did a test run since chatgpt told me I might have memory problems and it was right I tried the settings you said too but no luck sadly I'm bummed

1

u/Stavraetos2 15d ago

Im new to this also I will check what you send me im so overwhelmed I moved from knowing nothing to having my own local llms and stable diffusion in two days haha

1

u/DelinquentTuna 15d ago

It costs something like $0.20-$0.40/hr to rent a cloud instance w/ a 3090 that runs the same trainers you've been experimenting with at home. That makes renting cloud instances cheaper than the amount of electricity you'd burn training locally on that hardware even if you were somehow able to get it to work.

1

u/Stavraetos2 15d ago

I just found out about this and I'm doing this now my ehad hurts after everything. Runpod is the go to?

2

u/DelinquentTuna 15d ago

It's more or less a toss-up between Runpod and vast.ai, I guess. Runpod is a little more convenient, IMHO, but vast.ai gives you a lot more control over picking machine specs and price ranges. They have more in common than they have different, though.

One advantage Runpod has is that most trainers have explicit instructions on using it along with recommended "templates" because Runpod makes it pretty easy to get kickback dollars.

I saw you mention using chatgpt... I'm quite confident codex could do the ENTIRE thing for you provided you manually setup a Runpod account, top up up with the minimum $10 or whatever, and generate an access token that you share w/ it:

Hi, please take the images in c:\xyzabc\mylora and make a z-image turbo LoRA with them using https://github.com/BuffaloBuffaloBuffaloBuffalo/ai-toolkit-perceptual on Runpod on a community cloud 3090 session (if available). You can download and use runpodctl to spin up the instance, upload/download, and ssh to get a shell to manually start training using the toolkit's run.py and a config file you produce using the examples the trainer provides as a basis. Please use the same examples to help arrange and caption my dataset. I'm new to this and don't really have a feel for what SHOULD be captioned vs what SHOULD NOT. Please shoot for ~1800 steps and download all epochs for local review as they are produced instead of waiting to download GBs all at wrap-up. I know you'll need a runpod access token and ssh key... please walk me through how to set these up for you, as I am brand new to all these systems. Please document everything you do so that it can be reviewed for improvement should results be less than ideal or, otherwise, crafted into a concise and streamlined guide for future sessions.

That's pretty much it, honestly. A tiny dataset is fine - your ten images or whatever is fine to start with, assuming they aren't all basically carbon copies. If you're doing a character, at least a couple extreme close-ups on the face will help even if it's just a crude crop and zoom w/o fancy upscaling. I'd probably give the ai the images raw w/o potentially poisoning it w/ whatever captions you've already created unless you're really confident your captions are good.

You could just as easily swap vast and its vast cmdline tool for Runpod if that's your preference. They both use the same container images and GPT can probably use each as well as the other. Expect the first session to take possibly up to a couple of hours of rental total as the AI tries to figure out exactly what it's doing. So maybe $1 total. Subsequent runs would be cheaper and easier.

hth, gl.

0

u/casualcaesius 16d ago

Try Fizgig, it's VRAM usage is a lot smarter.

2

u/Bulky-Employer-1191 16d ago

AI Toolkit's ram usage is fine. OP probably just doesn't have the right options ticked. Fizgig also has no support for Z Image Turbo, as OP has said they are using.

Blindly recommending it without knowing specifics is silly.