Skip to content

Commit bfe8b41

Browse files
[From Single File] Force accelerate to be installed (huggingface#4078)
force accelerate to be installed
1 parent 4535088 commit bfe8b41

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,11 @@ def download_from_original_stable_diffusion_ckpt(
11721172
StableUnCLIPPipeline,
11731173
)
11741174

1175+
if not is_accelerate_available():
1176+
raise ImportError(
1177+
"To correctly use `from_single_file`, please make sure that `accelerate` is installed. You can install it with `pip install accelerate`."
1178+
)
1179+
11751180
if pipeline_class is None:
11761181
pipeline_class = StableDiffusionPipeline
11771182

0 commit comments

Comments
 (0)