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

sdxl模型 demo运行错误 #521

Open
lrjxgl opened this issue Apr 30, 2024 · 1 comment
Open

sdxl模型 demo运行错误 #521

lrjxgl opened this issue Apr 30, 2024 · 1 comment
Assignees

Comments

@lrjxgl
Copy link

lrjxgl commented Apr 30, 2024

OSError: Can't load the model for 'stabilityai/stable-diffusion-xl-base-1.0'. If you were trying to load it from 'BOS', make sure you don't have a local directory with the same name. Otherwise, make sure 'stabilityai/stable-diffusion-xl-base-1.0' is the correct path to a directory containing one of the ['config.json', 'model_config.json']

`import paddle
from ppdiffusers import StableDiffusionXLPipeline

pipe = StableDiffusionXLPipeline.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0",
paddle_dtype=paddle.float16,
variant="fp16"
)
prompt = "a photo of an astronaut riding a horse on mars"
generator = paddle.Generator().manual_seed(42)
image = pipe(prompt=prompt, generator=generator, num_inference_steps=50).images[0]
image.save('sdxl_text2image.png')`

@westfish
Copy link
Contributor

cache里面可能有不完整的权重目录,可以清空一下cache

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

3 participants