Spaces:
Running
on
A10G
Running
on
A10G
bug fix
Browse files
app.py
CHANGED
@@ -149,6 +149,8 @@ def run(*args):
|
|
149 |
else:
|
150 |
res_vid, control_vid = CN(input_dict)
|
151 |
end_time = datetime.datetime.now()
|
|
|
|
|
152 |
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)}"
|
153 |
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)
|
154 |
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[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)
|