When using this model in python: having this issue
#186
by
zhengyann
- opened
Please help me with this error,when using this code in python only black image output:
from diffusers import DiffusionPipeline
import torch
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, use_safetensors=True, variant="fp16")
pipe.to("cuda")
And the error said:
RuntimeWarning: invalid value encountered in cast
images = (images * 255).round().astype("uint8")