fix i2ibatch (#258)

* fix i2ibatch

* remove print
pull/269/head
Chengsong Zhang 2023-10-28 20:58:06 -05:00 committed by GitHub
parent 80d9f5df1a
commit 16b1781f96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

4
.gitignore vendored
View File

@ -1,4 +1,4 @@
__pycache__
model/*.ckpt
model/*.pth
model/*.*
model/*.*
TODO.md

View File

@ -182,7 +182,10 @@ class AnimateDiffI2IBatch:
if p.scripts:
for script in p.scripts.alwayson_scripts:
if script.title().lower() == "animatediff":
p._animatediff_i2i_batch = 1 # i2i-batch mode, ordinary
ad_arg = p.script_args[script.args_from]
ad_enabled = ad_arg.get('enable', False) if isinstance(ad_arg, dict) else getattr(ad_arg, 'enable', False)
if ad_enabled:
p._animatediff_i2i_batch = 1 # i2i-batch mode, ordinary
if not hasattr(p, '_animatediff_i2i_batch'):
return original_img2img_process_batch(p, input_dir, output_dir, inpaint_mask_dir, args, to_scale, scale_by, use_png_info, png_info_props, png_info_dir)