Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,14 +18,16 @@ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
|
| 18 |
base_model_id = "runwayml/stable-diffusion-v1-5"
|
| 19 |
model_id = "LuyangZ/FloorAI"
|
| 20 |
|
| 21 |
-
controlnet = ControlNetModel.from_pretrained(model_id, torch_dtype=
|
|
|
|
| 22 |
# controlnet = ControlNetModel.from_pretrained(model_id, torch_dtype=torch.float32)
|
| 23 |
controlnet.to(device)
|
| 24 |
# torch.cuda.empty_cache()
|
| 25 |
|
| 26 |
|
| 27 |
# pipeline = StableDiffusionControlNetPipeline.from_pretrained(base_model_id , controlnet=controlnet, torch_dtype=torch.float32)
|
| 28 |
-
pipeline = StableDiffusionControlNetPipeline.from_pretrained(base_model_id , controlnet=controlnet, torch_dtype="auto")
|
|
|
|
| 29 |
pipeline.scheduler = UniPCMultistepScheduler.from_config(pipeline.scheduler.config)
|
| 30 |
|
| 31 |
pipeline = pipeline.to(device)
|
|
|
|
| 18 |
base_model_id = "runwayml/stable-diffusion-v1-5"
|
| 19 |
model_id = "LuyangZ/FloorAI"
|
| 20 |
|
| 21 |
+
controlnet = ControlNetModel.from_pretrained(model_id, torch_dtype=torch.float16)
|
| 22 |
+
# controlnet = ControlNetModel.from_pretrained(model_id, torch_dtype="auto")
|
| 23 |
# controlnet = ControlNetModel.from_pretrained(model_id, torch_dtype=torch.float32)
|
| 24 |
controlnet.to(device)
|
| 25 |
# torch.cuda.empty_cache()
|
| 26 |
|
| 27 |
|
| 28 |
# pipeline = StableDiffusionControlNetPipeline.from_pretrained(base_model_id , controlnet=controlnet, torch_dtype=torch.float32)
|
| 29 |
+
# pipeline = StableDiffusionControlNetPipeline.from_pretrained(base_model_id , controlnet=controlnet, torch_dtype="auto")
|
| 30 |
+
pipeline = StableDiffusionControlNetPipeline.from_pretrained(base_model_id , controlnet=controlnet, torch_dtype=torch.float16)
|
| 31 |
pipeline.scheduler = UniPCMultistepScheduler.from_config(pipeline.scheduler.config)
|
| 32 |
|
| 33 |
pipeline = pipeline.to(device)
|