LuyangZ commited on
Commit
975b0fc
·
verified ·
1 Parent(s): d6ef0da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -18,16 +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=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)
 
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)