Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
dcbfe662
Unverified
Commit
dcbfe662
authored
Oct 25, 2023
by
Chengxi Guo
Committed by
GitHub
Oct 24, 2023
Browse files
fix typo (#5505)
Signed-off-by:
mymusise
<
mymusise1@gmail.com
>
parent
958e17da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
docs/source/en/api/models/controlnet.md
docs/source/en/api/models/controlnet.md
+2
-2
src/diffusers/loaders.py
src/diffusers/loaders.py
+2
-2
No files found.
docs/source/en/api/models/controlnet.md
View file @
dcbfe662
...
@@ -12,13 +12,13 @@ By default the [`ControlNetModel`] should be loaded with [`~ModelMixin.from_pret
...
@@ -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:
from the original format using [
`FromOriginalControlnetMixin.from_single_file`
] as follows:
```
py
```
py
from
diffusers
import
StableDiffusionControl
n
etPipeline
,
ControlNetModel
from
diffusers
import
StableDiffusionControl
N
etPipeline
,
ControlNetModel
url
=
"https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15_canny.pth"
# can also be a local path
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
)
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
url
=
"https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned.safetensors"
# can also be a local path
pipe
=
StableDiffusionControl
n
etPipeline
.
from_single_file
(
url
,
controlnet
=
controlnet
)
pipe
=
StableDiffusionControl
N
etPipeline
.
from_single_file
(
url
,
controlnet
=
controlnet
)
```
```
## ControlNetModel
## ControlNetModel
...
...
src/diffusers/loaders.py
View file @
dcbfe662
...
@@ -3087,13 +3087,13 @@ class FromOriginalControlnetMixin:
...
@@ -3087,13 +3087,13 @@ class FromOriginalControlnetMixin:
Examples:
Examples:
```py
```py
from diffusers import StableDiffusionControl
n
etPipeline, ControlNetModel
from diffusers import StableDiffusionControl
N
etPipeline, ControlNetModel
url = "https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15_canny.pth" # can also be a local path
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)
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
url = "https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned.safetensors" # can also be a local path
pipe = StableDiffusionControl
n
etPipeline.from_single_file(url, controlnet=controlnet)
pipe = StableDiffusionControl
N
etPipeline.from_single_file(url, controlnet=controlnet)
```
```
"""
"""
# import here to avoid circular dependency
# import here to avoid circular dependency
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment