Spaces:
Running
Running
zhiweili
commited on
Commit
·
9252cec
1
Parent(s):
1036005
test single controlnet
Browse files
app_haircolor_inpaint_15.py
CHANGED
@@ -35,10 +35,10 @@ controlnet = [
|
|
35 |
"lllyasviel/control_v11p_sd15_inpaint",
|
36 |
torch_dtype=torch.float16,
|
37 |
),
|
38 |
-
ControlNetModel.from_pretrained(
|
39 |
-
|
40 |
-
|
41 |
-
),
|
42 |
]
|
43 |
|
44 |
basepipeline = StableDiffusionControlNetInpaintPipeline.from_pretrained(
|
@@ -70,7 +70,7 @@ def image_to_image(
|
|
70 |
run_task_time, time_cost_str = get_time_cost(run_task_time, time_cost_str)
|
71 |
canny_image = canny_detector(input_image, int(generate_size*0.375), generate_size)
|
72 |
inpaint_image = make_inpaint_condition(input_image, mask_image)
|
73 |
-
control_image = [inpaint_image
|
74 |
|
75 |
generator = torch.Generator(device=DEVICE).manual_seed(seed)
|
76 |
generated_image = basepipeline(
|
|
|
35 |
"lllyasviel/control_v11p_sd15_inpaint",
|
36 |
torch_dtype=torch.float16,
|
37 |
),
|
38 |
+
# ControlNetModel.from_pretrained(
|
39 |
+
# "diffusers/controlnet-canny-sdxl-1.0",
|
40 |
+
# torch_dtype=torch.float16,
|
41 |
+
# ),
|
42 |
]
|
43 |
|
44 |
basepipeline = StableDiffusionControlNetInpaintPipeline.from_pretrained(
|
|
|
70 |
run_task_time, time_cost_str = get_time_cost(run_task_time, time_cost_str)
|
71 |
canny_image = canny_detector(input_image, int(generate_size*0.375), generate_size)
|
72 |
inpaint_image = make_inpaint_condition(input_image, mask_image)
|
73 |
+
control_image = [inpaint_image]
|
74 |
|
75 |
generator = torch.Generator(device=DEVICE).manual_seed(seed)
|
76 |
generated_image = basepipeline(
|