Spaces:
Runtime error
Runtime error
Update generate_img.py
Browse files- generate_img.py +3 -1
generate_img.py
CHANGED
@@ -7,7 +7,9 @@ from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_controlnet i
|
|
7 |
import random
|
8 |
|
9 |
# model2
|
10 |
-
|
|
|
|
|
11 |
|
12 |
|
13 |
def make_inpaint_condition(image, image_mask):
|
|
|
7 |
import random
|
8 |
|
9 |
# model2
|
10 |
+
controlnet = ControlNetModel.from_pretrained("./models/control_any5_openpose", torch_dtype=torch.float16)
|
11 |
+
pipe = StableDiffusionControlNetInpaintPipeline.from_pretrained("./models/Any-inpainting", controlnet=controlnet, torch_dtype=torch.float16)
|
12 |
+
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
|
13 |
|
14 |
|
15 |
def make_inpaint_condition(image, image_mask):
|