George Krupenchenkov commited on
Commit
0135480
·
1 Parent(s): 03f037b

add hw6 markups

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -97,12 +97,16 @@ def infer(
97
  'height': height,
98
  'generator': generator,
99
  }
 
 
100
 
101
  if controlnet_enable:
 
102
  if control_mode == "canny":
103
  controlnet = ControlNetModel.from_pretrained("lllyasviel/control_v11p_sd15_canny",
104
  torch_dtype=torch_dtype, cache_dir="./models_cache")
105
- elif control_mode == "Line Art":
 
106
  controlnet = ControlNetModel.from_pretrained("lllyasviel/control_v11p_sd15_lineart",
107
  torch_dtype=torch_dtype, cache_dir="./models_cache")
108
 
@@ -116,6 +120,7 @@ def infer(
116
 
117
 
118
  else:
 
119
  pipe = StableDiffusionPipeline.from_pretrained(model_id,
120
  torch_dtype=torch_dtype,
121
  safety_checker=None) #.to(device)
 
97
  'height': height,
98
  'generator': generator,
99
  }
100
+
101
+ print("in infer 1")
102
 
103
  if controlnet_enable:
104
+ print("in controlnet_enable")
105
  if control_mode == "canny":
106
  controlnet = ControlNetModel.from_pretrained("lllyasviel/control_v11p_sd15_canny",
107
  torch_dtype=torch_dtype, cache_dir="./models_cache")
108
+
109
+ else control_mode == "Line Art":
110
  controlnet = ControlNetModel.from_pretrained("lllyasviel/control_v11p_sd15_lineart",
111
  torch_dtype=torch_dtype, cache_dir="./models_cache")
112
 
 
120
 
121
 
122
  else:
123
+ print("in infer 2")
124
  pipe = StableDiffusionPipeline.from_pretrained(model_id,
125
  torch_dtype=torch_dtype,
126
  safety_checker=None) #.to(device)