Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 使用图生图出现张量错误 #213

Open
2 tasks done
Tracked by #224 ...
DELSAO6 opened this issue Oct 12, 2023 · 2 comments
Open
2 tasks done
Tracked by #224 ...

[Bug]: 使用图生图出现张量错误 #213

DELSAO6 opened this issue Oct 12, 2023 · 2 comments

Comments

@DELSAO6
Copy link

DELSAO6 commented Oct 12, 2023

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits of both this extension and the webui

Have you read FAQ on README?

  • I have updated WebUI and this extension to the latest version

What happened?

图生图里使用AnimateDiff出现错误

Steps to reproduce the problem

启用tag样式的tag和文生图生成的图片放进图生图里生成动态图片,已开启Tiled VAE,AnimateDiff设置如下图
image

没有改动AnimateDiff截图之外的设置,可以说是AnimateDiff的默认值

What should have happened?

无报错

Commit where the problem happens

webui:
extension:
版本: v1.6.0  •  python: 3.10.11  •  torch: 2.0.0+cu118  •  xformers: N/A  •  gradio: 3.41.2  •  checkpoint: 29ac9522bf

What browsers do you use to access the UI ?

Microsoft Edge

Command Line Arguments

Launching Web UI with arguments: --medvram --theme light --opt-sdp-attention --no-half-vae --api --autolaunch

Console logs

Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Launching Web UI with arguments: --medvram --theme light --opt-sdp-attention --no-half-vae --api --autolaunch
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu.
Issue in parsing YAML file Billions_of_scenes.yaml
2023-10-12 21:24:44,475 - ControlNet - INFO - ControlNet v1.1.406
ControlNet preprocessor location: G:\sd-webui-aki-v4.4\extensions\sd-webui-controlnet\annotator\downloads
2023-10-12 21:24:44,654 - ControlNet - INFO - ControlNet v1.1.406
sd-webui-prompt-all-in-one background API service started successfully.
Loading weights [29ac9522bf] from G:\sd-webui-aki-v4.4\models\Stable-diffusion\自\急急急-kirk-M_v0.001.fp16.safetensors
Creating model from config: G:\sd-webui-aki-v4.4\configs\v1-inference.yaml
Running on local URL:  http://127.0.0.1:7860
Loading VAE weights specified in settings: G:\sd-webui-aki-v4.4\models\VAE\ClearVAE_V2.3.safetensors
Applying attention optimization: sdp... done.

To create a public link, set `share=True` in `launch()`.
[Lobe]: Initializing Lobe
Startup time: 22.0s (prepare environment: 5.4s, import torch: 4.1s, import gradio: 2.3s, setup paths: 1.1s, initialize shared: 0.3s, other imports: 1.0s, setup codeformer: 0.3s, list SD models: 0.2s, load scripts: 3.0s, create ui: 1.2s, gradio launch: 2.5s, add APIs: 0.5s, app_started_callback: 0.2s).
Model loaded in 4.5s (load weights from disk: 0.9s, create model: 0.4s, apply weights to model: 0.6s, load VAE: 1.2s, calculate empty prompt: 1.1s).
2023-10-12 21:27:53,000 - AnimateDiff - INFO - AnimateDiff process start.
2023-10-12 21:27:53,001 - AnimateDiff - INFO - You are using tested mm mm_sd_v15_v2.ckpt.
2023-10-12 21:27:53,001 - AnimateDiff - INFO - Loading motion module mm_sd_v15_v2.ckpt from G:\sd-webui-aki-v4.4\extensions\sd-webui-animatediff\model\mm_sd_v15_v2.ckpt
2023-10-12 21:27:56,112 - AnimateDiff - WARNING - Missing keys <All keys matched successfully>
2023-10-12 21:27:57,054 - AnimateDiff - INFO - Injecting motion module mm_sd_v15_v2.ckpt into SD1.5 UNet middle block.
2023-10-12 21:27:57,055 - AnimateDiff - INFO - Injecting motion module mm_sd_v15_v2.ckpt into SD1.5 UNet input blocks.
2023-10-12 21:27:57,055 - AnimateDiff - INFO - Injecting motion module mm_sd_v15_v2.ckpt into SD1.5 UNet output blocks.
2023-10-12 21:27:57,055 - AnimateDiff - INFO - Setting DDIM alpha.
2023-10-12 21:27:57,071 - AnimateDiff - INFO - Injection finished.
2023-10-12 21:27:57,071 - AnimateDiff - INFO - Hacking lora to support motion lora
2023-10-12 21:27:57,071 - AnimateDiff - INFO - Hacking CFGDenoiser forward function.
2023-10-12 21:27:57,072 - AnimateDiff - INFO - Hacking ControlNet.
INFO:sd_dynamic_prompts.dynamic_prompting:Prompt matrix will create 16 images in a total of 1 batches.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
2023-10-12 21:28:00,574 - AnimateDiff - INFO - Randomizing init_latent according to [1.0, 0.96875, 0.9375, 0.90625, 0.875, 0.84375, 0.8125, 0.78125].
*** Error running before_process_batch: G:\sd-webui-aki-v4.4\extensions\sd-webui-animatediff\scripts\animatediff.py
    Traceback (most recent call last):
      File "G:\sd-webui-aki-v4.4\modules\scripts.py", line 627, in before_process_batch
        script.before_process_batch(p, *script_args, **kwargs)
      File "G:\sd-webui-aki-v4.4\extensions\sd-webui-animatediff\scripts\animatediff.py", line 64, in before_process_batch
        AnimateDiffI2VLatent().randomize(p, params)
      File "G:\sd-webui-aki-v4.4\extensions\sd-webui-animatediff\scripts\animatediff_latent.py", line 84, in randomize
        p.init_latent = p.init_latent * init_alpha + p.rng.next() * (1 - init_alpha)
    RuntimeError: The size of tensor a (16) must match the size of tensor b (8) at non-singleton dimension 0
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

---
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
[Tiled VAE]: the input size is tiny and unnecessary to tile.
2023-10-12 21:30:09,465 - AnimateDiff - INFO - Restoring ControlNet.
2023-10-12 21:30:09,465 - AnimateDiff - INFO - Restoring CFGDenoiser forward function.
2023-10-12 21:30:09,465 - AnimateDiff - INFO - Restoring hacked lora
2023-10-12 21:30:09,465 - AnimateDiff - INFO - Restoring DDIM alpha.
2023-10-12 21:30:09,465 - AnimateDiff - INFO - Removing motion module from SD1.5 UNet input blocks.
2023-10-12 21:30:09,465 - AnimateDiff - INFO - Removing motion module from SD1.5 UNet output blocks.
2023-10-12 21:30:09,466 - AnimateDiff - INFO - Removing motion module from SD1.5 UNet middle block.
2023-10-12 21:30:09,466 - AnimateDiff - INFO - Removal finished.
2023-10-12 21:30:09,466 - AnimateDiff - INFO - Merging images into GIF.
2023-10-12 21:30:10,015 - AnimateDiff - INFO - AnimateDiff process end.

Additional information

No response

@jlpintado
Copy link

I have the same error, although I have updated the xformers. A curiosity, this error only appears if you use SD v15 v2, if you use SD v14 or SDV15, it will work but they have as much quality as SD v15 v2.

@continue-revolution continue-revolution mentioned this issue Oct 13, 2023
4 tasks
@continue-revolution
Copy link
Owner

continue-revolution commented Oct 16, 2023

Unfortunately, this could not be resolved in a short period of time because it is giving me NaN. Please either set number of frames to be 0 or greater than/equal to your context batch size. I cannot guarantee when this problem could be resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants