ozgurkara commited on
Commit
d54a043
·
1 Parent(s): 6bdcc32
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -149,8 +149,8 @@ def run(*args):
149
  else:
150
  res_vid, control_vid = CN(input_dict)
151
  end_time = datetime.datetime.now()
152
- res_vid = [x[2:-2, 2:-2].resize((x.size[0], x.size[1])) for x in res_vid]
153
- control_vid = [x[2:-2, 2:-2].resize((x.size[0], x.size[1])) for x in control_vid]
154
  save_name = f"{'-'.join(input_ns.positive_prompts.split())}_cstart-{input_ns.controlnet_guidance_start}_gs-{input_ns.guidance_scale}_pre-{'-'.join((input_ns.preprocess_name.replace('-','+').split('_')))}_cscale-{input_ns.controlnet_conditioning_scale}_grid-{input_ns.grid_size}_pad-{input_ns.pad}_model-{os.path.basename(input_ns.model_id)}"
155
  res_vid[0].save(os.path.join(input_ns.save_path, f'{save_name}.gif'), save_all=True, append_images=res_vid[1:], loop=10000)
156
  control_vid[0].save(os.path.join(input_ns.save_path, f'control_{save_name}.gif'), save_all=True, append_images=control_vid[1:], optimize=False, loop=10000)
 
149
  else:
150
  res_vid, control_vid = CN(input_dict)
151
  end_time = datetime.datetime.now()
152
+ # res_vid = [x.crop() .resize((x.size[0], x.size[1])) for x in res_vid]
153
+ # control_vid = [x[2:-2, 2:-2].resize((x.size[0], x.size[1])) for x in control_vid]
154
  save_name = f"{'-'.join(input_ns.positive_prompts.split())}_cstart-{input_ns.controlnet_guidance_start}_gs-{input_ns.guidance_scale}_pre-{'-'.join((input_ns.preprocess_name.replace('-','+').split('_')))}_cscale-{input_ns.controlnet_conditioning_scale}_grid-{input_ns.grid_size}_pad-{input_ns.pad}_model-{os.path.basename(input_ns.model_id)}"
155
  res_vid[0].save(os.path.join(input_ns.save_path, f'{save_name}.gif'), save_all=True, append_images=res_vid[1:], loop=10000)
156
  control_vid[0].save(os.path.join(input_ns.save_path, f'control_{save_name}.gif'), save_all=True, append_images=control_vid[1:], optimize=False, loop=10000)