continue-revolution / sd-webui-animatediff

AnimateDiff for AUTOMATIC1111 Stable Diffusion WebUI
Other
3.11k stars 258 forks source link

[Bug]: can not produce webp video #249

Closed davyzhang closed 1 year ago

davyzhang commented 1 year ago

Is there an existing issue for this?

Have you read FAQ on README?

What happened?

last step of creating webp video can not be complished

Steps to reproduce the problem

  1. choose output format to webp
  2. generate
  3. all files but not webp

What should have happened?

should produce webp vile

Commit where the problem happens

webui: https://github.com/AUTOMATIC1111/stable-diffusion-webui/releases/tag/v1.6.0 extension: https://github.com/continue-revolution/sd-webui-animatediff/commit/2f0e68d08028b0440a899c57dcfaf4972a5f0185

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

No

Console logs

2023-10-25 17:26:17,294 - AnimateDiff - INFO - Saving outputs/txt2img-images/AnimateDiff/00015-3476151360.webp with lossless=True and quality=80
*** Error running postprocess: C:\Tools\sd.webui\webui\extensions\sd-webui-animatediff\scripts\animatediff.py
    Traceback (most recent call last):
      File "C:\Tools\sd.webui\webui\modules\scripts.py", line 651, in postprocess
        script.postprocess(p, processed, *script_args)
      File "C:\Tools\sd.webui\webui\extensions\sd-webui-animatediff\scripts\animatediff.py", line 82, in postprocess
        AnimateDiffOutput().output(p, res, params)
      File "C:\Tools\sd.webui\webui\extensions\sd-webui-animatediff\scripts\animatediff_output.py", line 35, in output
        video_paths += self._save(params, video_list, video_path_prefix, res, i)
      File "C:\Tools\sd.webui\webui\extensions\sd-webui-animatediff\scripts\animatediff_output.py", line 233, in _save
        lossless=lossless, quality=quality, exif=exif_bytes
    UnboundLocalError: local variable 'exif_bytes' referenced before assignment

Additional information

No response

continue-revolution commented 1 year ago

@zappityzap

zappityzap commented 1 year ago

Sorry, I did not handle the case where saving PNG info is disabled in A1111. I'll submit a PR later today. As a workaround, enabling the setting "Save text information about generation parameters as chunks to png files" should allow saving WebP output.