Lifeinhockey commited on
Commit
e7563df
·
verified ·
1 Parent(s): b65dcf6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -206,7 +206,7 @@ def infer(
206
 
207
  # Инициализация ControlNet
208
  controlnet_model_path = "lllyasviel/control_v11f1p_sd15_depth"
209
- controlnet = ControlNetModel.from_pretrained(controlnet_model_path, torch_dtype=torch.float16)
210
 
211
  generator = torch.Generator(device).manual_seed(seed)
212
 
@@ -294,7 +294,7 @@ def infer(
294
 
295
  # Инициализация ControlNet
296
  controlnet_model_path = "lllyasviel/control_v11f1p_sd15_depth"
297
- controlnet = ControlNetModel.from_pretrained(controlnet_model_path, torch_dtype=torch.float16)
298
 
299
  generator = torch.Generator(device).manual_seed(seed)
300
 
@@ -394,7 +394,7 @@ def infer(
394
  print('control_mode = ', control_mode)
395
 
396
  controlnet_model_path = "lllyasviel/sd-controlnet-canny"
397
- controlnet = ControlNetModel.from_pretrained(controlnet_model_path, torch_dtype=torch.float16, use_safetensors=True)
398
 
399
  generator = torch.Generator(device).manual_seed(seed)
400
 
@@ -434,7 +434,7 @@ def infer(
434
  depth_map = get_depth_map(control_image, depth_estimator).unsqueeze(0).half().to(device)
435
 
436
  controlnet_model_path = "lllyasviel/control_v11f1p_sd15_depth"
437
- controlnet = ControlNetModel.from_pretrained(controlnet_model_path, torch_dtype=torch.float16, use_safetensors=True)
438
 
439
  generator = torch.Generator(device).manual_seed(seed)
440
 
 
206
 
207
  # Инициализация ControlNet
208
  controlnet_model_path = "lllyasviel/control_v11f1p_sd15_depth"
209
+ controlnet = ControlNetModel.from_pretrained(controlnet_model_path, torch_dtype=torch_dtype)
210
 
211
  generator = torch.Generator(device).manual_seed(seed)
212
 
 
294
 
295
  # Инициализация ControlNet
296
  controlnet_model_path = "lllyasviel/control_v11f1p_sd15_depth"
297
+ controlnet = ControlNetModel.from_pretrained(controlnet_model_path, torch_dtype=torch_dtype)
298
 
299
  generator = torch.Generator(device).manual_seed(seed)
300
 
 
394
  print('control_mode = ', control_mode)
395
 
396
  controlnet_model_path = "lllyasviel/sd-controlnet-canny"
397
+ controlnet = ControlNetModel.from_pretrained(controlnet_model_path, torch_dtype=torch_dtype, use_safetensors=True)
398
 
399
  generator = torch.Generator(device).manual_seed(seed)
400
 
 
434
  depth_map = get_depth_map(control_image, depth_estimator).unsqueeze(0).half().to(device)
435
 
436
  controlnet_model_path = "lllyasviel/control_v11f1p_sd15_depth"
437
+ controlnet = ControlNetModel.from_pretrained(controlnet_model_path, torch_dtype=torch_dtype, use_safetensors=True)
438
 
439
  generator = torch.Generator(device).manual_seed(seed)
440