Panchovix / stable-diffusion-webui-reForge

GNU Affero General Public License v3.0
351 stars 17 forks source link

[Bug]: TypeError: 'str' object is not callable #89

Closed PaulZ0 closed 3 months ago

PaulZ0 commented 3 months ago

Checklist

What happened?

Generating images using the Euler A Turbo sampler results in this error. This also happens for the other Turbo samples as well as the recently added Comfy samplers.

Log: https://pastebin.com/YriT3SAD

Steps to reproduce the problem

  1. Generate an image using a Turbo / Comfy sampler.

What should have happened?

It should generate the image without any errors.

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

sysinfo-2024-07-31-03-24.json

Console logs

Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: f1.0.0dev-v1.10.1RC-latest-896-g8182c47c
Commit hash: 8182c47c127b7f5ec91ffabff4f33a050406e8b2
Launching Web UI with arguments: --cuda-stream --cuda-malloc --xformers --enable-insecure-extension-access --disable-nan-check --theme dark --styles-file=C:/Users/user/Desktop/sd/files/configs/styles.csv --no-hashing --skip-version-check --skip-torch-cuda-test --disable-safe-unpickle --ckpt-dir=C:/Users/user/Desktop/sd/files/checkpoints --vae-dir=C:/Users/user/Desktop/sd/files/vae --esrgan-models-path=C:/Users/user/Desktop/sd/files/misc/ESRGAN --lora-dir=C:/Users/user/Desktop/sd/files/loras --embeddings-dir=C:/Users/user/Desktop/sd/files/misc/embeddings --ui-config-file=C:/Users/user/Desktop/sd/files/configs/ui-config.json --ui-settings-file=C:/Users/user/Desktop/sd/files/configs/config.json
Using cudaMallocAsync backend.
Total VRAM 6144 MB, total RAM 31957 MB
xformers version: 0.0.23.post1
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3060 Laptop GPU : cudaMallocAsync
Hint: your device supports --pin-shared-memory for potential speed improvements.
VAE dtype: torch.bfloat16
CUDA Stream Activated:  True
*** "Disable all extensions" option was set, will not load any extensions ***
Loading model Turbo - AutismMix.safetensors (1 out of 1)
Loading weights [None] from C:\Users\user\Desktop\sd\files\checkpoints\Turbo - AutismMix.safetensors
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 15.0s (prepare environment: 0.7s, import torch: 7.8s, import gradio: 1.3s, setup paths: 1.3s, initialize shared: 0.4s, other imports: 1.0s, list SD models: 0.2s, load scripts: 1.2s, create ui: 0.7s, gradio launch: 0.2s).
clip missing: ['clip_l.text_projection', 'clip_l.logit_scale', 'clip_g.text_projection', 'clip_g.transformer.text_model.embeddings.position_ids']
clip unexpected: ['clip_g.transformer.text_projection.weight']
To load target model SDXLClipModel
Begin to load 1 model
[Memory Management] Current Free GPU Memory (MB) =  5106.697357177734
[Memory Management] Model Memory (MB) =  2144.3546981811523
[Memory Management] Minimal Inference Memory (MB) =  1024.0
[Memory Management] Estimated Remaining GPU Memory (MB) =  1938.342658996582
Moving model(s) has taken 0.47 seconds
Model loaded in 12.7s (calculate hash: 0.2s, load weights from disk: 6.7s, forge load real models: 4.1s, load textual inversion embeddings: 0.7s, calculate empty prompt: 0.9s).

txt2img: a penguins surfing a giant wave
WARNING:root:Sampler Scheduler autocorrection: "Euler A Turbo" -> "Euler A Turbo", "Automatic" -> "Normal"
  0%|                                                                                                                                              | 0/10 [00:01<?, ?it/s]
Traceback (most recent call last):                                                                                                                 | 0/10 [00:00<?, ?it/s]
  File "C:\Users\user\Desktop\stable-diffusion-webui-forge\modules_forge\main_thread.py", line 37, in loop
    task.work()
  File "C:\Users\user\Desktop\stable-diffusion-webui-forge\modules_forge\main_thread.py", line 26, in work
    self.result = self.func(*self.args, **self.kwargs)
  File "C:\Users\user\Desktop\stable-diffusion-webui-forge\modules\txt2img.py", line 110, in txt2img_function
    processed = processing.process_images(p)
  File "C:\Users\user\Desktop\stable-diffusion-webui-forge\modules\processing.py", line 820, in process_images
    res = process_images_inner(p)
  File "C:\Users\user\Desktop\stable-diffusion-webui-forge\modules\processing.py", line 969, in process_images_inner
    samples_ddim = p.sample(conditioning=p.c, unconditional_conditioning=p.uc, seeds=p.seeds, subseeds=p.subseeds, subseed_strength=p.subseed_strength, prompts=p.prompts)
  File "C:\Users\user\Desktop\stable-diffusion-webui-forge\modules\processing.py", line 1340, in sample
    samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x))
  File "C:\Users\user\Desktop\stable-diffusion-webui-forge\modules_forge\forge_alter_samplers.py", line 124, in sample
    return super().sample(p, x, conditioning, unconditional_conditioning, steps, image_conditioning)
  File "C:\Users\user\Desktop\stable-diffusion-webui-forge\modules\sd_samplers_kdiffusion.py", line 261, in sample
    samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, **extra_params_kwargs))
  File "C:\Users\user\Desktop\stable-diffusion-webui-forge\modules\sd_samplers_common.py", line 274, in launch_sampling
    return func()
  File "C:\Users\user\Desktop\stable-diffusion-webui-forge\modules\sd_samplers_kdiffusion.py", line 261, in <lambda>
    samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, **extra_params_kwargs))
  File "C:\Users\user\Desktop\stable-diffusion-webui-forge\venv\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "C:\Users\user\Desktop\stable-diffusion-webui-forge\ldm_patched\k_diffusion\sampling.py", line 501, in sample_euler_ancestral
    x = x + noise_sampler(sigmas[i], sigmas[i + 1]) * s_noise * sigma_up
TypeError: 'str' object is not callable
'str' object is not callable
*** Error completing request
*** Arguments: ('task(vhq5n9uho7c61kn)', <gradio.routes.Request object at 0x000000007A5593F0>, 'a penguins surfing a giant wave', '', [], 1, 1, 2.5, 1024, 1024, False, 0.6, 1.25, 'Latent', 15, 0, 0, 'Use same checkpoint', 'Use same sampler', 'Use same scheduler', '', '', [], 0, 10, 'Euler A Turbo', 'Automatic', False, '', 0.8, -1, False, -1, 0, 0, 0, False, False, 'positive', 'comma', 0, False, False, 'start', '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, False, False, False, 0, False) {}
    Traceback (most recent call last):
      File "C:\Users\user\Desktop\stable-diffusion-webui-forge\modules\call_queue.py", line 74, in f
        res = list(func(*args, **kwargs))
    TypeError: 'NoneType' object is not iterable

Additional information

No response

Panchovix commented 3 months ago

Hi there, yeah just noticed! Pushed a commit that fixes this. My bad!

https://github.com/Panchovix/stable-diffusion-webui-reForge/commit/aac1888800fd72cf8a03e3b590a00b3ebc4fc47a

https://github.com/Panchovix/stable-diffusion-webui-reForge/commit/12f4b8cd389ab60753c4b26830fdd441e98e412e