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

[Question]: stable diffusion模型下载失败 #3655

Closed
Yiheng-Liu opened this issue Nov 2, 2022 · 6 comments · Fixed by #3670
Closed

[Question]: stable diffusion模型下载失败 #3655

Yiheng-Liu opened this issue Nov 2, 2022 · 6 comments · Fixed by #3670
Assignees
Labels
question Further information is requested

Comments

@Yiheng-Liu
Copy link

Yiheng-Liu commented Nov 2, 2022

请提出你的问题

使用paddlenlp的stable diffusion功能下载模型时报错:

Downloading from https://bj.bcebos.com/paddlenlp/models/community/CompVis/stable-diffusion-v1-4\tokenizer_config.json failed with code 404!

paddlenlp版本:2.4.2
paddlepaddle版本:2.3.2
平台:Windows11
python版本:3.10.8

代码示例:

from paddlenlp import Taskflow


def stable_diffusion():
    text_to_image = Taskflow("text_to_image", model="CompVis/stable-diffusion-v1-4")
    prompt = [
        "In the morning light,Chinese ancient buildings in the mountains,Magnificent and fantastic John Howe landscape,lake,clouds,farm,Fairy tale,light effect,Dream,Greg Rutkowski,James Gurney,artstation",
        "clouds surround the mountains and Chinese palaces,sunshine,lake,overlook,overlook,unreal engine,light effect,Dream,Greg Rutkowski,James Gurney,artstation"
    ]
    image_list = text_to_image(prompt)
    for batch_index, batch_image in enumerate(image_list):
        for image_index_in_returned_images, each_image in enumerate(batch_image):
            each_image.save(f"stable-diffusion-figure_{batch_index}_{image_index_in_returned_images}.png")
@Yiheng-Liu Yiheng-Liu added the question Further information is requested label Nov 2, 2022
@JunnYu
Copy link
Member

JunnYu commented Nov 3, 2022

你好,在windows下,现在这个bug已经修复了 #3640
您可以安装develop版本的paddlenlp,命令如下

git clone https://github.com/PaddlePaddle/PaddleNLP
python setup.py install

@JunnYu
Copy link
Member

JunnYu commented Nov 3, 2022

您可以使用 https://github.com/PaddlePaddle/PaddleNLP/tree/develop/ppdiffusers 这里面的ppdiffusers(今天也将发个小版本修复 windows下载链接的问题),或者 在aistudio上快速体验文生图 https://aistudio.baidu.com/aistudio/projectdetail/4905623?channelType=0&channel=0

@Yiheng-Liu
Copy link
Author

您可以使用 https://github.com/PaddlePaddle/PaddleNLP/tree/develop/ppdiffusers 这里面的ppdiffusers(今天也将发个小版本修复 windows下载链接的问题),或者 在aistudio上快速体验文生图 https://aistudio.baidu.com/aistudio/projectdetail/4905623?channelType=0&channel=0

收到,感谢回复

@shm007g
Copy link

shm007g commented Nov 3, 2022

develop 未收到该bugfix。默认使用的是auto tokenizer,需要对transformers/auto目录下的tokenizer和modeling2个文件进行修改

@JunnYu
Copy link
Member

JunnYu commented Nov 3, 2022

@shm007g 好的谢谢,的确忘了这个部分的。

@gongel
Copy link
Member

gongel commented Nov 3, 2022

你好,已修复 #3670,感谢反馈

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

Successfully merging a pull request may close this issue.

4 participants