Spaces:
Runtime error
Runtime error
Update app.py
#3
by mcvo1705 - opened
app.py
CHANGED
|
@@ -20,7 +20,7 @@ print("[Writing SAM Weights]")
|
|
| 20 |
|
| 21 |
with open("./sam_vit_h_4b8939.pth", "wb") as sam_weights:
|
| 22 |
sam_weights.write(r.content)
|
| 23 |
-
|
| 24 |
del r
|
| 25 |
gc.collect()
|
| 26 |
|
|
@@ -38,7 +38,10 @@ controlnet = ControlNetModel.from_pretrained(
|
|
| 38 |
).to(device)
|
| 39 |
|
| 40 |
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
| 41 |
-
"
|
|
|
|
|
|
|
|
|
|
| 42 |
).to(device)
|
| 43 |
|
| 44 |
|
|
|
|
| 20 |
|
| 21 |
with open("./sam_vit_h_4b8939.pth", "wb") as sam_weights:
|
| 22 |
sam_weights.write(r.content)
|
| 23 |
+
|
| 24 |
del r
|
| 25 |
gc.collect()
|
| 26 |
|
|
|
|
| 38 |
).to(device)
|
| 39 |
|
| 40 |
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
| 41 |
+
"stabilityai/stable-diffusion-2-1",
|
| 42 |
+
controlnet=controlnet,
|
| 43 |
+
torch_dtype=torch.float16,
|
| 44 |
+
safety_checker=None
|
| 45 |
).to(device)
|
| 46 |
|
| 47 |
|