ai-toolkit icon indicating copy to clipboard operation
ai-toolkit copied to clipboard

Black Images and LoRAs do not work.

Open ali-m-github opened this issue 1 month ago • 7 comments

Hello, I am getting this error when starting the training on Flux.1 dev

image_processor.py:148: RuntimeWarning: invalid value encountered in cast

It is generating black images as samples. Training also shows nan loss

Image

It is training faster than it should and the resulting LoRA files are correct size but they do not work, the images I generate produce random people instead of the person I've trained.

I am using windows 11 - RTX 5090

ali-m-github avatar Nov 08 '25 14:11 ali-m-github

I get same error when tranning LoRA for Chroma

qngv avatar Nov 10 '25 01:11 qngv

Yes, no fix yet!

ali-m-github avatar Nov 11 '25 09:11 ali-m-github

You didnt even tell what you train...

metamountain avatar Nov 12 '25 09:11 metamountain

You didnt even tell what you train...

Updated post. I am training a LoRA on the flux.1 dev model.

ali-m-github avatar Nov 12 '25 14:11 ali-m-github

Similar problem when training WAN2.2. I'll roll back a version and see if that fixes anything.

Edit: Rolling to previous commits doesn't help.

I get this error during sampling. Perhaps something the version of diffusers.


Loading Vae

/venv/main/lib/python3.12/site-packages/diffusers/image_processor.py:148: RuntimeWarning: invalid value encountered in cast

  images = (images * 255).round().astype("uint8")

spooknik avatar Nov 14 '25 09:11 spooknik

Similar

Still not working, even tried chatgpt which suggested disabling quantization for transformer and text encoder but doing so casues Cuda out of memory errors

ali-m-github avatar Nov 17 '25 01:11 ali-m-github

The issue is still there, any fix?

ali-m-github avatar Nov 18 '25 14:11 ali-m-github