Stability-AI / sd3-ref

60 stars 5 forks source link

The generated image is fully black #2

Open ChangfuXu opened 2 weeks ago

ChangfuXu commented 2 weeks ago

Dear author, Thank you for your sharing. I have deployed your codes on my device. However, I found that the generated image is fully black, i.e., nothing can be seen. I guess that may be the VAE error. Then, I try to download the sd3_vae.safetensor. However, I cannot find the file on the hugging face website. Could you provide sd3_vae.safetensor?

mcmonkey4eva commented 2 weeks ago

The VAE is included within the release SD3-Medium file, you don't need it separately.

ChangfuXu commented 2 weeks ago

The VAE is included within the release SD3-Medium file, you don't need it separately.

I know. I run the code by default setting. But I get an all-black image. Have you run this code and get the right result?

ChangfuXu commented 2 weeks ago

Dear authors, I download the clip_g.safetensor, clip_l.safetensor t5xx;l_fp16.safetensor, and sd3_medium.safetensor files at the https://huggingface.co/stabilityai/stable-diffusion-3-medium/tree/main. Then, I used them in this repo code. Everything appears to run without issues. But, the resulting image is only zeroes.

However, I test the following code on my device and got the right result. So, I think my device environment should be no problem. I think whether the coder or the model weight files have some issues. Could you provide some information to handle my issue? Thank you very much.

import torch from diffusers import StableDiffusion3Pipeline

pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3-medium-diffusers", torch_dtype=torch.float16) pipe = pipe.to("cuda")

image = pipe( "A cat holding a sign that says hello world", negative_prompt="", num_inference_steps=28, guidance_scale=7.0, ).images[0] image