Spaces:
Runtime error
Runtime error
pass cuda device argument
Browse files
app.py
CHANGED
|
@@ -23,12 +23,13 @@ conditioning_image_transforms = T.Compose(
|
|
| 23 |
]
|
| 24 |
)
|
| 25 |
|
| 26 |
-
cnet = ControlNetModel.from_pretrained("./models/catcon-controlnet-wd", torch_dtype=torch.float16, from_flax=True
|
| 27 |
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
| 28 |
"./models/wd-1-5-b2",
|
| 29 |
controlnet=cnet,
|
| 30 |
torch_dtype=torch.float16,
|
| 31 |
-
|
|
|
|
| 32 |
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
|
| 33 |
#pipe.enable_model_cpu_offload()
|
| 34 |
#pipe.enable_xformers_memory_efficient_attention()
|
|
|
|
| 23 |
]
|
| 24 |
)
|
| 25 |
|
| 26 |
+
cnet = ControlNetModel.from_pretrained("./models/catcon-controlnet-wd", torch_dtype=torch.float16, from_flax=True, device="0")
|
| 27 |
pipe = StableDiffusionControlNetPipeline.from_pretrained(
|
| 28 |
"./models/wd-1-5-b2",
|
| 29 |
controlnet=cnet,
|
| 30 |
torch_dtype=torch.float16,
|
| 31 |
+
device="0"
|
| 32 |
+
)
|
| 33 |
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
|
| 34 |
#pipe.enable_model_cpu_offload()
|
| 35 |
#pipe.enable_xformers_memory_efficient_attention()
|