We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
convert_original_stable_diffison script have issue
https://github.com/huggingface/diffusers/blob/8263cf00f832399bca215e29fa7572e0b0bde4da/scripts/convert_original_stable_diffusion_to_diffusers.py#L157C9-L157C40

config_files command line argment is not include in this script.
I think we need to add this code

parser.add_argument(
        "--config_files",
        default=None,
        type=str,
        help="The YAML config file corresponding to the original architecture.",
    )

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `scripts/convert_original_stable_diffusion_to_diffusers.py`
Content:
```
1 # coding=utf-8
2 # Copyright 2023 The HuggingFace Inc. team.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 """ Conversion script for the LDM checkpoints. """
16 
17 import argparse
18 import importlib
19 
20 import torch
21 
22 from diffusers.pipelines.stable_diffusion.convert_from_ckpt import download_from_original_stable_diffusion_ckpt
23 
24 
25 if __name__ == "__main__":
26     parser = argparse.ArgumentParser()
27 
28     parser.add_argument(
29         "--checkpoint_path", default=None, type=str, required=True, help="Path to the checkpoint to convert."
30     )
31     # !wget https://raw.githubusercontent.com/CompVis/stable-diffusion/main/configs/stable-diffusion/v1-inference.yaml
32     parser.add_argument(
33         "--original_config_file",
34         default=None,
35         type=str,
36         help="The YAML config file corresponding to the original architecture.",
37     )
38     parser.add_argument(
39         "--num_in_channels",
40         default=None,
41         type=int,
42         help="The number of input channels. If `None` number of input channels will be automatically inferred.",
43     )
44     parser.add_argument(
45         "--scheduler_type",
46         default="pndm",
47         type=str,
48         help="Type of scheduler to use. Should be one of ['pndm', 'lms', 'ddim', 'euler', 'euler-ancestral', 'dpm']",
49     )
50     parser.add_argument(
51         "--pipeline_type",
52         default=None,
53         type=str,
54         help=(
55             "The pipeline type. One of 'FrozenOpenCLIPEmbedder', 'FrozenCLIPEmbedder', 'PaintByExample'"
56             ". If `None` pipeline will be automatically inferred."
57         ),
58     )
59     parser.add_argument(
60         "--image_size",
61         default=None,
62         type=int,
63         help=(
64             "The image size that the model was trained on. Use 512 for Stable Diffusion v1.X and Stable Siffusion v2"
65             " Base. Use 768 for Stable Diffusion v2."
66         ),
67     )
68     parser.add_argument(
69         "--prediction_type",
70         default=None,
71         type=str,
72         help=(
73             "The prediction type that the model was trained on. Use 'epsilon' for Stable Diffusion v1.X and Stable"
74             " Diffusion v2 Base. Use 'v_prediction' for Stable Diffusion v2."
75         ),
76     )
77     parser.add_argument(
78         "--extract_ema",
79         action="store_true",
80         help=(
81             "Only relevant for checkpoints that have both EMA and non-EMA weights. Whether to extract the EMA weights"
82             " or not. Defaults to `False`. Add `--extract_ema` to extract the EMA weights. EMA weights usually yield"
83             " higher quality images for inference. Non-EMA weights are usually better to continue fine-tuning."
84         ),
85     )
86     parser.add_argument(
87         "--upcast_attention",
88         action="store_true",
89         help=(
90             "Whether the attention computation should always be upcasted. This is necessary when running stable"
91             " diffusion 2.1."
92         ),
93     )
94     parser.add_argument(
95         "--from_safetensors",
96         action="store_true",
97         help="If `--checkpoint_path` is in `safetensors` format, load checkpoint with safetensors instead of PyTorch.",
98     )
99     parser.add_argument(
100         "--to_safetensors",
101         action="store_true",
102         help="Whether to store pipeline in safetensors format or not.",
103     )
104     parser.add_argument("--dump_path", default=None, type=str, required=True, help="Path to the output model.")
105     parser.add_argument("--device", type=str, help="Device to use (e.g. cpu, cuda:0, cuda:1, etc.)")
106     parser.add_argument(
107         "--stable_unclip",
108         type=str,
109         default=None,
110         required=False,
111         help="Set if this is a stable unCLIP model. One of 'txt2img' or 'img2img'.",
112     )
113     parser.add_argument(
114         "--stable_unclip_prior",
115         type=str,
116         default=None,
117         required=False,
118         help="Set if this is a stable unCLIP txt2img model. Selects which prior to use. If `--stable_unclip` is set to `txt2img`, the karlo prior (https://huggingface.co/kakaobrain/karlo-v1-alpha/tree/main/prior) is selected by default.",
119     )
120     parser.add_argument(
121         "--clip_stats_path",
122         type=str,
123         help="Path to the clip stats file. Only required if the stable unclip model's config specifies `model.params.noise_aug_config.params.clip_stats_path`.",
124         required=False,
125     )
126     parser.add_argument(
127         "--controlnet", action="store_true", default=None, help="Set flag if this is a controlnet checkpoint."
128     )
129     parser.add_argument("--half", action="store_true", help="Save weights in half precision.")
130     parser.add_argument(
131         "--vae_path",
132         type=str,
133         default=None,
134         required=False,
135         help="Set to a path, hub id to an already converted vae to not convert it again.",
136     )
137     parser.add_argument(
138         "--pipeline_class_name",
139         type=str,
140         default=None,
141         required=False,
142         help="Specify the pipeline class name",
143     )
144 
145     args = parser.parse_args()
146 
147     if args.pipeline_class_name is not None:
148         library = importlib.import_module("diffusers")
149         class_obj = getattr(library, args.pipeline_class_name)
150         pipeline_class = class_obj
151     else:
152         pipeline_class = None
153 
154     pipe = download_from_original_stable_diffusion_ckpt(
155         checkpoint_path_or_dict=args.checkpoint_path,
156         original_config_file=args.original_config_file,
157         config_files=args.config_files,
158         image_size=args.image_size,
159         prediction_type=args.prediction_type,
160         model_type=args.pipeline_type,
161         extract_ema=args.extract_ema,
162         scheduler_type=args.scheduler_type,
163         num_in_channels=args.num_in_channels,
164         upcast_attention=args.upcast_attention,
165         from_safetensors=args.from_safetensors,
166         device=args.device,
167         stable_unclip=args.stable_unclip,
168         stable_unclip_prior=args.stable_unclip_prior,
169         clip_stats_path=args.clip_stats_path,
170         controlnet=args.controlnet,
171         vae_path=args.vae_path,
172         pipeline_class=pipeline_class,
173     )
174 
175     if args.half:
176         pipe.to(torch_dtype=torch.float16)
177 
178     if args.controlnet:
179         # only save the controlnet model
180         pipe.controlnet.save_pretrained(args.dump_path, safe_serialization=args.to_safetensors)
181     else:
182         pipe.save_pretrained(args.dump_path, safe_serialization=args.to_safetensors)
183
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/scripts/convert_original_stable_diffusion_to_diffusers.py b/scripts/convert_original_stable_diffusion_to_diffusers.py
--- a/scripts/convert_original_stable_diffusion_to_diffusers.py
+++ b/scripts/convert_original_stable_diffusion_to_diffusers.py
@@ -35,6 +35,12 @@
         type=str,
         help="The YAML config file corresponding to the original architecture.",
     )
+    parser.add_argument(
+        "--config_files",
+        default=None,
+        type=str,
+        help="The YAML config file corresponding to the architecture.",
+    )
     parser.add_argument(
         "--num_in_channels",
         default=None,

{"golden_diff": "diff --git a/scripts/convert_original_stable_diffusion_to_diffusers.py b/scripts/convert_original_stable_diffusion_to_diffusers.py\n--- a/scripts/convert_original_stable_diffusion_to_diffusers.py\n+++ b/scripts/convert_original_stable_diffusion_to_diffusers.py\n@@ -35,6 +35,12 @@\n         type=str,\n         help=\"The YAML config file corresponding to the original architecture.\",\n     )\n+    parser.add_argument(\n+        \"--config_files\",\n+        default=None,\n+        type=str,\n+        help=\"The YAML config file corresponding to the architecture.\",\n+    )\n     parser.add_argument(\n         \"--num_in_channels\",\n         default=None,\n", "issue": "convert_original_stable_diffison script have issue\nhttps://github.com/huggingface/diffusers/blob/8263cf00f832399bca215e29fa7572e0b0bde4da/scripts/convert_original_stable_diffusion_to_diffusers.py#L157C9-L157C40\r\n\r\nconfig_files command line argment is not include in this script.\r\nI think we need to add this code\r\n\r\nparser.add_argument(\r\n        \"--config_files\",\r\n        default=None,\r\n        type=str,\r\n        help=\"The YAML config file corresponding to the original architecture.\",\r\n    )\n", "before_files": [{"content": "# coding=utf-8\n# Copyright 2023 The HuggingFace Inc. team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\" Conversion script for the LDM checkpoints. \"\"\"\n\nimport argparse\nimport importlib\n\nimport torch\n\nfrom diffusers.pipelines.stable_diffusion.convert_from_ckpt import download_from_original_stable_diffusion_ckpt\n\n\nif __name__ == \"__main__\":\n    parser = argparse.ArgumentParser()\n\n    parser.add_argument(\n        \"--checkpoint_path\", default=None, type=str, required=True, help=\"Path to the checkpoint to convert.\"\n    )\n    # !wget https://raw.githubusercontent.com/CompVis/stable-diffusion/main/configs/stable-diffusion/v1-inference.yaml\n    parser.add_argument(\n        \"--original_config_file\",\n        default=None,\n        type=str,\n        help=\"The YAML config file corresponding to the original architecture.\",\n    )\n    parser.add_argument(\n        \"--num_in_channels\",\n        default=None,\n        type=int,\n        help=\"The number of input channels. If `None` number of input channels will be automatically inferred.\",\n    )\n    parser.add_argument(\n        \"--scheduler_type\",\n        default=\"pndm\",\n        type=str,\n        help=\"Type of scheduler to use. Should be one of ['pndm', 'lms', 'ddim', 'euler', 'euler-ancestral', 'dpm']\",\n    )\n    parser.add_argument(\n        \"--pipeline_type\",\n        default=None,\n        type=str,\n        help=(\n            \"The pipeline type. One of 'FrozenOpenCLIPEmbedder', 'FrozenCLIPEmbedder', 'PaintByExample'\"\n            \". If `None` pipeline will be automatically inferred.\"\n        ),\n    )\n    parser.add_argument(\n        \"--image_size\",\n        default=None,\n        type=int,\n        help=(\n            \"The image size that the model was trained on. Use 512 for Stable Diffusion v1.X and Stable Siffusion v2\"\n            \" Base. Use 768 for Stable Diffusion v2.\"\n        ),\n    )\n    parser.add_argument(\n        \"--prediction_type\",\n        default=None,\n        type=str,\n        help=(\n            \"The prediction type that the model was trained on. Use 'epsilon' for Stable Diffusion v1.X and Stable\"\n            \" Diffusion v2 Base. Use 'v_prediction' for Stable Diffusion v2.\"\n        ),\n    )\n    parser.add_argument(\n        \"--extract_ema\",\n        action=\"store_true\",\n        help=(\n            \"Only relevant for checkpoints that have both EMA and non-EMA weights. Whether to extract the EMA weights\"\n            \" or not. Defaults to `False`. Add `--extract_ema` to extract the EMA weights. EMA weights usually yield\"\n            \" higher quality images for inference. Non-EMA weights are usually better to continue fine-tuning.\"\n        ),\n    )\n    parser.add_argument(\n        \"--upcast_attention\",\n        action=\"store_true\",\n        help=(\n            \"Whether the attention computation should always be upcasted. This is necessary when running stable\"\n            \" diffusion 2.1.\"\n        ),\n    )\n    parser.add_argument(\n        \"--from_safetensors\",\n        action=\"store_true\",\n        help=\"If `--checkpoint_path` is in `safetensors` format, load checkpoint with safetensors instead of PyTorch.\",\n    )\n    parser.add_argument(\n        \"--to_safetensors\",\n        action=\"store_true\",\n        help=\"Whether to store pipeline in safetensors format or not.\",\n    )\n    parser.add_argument(\"--dump_path\", default=None, type=str, required=True, help=\"Path to the output model.\")\n    parser.add_argument(\"--device\", type=str, help=\"Device to use (e.g. cpu, cuda:0, cuda:1, etc.)\")\n    parser.add_argument(\n        \"--stable_unclip\",\n        type=str,\n        default=None,\n        required=False,\n        help=\"Set if this is a stable unCLIP model. One of 'txt2img' or 'img2img'.\",\n    )\n    parser.add_argument(\n        \"--stable_unclip_prior\",\n        type=str,\n        default=None,\n        required=False,\n        help=\"Set if this is a stable unCLIP txt2img model. Selects which prior to use. If `--stable_unclip` is set to `txt2img`, the karlo prior (https://huggingface.co/kakaobrain/karlo-v1-alpha/tree/main/prior) is selected by default.\",\n    )\n    parser.add_argument(\n        \"--clip_stats_path\",\n        type=str,\n        help=\"Path to the clip stats file. Only required if the stable unclip model's config specifies `model.params.noise_aug_config.params.clip_stats_path`.\",\n        required=False,\n    )\n    parser.add_argument(\n        \"--controlnet\", action=\"store_true\", default=None, help=\"Set flag if this is a controlnet checkpoint.\"\n    )\n    parser.add_argument(\"--half\", action=\"store_true\", help=\"Save weights in half precision.\")\n    parser.add_argument(\n        \"--vae_path\",\n        type=str,\n        default=None,\n        required=False,\n        help=\"Set to a path, hub id to an already converted vae to not convert it again.\",\n    )\n    parser.add_argument(\n        \"--pipeline_class_name\",\n        type=str,\n        default=None,\n        required=False,\n        help=\"Specify the pipeline class name\",\n    )\n\n    args = parser.parse_args()\n\n    if args.pipeline_class_name is not None:\n        library = importlib.import_module(\"diffusers\")\n        class_obj = getattr(library, args.pipeline_class_name)\n        pipeline_class = class_obj\n    else:\n        pipeline_class = None\n\n    pipe = download_from_original_stable_diffusion_ckpt(\n        checkpoint_path_or_dict=args.checkpoint_path,\n        original_config_file=args.original_config_file,\n        config_files=args.config_files,\n        image_size=args.image_size,\n        prediction_type=args.prediction_type,\n        model_type=args.pipeline_type,\n        extract_ema=args.extract_ema,\n        scheduler_type=args.scheduler_type,\n        num_in_channels=args.num_in_channels,\n        upcast_attention=args.upcast_attention,\n        from_safetensors=args.from_safetensors,\n        device=args.device,\n        stable_unclip=args.stable_unclip,\n        stable_unclip_prior=args.stable_unclip_prior,\n        clip_stats_path=args.clip_stats_path,\n        controlnet=args.controlnet,\n        vae_path=args.vae_path,\n        pipeline_class=pipeline_class,\n    )\n\n    if args.half:\n        pipe.to(torch_dtype=torch.float16)\n\n    if args.controlnet:\n        # only save the controlnet model\n        pipe.controlnet.save_pretrained(args.dump_path, safe_serialization=args.to_safetensors)\n    else:\n        pipe.save_pretrained(args.dump_path, safe_serialization=args.to_safetensors)\n", "path": "scripts/convert_original_stable_diffusion_to_diffusers.py"}], "after_files": [{"content": "# coding=utf-8\n# Copyright 2023 The HuggingFace Inc. team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\" Conversion script for the LDM checkpoints. \"\"\"\n\nimport argparse\nimport importlib\n\nimport torch\n\nfrom diffusers.pipelines.stable_diffusion.convert_from_ckpt import download_from_original_stable_diffusion_ckpt\n\n\nif __name__ == \"__main__\":\n    parser = argparse.ArgumentParser()\n\n    parser.add_argument(\n        \"--checkpoint_path\", default=None, type=str, required=True, help=\"Path to the checkpoint to convert.\"\n    )\n    # !wget https://raw.githubusercontent.com/CompVis/stable-diffusion/main/configs/stable-diffusion/v1-inference.yaml\n    parser.add_argument(\n        \"--original_config_file\",\n        default=None,\n        type=str,\n        help=\"The YAML config file corresponding to the original architecture.\",\n    )\n    parser.add_argument(\n        \"--config_files\",\n        default=None,\n        type=str,\n        help=\"The YAML config file corresponding to the architecture.\",\n    )\n    parser.add_argument(\n        \"--num_in_channels\",\n        default=None,\n        type=int,\n        help=\"The number of input channels. If `None` number of input channels will be automatically inferred.\",\n    )\n    parser.add_argument(\n        \"--scheduler_type\",\n        default=\"pndm\",\n        type=str,\n        help=\"Type of scheduler to use. Should be one of ['pndm', 'lms', 'ddim', 'euler', 'euler-ancestral', 'dpm']\",\n    )\n    parser.add_argument(\n        \"--pipeline_type\",\n        default=None,\n        type=str,\n        help=(\n            \"The pipeline type. One of 'FrozenOpenCLIPEmbedder', 'FrozenCLIPEmbedder', 'PaintByExample'\"\n            \". If `None` pipeline will be automatically inferred.\"\n        ),\n    )\n    parser.add_argument(\n        \"--image_size\",\n        default=None,\n        type=int,\n        help=(\n            \"The image size that the model was trained on. Use 512 for Stable Diffusion v1.X and Stable Siffusion v2\"\n            \" Base. Use 768 for Stable Diffusion v2.\"\n        ),\n    )\n    parser.add_argument(\n        \"--prediction_type\",\n        default=None,\n        type=str,\n        help=(\n            \"The prediction type that the model was trained on. Use 'epsilon' for Stable Diffusion v1.X and Stable\"\n            \" Diffusion v2 Base. Use 'v_prediction' for Stable Diffusion v2.\"\n        ),\n    )\n    parser.add_argument(\n        \"--extract_ema\",\n        action=\"store_true\",\n        help=(\n            \"Only relevant for checkpoints that have both EMA and non-EMA weights. Whether to extract the EMA weights\"\n            \" or not. Defaults to `False`. Add `--extract_ema` to extract the EMA weights. EMA weights usually yield\"\n            \" higher quality images for inference. Non-EMA weights are usually better to continue fine-tuning.\"\n        ),\n    )\n    parser.add_argument(\n        \"--upcast_attention\",\n        action=\"store_true\",\n        help=(\n            \"Whether the attention computation should always be upcasted. This is necessary when running stable\"\n            \" diffusion 2.1.\"\n        ),\n    )\n    parser.add_argument(\n        \"--from_safetensors\",\n        action=\"store_true\",\n        help=\"If `--checkpoint_path` is in `safetensors` format, load checkpoint with safetensors instead of PyTorch.\",\n    )\n    parser.add_argument(\n        \"--to_safetensors\",\n        action=\"store_true\",\n        help=\"Whether to store pipeline in safetensors format or not.\",\n    )\n    parser.add_argument(\"--dump_path\", default=None, type=str, required=True, help=\"Path to the output model.\")\n    parser.add_argument(\"--device\", type=str, help=\"Device to use (e.g. cpu, cuda:0, cuda:1, etc.)\")\n    parser.add_argument(\n        \"--stable_unclip\",\n        type=str,\n        default=None,\n        required=False,\n        help=\"Set if this is a stable unCLIP model. One of 'txt2img' or 'img2img'.\",\n    )\n    parser.add_argument(\n        \"--stable_unclip_prior\",\n        type=str,\n        default=None,\n        required=False,\n        help=\"Set if this is a stable unCLIP txt2img model. Selects which prior to use. If `--stable_unclip` is set to `txt2img`, the karlo prior (https://huggingface.co/kakaobrain/karlo-v1-alpha/tree/main/prior) is selected by default.\",\n    )\n    parser.add_argument(\n        \"--clip_stats_path\",\n        type=str,\n        help=\"Path to the clip stats file. Only required if the stable unclip model's config specifies `model.params.noise_aug_config.params.clip_stats_path`.\",\n        required=False,\n    )\n    parser.add_argument(\n        \"--controlnet\", action=\"store_true\", default=None, help=\"Set flag if this is a controlnet checkpoint.\"\n    )\n    parser.add_argument(\"--half\", action=\"store_true\", help=\"Save weights in half precision.\")\n    parser.add_argument(\n        \"--vae_path\",\n        type=str,\n        default=None,\n        required=False,\n        help=\"Set to a path, hub id to an already converted vae to not convert it again.\",\n    )\n    parser.add_argument(\n        \"--pipeline_class_name\",\n        type=str,\n        default=None,\n        required=False,\n        help=\"Specify the pipeline class name\",\n    )\n\n    args = parser.parse_args()\n\n    if args.pipeline_class_name is not None:\n        library = importlib.import_module(\"diffusers\")\n        class_obj = getattr(library, args.pipeline_class_name)\n        pipeline_class = class_obj\n    else:\n        pipeline_class = None\n\n    pipe = download_from_original_stable_diffusion_ckpt(\n        checkpoint_path_or_dict=args.checkpoint_path,\n        original_config_file=args.original_config_file,\n        config_files=args.config_files,\n        image_size=args.image_size,\n        prediction_type=args.prediction_type,\n        model_type=args.pipeline_type,\n        extract_ema=args.extract_ema,\n        scheduler_type=args.scheduler_type,\n        num_in_channels=args.num_in_channels,\n        upcast_attention=args.upcast_attention,\n        from_safetensors=args.from_safetensors,\n        device=args.device,\n        stable_unclip=args.stable_unclip,\n        stable_unclip_prior=args.stable_unclip_prior,\n        clip_stats_path=args.clip_stats_path,\n        controlnet=args.controlnet,\n        vae_path=args.vae_path,\n        pipeline_class=pipeline_class,\n    )\n\n    if args.half:\n        pipe.to(torch_dtype=torch.float16)\n\n    if args.controlnet:\n        # only save the controlnet model\n        pipe.controlnet.save_pretrained(args.dump_path, safe_serialization=args.to_safetensors)\n    else:\n        pipe.save_pretrained(args.dump_path, safe_serialization=args.to_safetensors)\n", "path": "scripts/convert_original_stable_diffusion_to_diffusers.py"}]}