patrickvonplaten
commited on
Commit
•
500dd60
1
Parent(s):
86a12be
uP
Browse files
README.md
CHANGED
@@ -7,12 +7,12 @@ tags:
|
|
7 |
- stable-diffusion
|
8 |
---
|
9 |
|
10 |
-
# Controlnet - v1.1 - *
|
11 |
|
12 |
**Controlnet v1.1** is the successor model of [Controlnet v1.0](https://huggingface.co/lllyasviel/ControlNet)
|
13 |
and was released in [lllyasviel/ControlNet-v1-1](https://huggingface.co/lllyasviel/ControlNet-v1-1) by [Lvmin Zhang](https://huggingface.co/lllyasviel).
|
14 |
|
15 |
-
This checkpoint is a conversion of [the original checkpoint](https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/
|
16 |
It can be used in combination with **Stable Diffusion**, such as [runwayml/stable-diffusion-v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5).
|
17 |
|
18 |
|
@@ -23,7 +23,7 @@ ControlNet is a neural network structure to control diffusion models by adding e
|
|
23 |
|
24 |
![img](./sd.png)
|
25 |
|
26 |
-
This checkpoint corresponds to the ControlNet conditioned on **
|
27 |
|
28 |
## Model Details
|
29 |
- **Developed by:** Lvmin Zhang, Maneesh Agrawala
|
@@ -86,7 +86,7 @@ from pathlib import Path
|
|
86 |
from diffusers.utils import load_image
|
87 |
from PIL import Image
|
88 |
import numpy as np
|
89 |
-
from controlnet_aux import
|
90 |
|
91 |
from diffusers import (
|
92 |
ControlNetModel,
|
@@ -94,14 +94,14 @@ from diffusers import (
|
|
94 |
UniPCMultistepScheduler,
|
95 |
)
|
96 |
|
97 |
-
checkpoint = "ControlNet-1-1-preview/
|
98 |
|
99 |
image = load_image(
|
100 |
-
"https://huggingface.co/ControlNet-1-1-preview/
|
101 |
)
|
102 |
|
103 |
-
prompt = "
|
104 |
-
processor =
|
105 |
|
106 |
control_image = processor(image)
|
107 |
control_image.save("./images/control.png")
|
|
|
7 |
- stable-diffusion
|
8 |
---
|
9 |
|
10 |
+
# Controlnet - v1.1 - *lineart Version*
|
11 |
|
12 |
**Controlnet v1.1** is the successor model of [Controlnet v1.0](https://huggingface.co/lllyasviel/ControlNet)
|
13 |
and was released in [lllyasviel/ControlNet-v1-1](https://huggingface.co/lllyasviel/ControlNet-v1-1) by [Lvmin Zhang](https://huggingface.co/lllyasviel).
|
14 |
|
15 |
+
This checkpoint is a conversion of [the original checkpoint](https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15_lineart.pth) into `diffusers` format.
|
16 |
It can be used in combination with **Stable Diffusion**, such as [runwayml/stable-diffusion-v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5).
|
17 |
|
18 |
|
|
|
23 |
|
24 |
![img](./sd.png)
|
25 |
|
26 |
+
This checkpoint corresponds to the ControlNet conditioned on **lineart images**.
|
27 |
|
28 |
## Model Details
|
29 |
- **Developed by:** Lvmin Zhang, Maneesh Agrawala
|
|
|
86 |
from diffusers.utils import load_image
|
87 |
from PIL import Image
|
88 |
import numpy as np
|
89 |
+
from controlnet_aux import LineartDetector
|
90 |
|
91 |
from diffusers import (
|
92 |
ControlNetModel,
|
|
|
94 |
UniPCMultistepScheduler,
|
95 |
)
|
96 |
|
97 |
+
checkpoint = "ControlNet-1-1-preview/control_v11p_sd15_lineart"
|
98 |
|
99 |
image = load_image(
|
100 |
+
"https://huggingface.co/ControlNet-1-1-preview/control_v11p_sd15_lineart/resolve/main/images/input.png"
|
101 |
)
|
102 |
|
103 |
+
prompt = "michael jackson concert"
|
104 |
+
processor = LineartDetector.from_pretrained("lllyasviel/Annotators")
|
105 |
|
106 |
control_image = processor(image)
|
107 |
control_image.save("./images/control.png")
|