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]: After I upgraded to 1.5, I downgraded to version 1.4.1 again. This BUG appears when drawing TypeError: 'NoneType' object is not callable #12090

Closed
1 task done
swumagic opened this issue Jul 27, 2023 · 9 comments
Labels
asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance sdxl Related to SDXL

Comments

@swumagic
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

[Bug]: After I upgraded to 1.5, I downgraded to version 1.4.1 again. This BUG appears when drawing TypeError: 'NoneType' object is not callable

Steps to reproduce the problem

[Bug]: After I upgraded to 1.5, I downgraded to version 1.4.1 again. This BUG appears when drawing TypeError: 'NoneType' object is not callable

What should have happened?

[Bug]: After I upgraded to 1.5, I downgraded to version 1.4.1 again. This BUG appears when drawing TypeError: 'NoneType' object is not callable

Version or Commit where the problem happens

1.4.1

What Python version are you running on ?

Python 3.10.x

What platforms do you use to access the UI ?

Windows

What device are you running WebUI on?

Nvidia GPUs (RTX 20 above)

Cross attention optimization

Automatic

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

[Bug]:   After I upgraded to 1.5, I downgraded to version 1.4.1 again. This BUG appears when drawing  TypeError: 'NoneType' object is not callable

List of extensions

[Bug]: After I upgraded to 1.5, I downgraded to version 1.4.1 again. This BUG appears when drawing TypeError: 'NoneType' object is not callable

Console logs

Traceback (most recent call last):
      File "K:\StableDiffusion\sdwebui\modules\call_queue.py", line 55, in f
        res = list(func(*args, **kwargs))
      File "K:\StableDiffusion\sdwebui\modules\call_queue.py", line 35, in f
        res = func(*args, **kwargs)
      File "K:\StableDiffusion\sdwebui\modules\txt2img.py", line 57, in txt2img
        processed = processing.process_images(p)
      File "K:\StableDiffusion\sdwebui\modules\processing.py", line 620, in process_images
        res = process_images_inner(p)
      File "K:\StableDiffusion\sdwebui\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 42, in processing_process_images_hijack
        return getattr(processing, '__controlnet_original_process_images_inner')(p, *args, **kwargs)
      File "K:\StableDiffusion\sdwebui\modules\processing.py", line 729, in process_images_inner
        p.setup_conds()
      File "K:\StableDiffusion\sdwebui\modules\processing.py", line 1126, in setup_conds
        super().setup_conds()
      File "K:\StableDiffusion\sdwebui\modules\processing.py", line 346, in setup_conds
        self.uc = self.get_conds_with_caching(prompt_parser.get_learned_conditioning, self.negative_prompts, self.steps * self.step_multiplier, [self.cached_uc], self.extra_network_data)
      File "K:\StableDiffusion\sdwebui\modules\processing.py", line 338, in get_conds_with_caching
        cache[1] = function(shared.sd_model, required_prompts, steps)
      File "K:\StableDiffusion\sdwebui\modules\prompt_parser.py", line 143, in get_learned_conditioning
        conds = model.get_learned_conditioning(texts)
      File "K:\StableDiffusion\sdwebui\repositories\stable-diffusion-stability-ai\ldm\models\diffusion\ddpm.py", line 669, in get_learned_conditioning
        c = self.cond_stage_model(c)
      File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "K:\StableDiffusion\sdwebui\modules\sd_hijack_clip.py", line 229, in forward
        z = self.process_tokens(tokens, multipliers)
      File "K:\StableDiffusion\sdwebui\modules\sd_hijack_clip.py", line 254, in process_tokens
        z = self.encode_with_transformers(tokens)
      File "K:\StableDiffusion\sdwebui\modules\sd_hijack_clip.py", line 302, in encode_with_transformers
        outputs = self.wrapped.transformer(input_ids=tokens, output_hidden_states=-opts.CLIP_stop_at_last_layers)
      File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\torch\nn\modules\module.py", line 1538, in _call_impl
        result = forward_call(*args, **kwargs)
      File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\transformers\models\clip\modeling_clip.py", line 822, in forward
        return self.text_model(
      File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\transformers\models\clip\modeling_clip.py", line 740, in forward
        encoder_outputs = self.encoder(
      File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\transformers\models\clip\modeling_clip.py", line 654, in forward
        layer_outputs = encoder_layer(
      File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\transformers\models\clip\modeling_clip.py", line 383, in forward
        hidden_states, attn_weights = self.self_attn(
      File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\transformers\models\clip\modeling_clip.py", line 272, in forward
        query_states = self.q_proj(hidden_states) * self.scale
      File "K:\StableDiffusion\sdwebui\py310\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "K:\StableDiffusion\sdwebui\extensions\stable-diffusion-webui-composable-lora\composable_lora.py", line 451, in lora_Linear_forward
        return lycoris.lyco_Linear_forward(self, input)
      File "K:\StableDiffusion\sdwebui\extensions\a1111-sd-webui-lycoris\lycoris.py", line 741, in lyco_Linear_forward
        return torch.nn.Linear_forward_before_lyco(self, input)
    TypeError: 'NoneType' object is not callable

Additional information

No response

@swumagic swumagic added the bug-report Report of a bug, yet to be confirmed label Jul 27, 2023
@w-e-w
Copy link
Collaborator

w-e-w commented Jul 27, 2023

remove lycoris not needed any more

@angrysky56
Copy link

Trying this now as it didn't upgrade after git pull- I didn't get any error messages but after working fine most of the day my positive prompts were being ignored using sdxl base though the styles still registered.

I just put this in my webui user bat-

git switch dev
git pull
@echo off

set PYTHON= "C:\Users\angry\anaconda3\python.exe"
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS= --lora-dir "D:\allmodels\loraoverflow" --embeddings-dir "D:\allmodels\embeddingsoverflow" --autolaunch --opt-sdp-attention --xformers --no-half-vae --api

call webui.bat

and it did this-

D:\automatic1111>git switch dev
Switched to a new branch 'dev'
M textual_inversion_templates/style.txt
M webui-user.bat
branch 'dev' set up to track 'origin/dev'.

From here-
#11757

I took the git switch dev out of the user bat and reloaded after removing controlnet and a few other extensions due to errors- The UI retained the updated version without it.
You may wish to take the advice in the link and just create a separate automatic1111 install for SDXL rather than fighting a bunch of extension errors.

Working on
arch: AMD64
cpu: AMD64 Family 25 Model 80 Stepping 0, AuthenticAMD
system: Windows
release: Windows-10-10.0.22621-SP0
python: 3.10.9
device: NVIDIA GeForce RTX 3060 (1) (compute_37) (8, 6)
cuda: 11.8
cudnn: 8700
driver: 536.40
2.0.1+cu118 autocast half
xformers: 0.0.20
diffusers: 0.16.1
transformers: 4.25.1
active: cuda
dtype: torch.float16
vae: torch.float32
unet: torch.float16

Prompt- cybernetic Jiminy Cricket
image

@swumagic
Copy link
Author

Tk you

@akx akx added the sdxl Related to SDXL label Jul 31, 2023
@IWDLACSWCAKT
Copy link

Same problem here, didn't fully understand

Trying this now as it didn't upgrade after git pull- I didn't get any error messages but after working fine most of the day my positive prompts were being ignored using sdxl base though the styles still registered.

I just put this in my webui user bat-

git switch dev git pull @echo off

set PYTHON= "C:\Users\angry\anaconda3\python.exe" set GIT= set VENV_DIR= set COMMANDLINE_ARGS= --lora-dir "D:\allmodels\loraoverflow" --embeddings-dir "D:\allmodels\embeddingsoverflow" --autolaunch --opt-sdp-attention --xformers --no-half-vae --api

call webui.bat

and it did this-

D:\automatic1111>git switch dev Switched to a new branch 'dev' M textual_inversion_templates/style.txt M webui-user.bat branch 'dev' set up to track 'origin/dev'.

From here- #11757

I took the git switch dev out of the user bat and reloaded after removing controlnet and a few other extensions due to errors- The UI retained the updated version without it. You may wish to take the advice in the link and just create a separate automatic1111 install for SDXL rather than fighting a bunch of extension errors.

Working on arch: AMD64 cpu: AMD64 Family 25 Model 80 Stepping 0, AuthenticAMD system: Windows release: Windows-10-10.0.22621-SP0 python: 3.10.9 device: NVIDIA GeForce RTX 3060 (1) (compute_37) (8, 6) cuda: 11.8 cudnn: 8700 driver: 536.40 2.0.1+cu118 autocast half xformers: 0.0.20 diffusers: 0.16.1 transformers: 4.25.1 active: cuda dtype: torch.float16 vae: torch.float32 unet: torch.float16

Prompt- cybernetic Jiminy Cricket image

but I'll try to do that once I have a little more time

@angrysky56
Copy link

Just put this in your webui-user.bat or .sh on Linux like in my post, not the way your comment changed it for some reason.

git switch dev
git pull

But you probably have some bad extensions too. I uninstalled controlnet and reinstalled it a few days later and it was fine, but why I was saying you might want to do a separate install of automatic1111 just for running SDXL.

@IWDLACSWCAKT
Copy link

Just put this in your webui-user.bat or .sh on Linux like in my post, not the way your comment changed it for some reason.

git switch dev git pull

But you probably have some bad extensions too. I uninstalled controlnet and reinstalled it a few days later and it was fine, but why I was saying you might want to do a separate install of automatic1111 just for running SDXL.

Yeah my problem started after I installed SDXL demo extension. Then I updated A1111 and all the rest of the extensions, tried deleting venv folder, disabling SDXL demo in extension tab and your fix but still I get pretty much what OP got and "TypeError: 'NoneType' object is not callable" at the very end.
In the UI it says "TypeError: 'NoneType' object is not callable

Time taken: 1.76s

Torch active/reserved: 471/508 MiB, Sys VRAM: 2063/11264 MiB (18.31%)"
But I doubt that is any help.

@angrysky56
Copy link

I never installed that, you don't need it, delete it. There are also new models and a VAE for sdxl specially made for Automatic1111 here. I suggest adding --no-half-vae to your command line args.

https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#sd-xl

@IWDLACSWCAKT
Copy link

I have no idea how to delete it but I'll try (Usually the extensions I install conveniently place themselves in a separate folder but this one seems to have gone all over the place, installing things)
I already have --no-half-vae but still no luck
I'll try seeing if I can manually find and delete everything that was installed from that XL demo extension

thank you for your help btw!

@angrysky56
Copy link

angrysky56 commented Aug 12, 2023

Np- i would just create a new folder for automatic1111 and grab your stuff (models, templates, styles etc) out of the broken one and get rid of the broken installation.

@catboxanon catboxanon added asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance and removed bug-report Report of a bug, yet to be confirmed labels Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance sdxl Related to SDXL
Projects
None yet
Development

No branches or pull requests

6 participants