Spaces:
Runtime error
Runtime error
Update generate_img.py
Browse files- generate_img.py +4 -0
generate_img.py
CHANGED
@@ -6,6 +6,10 @@ from pipeline_stable_diffusion_controlnet_inpaint import *
|
|
6 |
from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_controlnet import *
|
7 |
import random
|
8 |
|
|
|
|
|
|
|
|
|
9 |
def make_inpaint_condition(image, image_mask):
|
10 |
image = np.array(image.convert("RGB")).astype(np.float32) / 255.0
|
11 |
image_mask = np.array(image_mask.convert("L"))
|
|
|
6 |
from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_controlnet import *
|
7 |
import random
|
8 |
|
9 |
+
# model2
|
10 |
+
controlnet1 = ControlNetModel.from_pretrained("lllyasviel/control_v11p_sd15_scribble", torch_dtype=torch.float16)
|
11 |
+
|
12 |
+
|
13 |
def make_inpaint_condition(image, image_mask):
|
14 |
image = np.array(image.convert("RGB")).astype(np.float32) / 255.0
|
15 |
image_mask = np.array(image_mask.convert("L"))
|