From 64122b90177aa787e25bdf20158d7d9230a775b6 Mon Sep 17 00:00:00 2001 From: Chengxi Guo Date: Wed, 25 Oct 2023 08:14:05 +0800 Subject: [PATCH] fix typo (#5505) Signed-off-by: mymusise --- docs/source/en/api/models/controlnet.md | 4 ++-- src/diffusers/loaders.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/en/api/models/controlnet.md b/docs/source/en/api/models/controlnet.md index e02adde8a1bc9..58359723a08e6 100644 --- a/docs/source/en/api/models/controlnet.md +++ b/docs/source/en/api/models/controlnet.md @@ -12,13 +12,13 @@ By default the [`ControlNetModel`] should be loaded with [`~ModelMixin.from_pret from the original format using [`FromOriginalControlnetMixin.from_single_file`] as follows: ```py -from diffusers import StableDiffusionControlnetPipeline, ControlNetModel +from diffusers import StableDiffusionControlNetPipeline, ControlNetModel url = "https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15_canny.pth" # can also be a local path controlnet = ControlNetModel.from_single_file(url) url = "https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned.safetensors" # can also be a local path -pipe = StableDiffusionControlnetPipeline.from_single_file(url, controlnet=controlnet) +pipe = StableDiffusionControlNetPipeline.from_single_file(url, controlnet=controlnet) ``` ## ControlNetModel diff --git a/src/diffusers/loaders.py b/src/diffusers/loaders.py index e36088e4645d7..2987fb718ecf4 100644 --- a/src/diffusers/loaders.py +++ b/src/diffusers/loaders.py @@ -3087,13 +3087,13 @@ def from_single_file(cls, pretrained_model_link_or_path, **kwargs): Examples: ```py - from diffusers import StableDiffusionControlnetPipeline, ControlNetModel + from diffusers import StableDiffusionControlNetPipeline, ControlNetModel url = "https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15_canny.pth" # can also be a local path model = ControlNetModel.from_single_file(url) url = "https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned.safetensors" # can also be a local path - pipe = StableDiffusionControlnetPipeline.from_single_file(url, controlnet=controlnet) + pipe = StableDiffusionControlNetPipeline.from_single_file(url, controlnet=controlnet) ``` """ # import here to avoid circular dependency