RuntimeWarning: invalid value encountered in cast images = (images * 255).round().astype("uint8")

#25
by Mousey - opened

Hi, I'm getting the following error when running sdxl 1.0 in a container environment (same error on A10g and A100). Basically I get a black image, which I suppose is full of NaNs. I'm loading the pipeline like:

self.pipe = diffusers.DiffusionPipeline.from_pretrained(
cache_path,
torch_dtype=torch.float16,
use_safetensors=True,
variant="fp16"
).to("cuda")

I also get the following warning : The config attributes {'force_upcast': True} were passed to AutoencoderKL, but are not expected and will be ignored. Please verify your config.json configuration file. Do you have any idea what's happening here ? Thank you.

PS: I tried version 0.18 and 0.19

Can you make sure to have the newest diffusers version installed:

pip install diffusers --upgrade

Also to be sure you can fully generate in Fp16 you can use:
https://huggingface.co/madebyollin/sdxl-vae-fp16-fix
for the vae

Sign up or log in to comment