cocktailpeanut / fluxgym

Dead simple FLUX LoRA training UI with LOW VRAM support
1.27k stars 105 forks source link

Loras produce black pictures #17

Open Barnplaid opened 2 months ago

Barnplaid commented 2 months ago

I have tried to train a Lora with face pictures. 20 of them. Using default settings and auto captioning images with Florence. The training runs, and it saves. But the lora only generates pure black pictures in both Forge and ComfyUI. I'm trying to generate with flux dev fp8.

I have trained two loras before the fixes issued today. I deleted and reinstalled from scratch, trained another lora and the problem still persists.

I would add training logs, but I can't find any for the training itself. I did find this when train.bat was running, right before the percentage bar appeared. It was part of a longer error message:

cuDNN SDPA backward got grad_output.strides() != output.strides()

Pinokio version: 2.14.0 Operating system: Windows 11 GPU: Nvidia 4090 RAM: 64 GB

tman1015 commented 2 months ago

Did you ever figure out what caused this? Having the exact same issue.

Barnplaid commented 2 months ago

I wasn't able to, I tried everything. I decided to start using Ostris' AI Toolkit instead and it's working well for me. The online version at Replicate also works.

tman1015 commented 2 months ago

Unfortunately I don't have a beef 24 gig card so this is seemingly my only option right now. Too bad it doesn't work at all.

ueomatari commented 2 months ago

I have the exact same problem, I have tried for 3 days and uninstalled completely, but no matter what settings I use, it ejects without learning error, LoRA output is a black image, changing CPUWeight does not solve the problem, only 1girl prompt output and LoRA made by others are No problem at all. / RTX4070 12GB VRAM 64GB RAM / Win11 / EasyForge /pinokio 2.14.3/

ueomatari commented 2 months ago

Since the optimizer you have specified may be misbehaving, delete each of the following lines that appear in the text field on the right side regarding Train script, paying attention to line breaks.

--optimizer_type --optimizer_args

When each of these items was removed and the basic optimizer was selected, no black image appeared. It is not clear at this stage if LoRA is working correctly since there is so little learning. If you have time, try changing the optimizer, such as Prodigy, and see if that helps.

I am concerned that the size of LoRA is almost the same...why?

byteconcepts commented 1 month ago

@ueomatari Unfortunately removing the optimizer params from the GUI command box doesn't work and I also only have --optimizer_type adamw8bit in there. As soon as I removed it, JS refreshed the box and it was in there again.

But I found the resulting script in the output folder, removed it there, copied it into the root folder and ran it without gui.

Unfortunately I still only get black preview images.

I would guess that the resulting LoRA would then also be broken. - I'll give it a full run this night and then I'll see.

ueomatari commented 1 month ago

I was able to generate LoRA successfully! If you don't mind, try this one.

"C:\pinokio" folder directly by right-clicking on it and deleting Then try installing pinokio as usual. You can leave the fluxgym settings as they are. I used 10x10 (1000steps) as shown in the 10 pictures, and it worked.

It seems that the "bin and other files" are retained even if uninstalled normally. This solved the problem for me.