Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,6 @@ def infer(
|
|
39 |
ip_adapter_image=None,
|
40 |
progress=gr.Progress(track_tqdm=True),
|
41 |
):
|
42 |
-
print(controlnet_checkbox, ip_adapter_checkbox)
|
43 |
generator = torch.Generator(device).manual_seed(seed)
|
44 |
|
45 |
ckpt_dir='./model_output'
|
@@ -80,10 +79,10 @@ def infer(
|
|
80 |
cache_dir="./models_cache",
|
81 |
torch_dtype=torch_dtype
|
82 |
)
|
83 |
-
pipe =
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
else:
|
88 |
pipe = StableDiffusionPipeline.from_pretrained(model_id,
|
89 |
torch_dtype=torch_dtype,
|
|
|
39 |
ip_adapter_image=None,
|
40 |
progress=gr.Progress(track_tqdm=True),
|
41 |
):
|
|
|
42 |
generator = torch.Generator(device).manual_seed(seed)
|
43 |
|
44 |
ckpt_dir='./model_output'
|
|
|
79 |
cache_dir="./models_cache",
|
80 |
torch_dtype=torch_dtype
|
81 |
)
|
82 |
+
pipe = StableDiffusionControlNetPipeline.from_pretrained(model_id,
|
83 |
+
controlnet=controlnet,
|
84 |
+
torch_dtype=torch_dtype,
|
85 |
+
safety_checker=None).to(device)
|
86 |
else:
|
87 |
pipe = StableDiffusionPipeline.from_pretrained(model_id,
|
88 |
torch_dtype=torch_dtype,
|