Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,14 +22,20 @@ model_id = "LuyangZ/FloorAI"
|
|
22 |
|
23 |
# controlnet = ControlNetModel.from_pretrained(model_id, torch_dtype=torch.float16)
|
24 |
# controlnet = ControlNetModel.from_pretrained(model_id, torch_dtype="auto")
|
25 |
-
controlnet = ControlNetModel.from_pretrained(model_id, torch_dtype=torch.float32)
|
|
|
|
|
26 |
controlnet.to(device)
|
27 |
# torch.cuda.empty_cache()
|
28 |
|
29 |
|
30 |
-
pipeline = StableDiffusionControlNetPipeline.from_pretrained(base_model_id , controlnet=controlnet, torch_dtype=torch.float32)
|
31 |
# pipeline = StableDiffusionControlNetPipeline.from_pretrained(base_model_id , controlnet=controlnet, torch_dtype="auto")
|
32 |
# pipeline = StableDiffusionControlNetPipeline.from_pretrained(base_model_id , controlnet=controlnet, torch_dtype=torch.float16)
|
|
|
|
|
|
|
|
|
33 |
pipeline.scheduler = UniPCMultistepScheduler.from_config(pipeline.scheduler.config)
|
34 |
|
35 |
|
|
|
22 |
|
23 |
# controlnet = ControlNetModel.from_pretrained(model_id, torch_dtype=torch.float16)
|
24 |
# controlnet = ControlNetModel.from_pretrained(model_id, torch_dtype="auto")
|
25 |
+
# controlnet = ControlNetModel.from_pretrained(model_id, torch_dtype=torch.float32)
|
26 |
+
controlnet = ControlNetModel.from_pretrained(model_id)
|
27 |
+
|
28 |
controlnet.to(device)
|
29 |
# torch.cuda.empty_cache()
|
30 |
|
31 |
|
32 |
+
# pipeline = StableDiffusionControlNetPipeline.from_pretrained(base_model_id , controlnet=controlnet, torch_dtype=torch.float32)
|
33 |
# pipeline = StableDiffusionControlNetPipeline.from_pretrained(base_model_id , controlnet=controlnet, torch_dtype="auto")
|
34 |
# pipeline = StableDiffusionControlNetPipeline.from_pretrained(base_model_id , controlnet=controlnet, torch_dtype=torch.float16)
|
35 |
+
pipeline = StableDiffusionControlNetPipeline.from_pretrained(base_model_id , controlnet=controlnet)
|
36 |
+
pipeline.safety_checker = None
|
37 |
+
pipeline.requires_safety_checker = False
|
38 |
+
|
39 |
pipeline.scheduler = UniPCMultistepScheduler.from_config(pipeline.scheduler.config)
|
40 |
|
41 |
|