Repository: PaddlePaddle/PaddleNLP

Issue:
[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

代码示例：
``` python
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")
```


Discussion:
你好，在windows下，现在这个bug已经修复了 https://github.com/PaddlePaddle/PaddleNLP/pull/3640 。
您可以安装develop版本的paddlenlp，命令如下
```bash
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 好的谢谢，的确忘了这个部分的。

Resolving patch:
diff --git a/paddlenlp/transformers/auto/modeling.py b/paddlenlp/transformers/auto/modeling.py
--- a/paddlenlp/transformers/auto/modeling.py
+++ b/paddlenlp/transformers/auto/modeling.py
@@ -268,9 +268,10 @@ def _from_pretrained(cls,
                     pretrained_model_name_or_path, *model_args, **kwargs)
         # Assuming from community-contributed pretrained models
         else:
-            community_config_path = os.path.join(COMMUNITY_MODEL_PREFIX,
-                                                 pretrained_model_name_or_path,
-                                                 cls.model_config_file)
+            community_config_path = "/".join([
+                COMMUNITY_MODEL_PREFIX, pretrained_model_name_or_path,
+                cls.model_config_file
+            ])
 
             default_root = os.path.join(MODEL_HOME,
                                         pretrained_model_name_or_path)
diff --git a/paddlenlp/transformers/auto/tokenizer.py b/paddlenlp/transformers/auto/tokenizer.py
--- a/paddlenlp/transformers/auto/tokenizer.py
+++ b/paddlenlp/transformers/auto/tokenizer.py
@@ -279,9 +279,10 @@ def from_pretrained(cls, pretrained_model_name_or_path, *model_args,
                                 **kwargs)
         # Assuming from community-contributed pretrained models
         else:
-            community_config_path = os.path.join(COMMUNITY_MODEL_PREFIX,
-                                                 pretrained_model_name_or_path,
-                                                 cls.tokenizer_config_file)
+            community_config_path = "/".join([
+                COMMUNITY_MODEL_PREFIX, pretrained_model_name_or_path,
+                cls.tokenizer_config_file
+            ])
 
             default_root = os.path.join(MODEL_HOME,
                                         pretrained_model_name_or_path)


Test patch: