dvir-bria commited on
Commit
88a0805
1 Parent(s): 48401f8

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +2 -1
model.py CHANGED
@@ -90,6 +90,7 @@ class Model:
90
  gc.collect()
91
  model_id = CONTROLNET_MODEL_IDS[task_name]
92
  controlnet = ControlNetModel.from_pretrained(model_id, torch_dtype=torch.float16)
 
93
  controlnet.to(self.device)
94
  torch.cuda.empty_cache()
95
  gc.collect()
@@ -123,7 +124,7 @@ class Model:
123
  num_inference_steps=num_steps,
124
  generator=generator,
125
  image=control_image,
126
- ).images
127
 
128
 
129
  def resize_image(self, image):
 
90
  gc.collect()
91
  model_id = CONTROLNET_MODEL_IDS[task_name]
92
  controlnet = ControlNetModel.from_pretrained(model_id, torch_dtype=torch.float16)
93
+ print(f'Loaded {model_id}...')
94
  controlnet.to(self.device)
95
  torch.cuda.empty_cache()
96
  gc.collect()
 
124
  num_inference_steps=num_steps,
125
  generator=generator,
126
  image=control_image,
127
+ ).images[0]
128
 
129
 
130
  def resize_image(self, image):