Maria
commited on
Commit
·
7fae782
1
Parent(s):
d4011b4
hw6
Browse files
infer.py
CHANGED
|
@@ -36,6 +36,7 @@ default_model = 'CompVis/stable-diffusion-v1-4'
|
|
| 36 |
LoRA_path = 'new_model'
|
| 37 |
|
| 38 |
CONTROLNET_MODE = {
|
|
|
|
| 39 |
"Canny Edge Detection" : "lllyasviel/control_v11p_sd15_canny",
|
| 40 |
"Pixel to Pixel": "lllyasviel/control_v11e_sd15_ip2p",
|
| 41 |
"HED edge detection (soft edge)" : "lllyasviel/control_sd15_hed",
|
|
@@ -65,7 +66,7 @@ def get_pipe(
|
|
| 65 |
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
| 66 |
model_id if model_id!='Maria_Lashina_LoRA' else default_model,
|
| 67 |
torch_dtype=torch_dtype,
|
| 68 |
-
controlnet=
|
| 69 |
safety_checker=None,
|
| 70 |
).to(device)
|
| 71 |
|
|
@@ -87,7 +88,7 @@ def get_pipe(
|
|
| 87 |
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
| 88 |
model_id if model_id!='Maria_Lashina_LoRA' else default_model,
|
| 89 |
torch_dtype=torch_dtype,
|
| 90 |
-
controlnet=
|
| 91 |
safety_checker=None,
|
| 92 |
).to(device)
|
| 93 |
|
|
|
|
| 36 |
LoRA_path = 'new_model'
|
| 37 |
|
| 38 |
CONTROLNET_MODE = {
|
| 39 |
+
"None": "lllyasviel/ControlNet",
|
| 40 |
"Canny Edge Detection" : "lllyasviel/control_v11p_sd15_canny",
|
| 41 |
"Pixel to Pixel": "lllyasviel/control_v11e_sd15_ip2p",
|
| 42 |
"HED edge detection (soft edge)" : "lllyasviel/control_sd15_hed",
|
|
|
|
| 66 |
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
| 67 |
model_id if model_id!='Maria_Lashina_LoRA' else default_model,
|
| 68 |
torch_dtype=torch_dtype,
|
| 69 |
+
controlnet=controlnet,
|
| 70 |
safety_checker=None,
|
| 71 |
).to(device)
|
| 72 |
|
|
|
|
| 88 |
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
| 89 |
model_id if model_id!='Maria_Lashina_LoRA' else default_model,
|
| 90 |
torch_dtype=torch_dtype,
|
| 91 |
+
controlnet=controlnet,
|
| 92 |
safety_checker=None,
|
| 93 |
).to(device)
|
| 94 |
|