Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The generated image is fully black #2

Open
ChangfuXu opened this issue Jul 6, 2024 · 3 comments
Open

The generated image is fully black #2

ChangfuXu opened this issue Jul 6, 2024 · 3 comments

Comments

@ChangfuXu
Copy link

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
Copy link
Contributor

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

@ChangfuXu
Copy link
Author

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants