PaddleNLP
PaddleNLP copied to clipboard
[Question]: stable diffusion模型下载失败
请提出你的问题
使用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")
你好,在windows下,现在这个bug已经修复了 https://github.com/PaddlePaddle/PaddleNLP/pull/3640 。 您可以安装develop版本的paddlenlp,命令如下
git clone https://github.com/PaddlePaddle/PaddleNLP
python setup.py install
您可以使用 https://github.com/PaddlePaddle/PaddleNLP/tree/develop/ppdiffusers 这里面的ppdiffusers(今天也将发个小版本修复 windows下载链接的问题),或者 在aistudio上快速体验文生图 https://aistudio.baidu.com/aistudio/projectdetail/4905623?channelType=0&channel=0
您可以使用 https://github.com/PaddlePaddle/PaddleNLP/tree/develop/ppdiffusers 这里面的ppdiffusers(今天也将发个小版本修复 windows下载链接的问题),或者 在aistudio上快速体验文生图 https://aistudio.baidu.com/aistudio/projectdetail/4905623?channelType=0&channel=0
收到,感谢回复
develop 未收到该bugfix。默认使用的是auto tokenizer,需要对transformers/auto目录下的tokenizer和modeling2个文件进行修改
@shm007g 好的谢谢,的确忘了这个部分的。
你好,已修复 #3670,感谢反馈