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

error in using stable cascede #128

Open
saeedkhanehgir opened this issue Apr 6, 2024 · 0 comments
Open

error in using stable cascede #128

saeedkhanehgir opened this issue Apr 6, 2024 · 0 comments

Comments

@saeedkhanehgir
Copy link

saeedkhanehgir commented Apr 6, 2024

Hello,
Thanks for sharing this project.

I want to run stable cascade inference code but I get the below warning and my final "cascade.png" image is all black.

inference code :

import torch
from diffusers import StableCascadeDecoderPipeline, StableCascadePriorPipeline

prompt = "a man"
negative_prompt = ""

prior = StableCascadePriorPipeline.from_pretrained(
    "stabilityai/stable-cascade-prior", torch_dtype=torch.float16
)
decoder = StableCascadeDecoderPipeline.from_pretrained(
    "stabilityai/stable-cascade", torch_dtype=torch.float16
)

prior.enable_model_cpu_offload()
prior_output = prior(
    prompt=prompt,
    height=1024,
    width=1024,
    negative_prompt=negative_prompt,
    guidance_scale=4.0,
    num_images_per_prompt=1,
    num_inference_steps=20,
)

decoder.enable_model_cpu_offload()
decoder_output = decoder(
    image_embeddings=prior_output.image_embeddings.to(torch.float16),
    prompt=prompt,
    negative_prompt=negative_prompt,
    guidance_scale=0.0,
    output_type="pil",
    num_inference_steps=10,
).images[0]
decoder_output.save("cascade.png")

my warning :

Screenshot from 2024-04-06 14-14-29

my env:

diffusers==0.27.2
torch==2.0.1
torchvision==0.15.2
cuda11.8

I can run other stable diffusion models such as SDXL correctly with this env and my device.

Thanks

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

1 participant