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

TypeError: unsupported operand type(s) for +: 'NoneType' and 'Tensor' #11

Open
mariaWitch opened this issue Apr 29, 2023 · 3 comments
Open

Comments

@mariaWitch
Copy link

Currently receiving this error on Img2Img. Not sure what is causing it per se, but this was used in conjunction with Multi-diffusion's noise inversion, and Dynamic CFG when the error occured.

Error executing callback cfg_after_cfg_callback for /home/maria/stable-diffusion-webui/extensions/sd_webui_SAG/scripts/SAG.py
Traceback (most recent call last):
  File "/home/maria/stable-diffusion-webui/modules/script_callbacks.py", line 201, in cfg_after_cfg_callback
    c.callback(params)
  File "/home/maria/stable-diffusion-webui/extensions/sd_webui_SAG/scripts/SAG.py", line 242, in cfg_after_cfg_callback
    params.x = params.x + (current_uncond_pred - (current_degraded_pred + current_degraded_pred_compensation)) * float(current_sag_guidance_scale)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'Tensor'
@mariaWitch
Copy link
Author

mariaWitch commented Apr 29, 2023

Actually this seems to be a combination of different errors?
This might be hard to track down. Here are the other two I encountered. (I was able to trace it to Noise Inversion from Multi-Diffusion)

Error executing callback cfg_denoised_callback for /home/maria/stable-diffusion-webui/extensions/sd_webui_SAG/scripts/SAG.py
Traceback (most recent call last):
  File "/home/maria/stable-diffusion-webui/modules/script_callbacks.py", line 193, in cfg_denoised_callback
    c.callback(params)
  File "/home/maria/stable-diffusion-webui/extensions/sd_webui_SAG/scripts/SAG.py", line 214, in denoised_callback
    attn_mask.reshape(b, middle_layer_latent_size[0], middle_layer_latent_size[1])
RuntimeError: shape '[1, 16, 20]' is invalid for input of size 144

Error executing callback cfg_after_cfg_callback for /home/maria/stable-diffusion-webui/extensions/sd_webui_SAG/scripts/SAG.py
Traceback (most recent call last):
  File "/home/maria/stable-diffusion-webui/modules/script_callbacks.py", line 201, in cfg_after_cfg_callback
    c.callback(params)
  File "/home/maria/stable-diffusion-webui/extensions/sd_webui_SAG/scripts/SAG.py", line 242, in cfg_after_cfg_callback
    params.x = params.x + (current_uncond_pred - (current_degraded_pred + current_degraded_pred_compensation)) * float(current_sag_guidance_scale)
RuntimeError: The size of tensor a (160) must match the size of tensor b (80) at non-singleton dimension 3

@Razunter
Copy link

Razunter commented May 7, 2023

Just started to get this error in txt2img with Vladmandic's fork
Getting this error with inpainting model selected.

@Elevory
Copy link

Elevory commented May 8, 2023

I'm also getting this error with inpainting models.

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