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]: Negative Prompt Weight extension is not working due to 'NoneType' object is not iterable" #194

Open
3 of 6 tasks
WardCraft opened this issue Dec 3, 2024 · 3 comments

Comments

@WardCraft
Copy link

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

The negative prompt extension for "stable-diffusion-NPW" only worked at generating image if I left it at the value of 1 by default but anytime I change the value around more or less, it gives me the TypeError that I could not still not comprehend. I don't really understand what is causing behind all this.

Some people suggest to include --no-half-precision VAE --disable-nan-check --no-half but it doesn't work for me. Some suggest to change VAE with existing module and not leave it as none or automatic. I also changed the resolution beyond 512. Still nothing.

I tried uninstalling and reinstalling the clean Webui up to this current version (40010f7) and redownload the extension again. It's still giving me the same issue.

Steps to reproduce the problem

  1. I set my command line as prequesite before launching WebUI: --reinstall-torch --xformers --api --upcast-sampling --opt-channelslast --opt-split-attention --enable-insecure-extension-access --disable-nan-check --no-half --No-half-precision VAE --cuda-stream --cuda-malloc --pinshared-memory
    2 Fresh Negative Prompt download extension, applied and quit. Then restarted the WebUI through Stability Matrix.
    3.On text-to-image or Image to image, I made sure to include the positive and negative prompt to fill the blank
  2. I set my sampling usually at DPM++2M or DDIM
  3. Changed the image resolution usually around 1024 x 680 with the help of aspect helper extension
  4. I left batch count and size to 1
  5. CFG scale to 7
  6. Changed the SD VAE to sdxlVAE_sdxlVAE.safetensors
  7. My checkpoint is set to autismmixSDXL_autismmixPony.safetensors
  8. Finally change the Negative Prompt Slider from default

What should have happened?

It should be able to complete the process of generating AI images

What browsers do you use to access the UI ?

Microsoft Edge

Sysinfo

sysinfo-2024-12-03-03-51.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.1.0-v1.10.1RC-latest-836-g40010f71
Commit hash: 40010f7146d5cce857be8198f100a493cde76fe5
Installing torch and torchvision
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu121
Requirement already satisfied: torch==2.3.1 in f:\ai-stable diffusion\stability matrix\data\packages\stable-diffusion-webui-reforge\venv\lib\site-packages (2.3.1+cu121)
Requirement already satisfied: torchvision==0.18.1 in f:\ai-stable diffusion\stability matrix\data\packages\stable-diffusion-webui-reforge\venv\lib\site-packages (0.18.1+cu121)
Requirement already satisfied: filelock in f:\ai-stable diffusion\stability matrix\data\packages\stable-diffusion-webui-reforge\venv\lib\site-packages (from torch==2.3.1) (3.16.1)
Requirement already satisfied: typing-extensions>=4.8.0 in f:\ai-stable diffusion\stability matrix\data\packages\stable-diffusion-webui-reforge\venv\lib\site-packages (from torch==2.3.1) (4.12.2)
Requirement already satisfied: sympy in f:\ai-stable diffusion\stability matrix\data\packages\stable-diffusion-webui-reforge\venv\lib\site-packages (from torch==2.3.1) (1.13.3)
Requirement already satisfied: networkx in f:\ai-stable diffusion\stability matrix\data\packages\stable-diffusion-webui-reforge\venv\lib\site-packages (from torch==2.3.1) (3.4.2)
Requirement already satisfied: jinja2 in f:\ai-stable diffusion\stability matrix\data\packages\stable-diffusion-webui-reforge\venv\lib\site-packages (from torch==2.3.1) (3.1.4)
Requirement already satisfied: fsspec in f:\ai-stable diffusion\stability matrix\data\packages\stable-diffusion-webui-reforge\venv\lib\site-packages (from torch==2.3.1) (2024.10.0)
Requirement already satisfied: mkl<=2021.4.0,>=2021.1.1 in f:\ai-stable diffusion\stability matrix\data\packages\stable-diffusion-webui-reforge\venv\lib\site-packages (from torch==2.3.1) (2021.4.0)
Requirement already satisfied: numpy in f:\ai-stable diffusion\stability matrix\data\packages\stable-diffusion-webui-reforge\venv\lib\site-packages (from torchvision==0.18.1) (1.26.2)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in f:\ai-stable diffusion\stability matrix\data\packages\stable-diffusion-webui-reforge\venv\lib\site-packages (from torchvision==0.18.1) (9.5.0)
Requirement already satisfied: intel-openmp==2021.* in f:\ai-stable diffusion\stability matrix\data\packages\stable-diffusion-webui-reforge\venv\lib\site-packages (from mkl<=2021.4.0,>=2021.1.1->torch==2.3.1) (2021.4.0)
Requirement already satisfied: tbb==2021.* in f:\ai-stable diffusion\stability matrix\data\packages\stable-diffusion-webui-reforge\venv\lib\site-packages (from mkl<=2021.4.0,>=2021.1.1->torch==2.3.1) (2021.13.1)
Requirement already satisfied: MarkupSafe>=2.0 in f:\ai-stable diffusion\stability matrix\data\packages\stable-diffusion-webui-reforge\venv\lib\site-packages (from jinja2->torch==2.3.1) (2.1.5)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in f:\ai-stable diffusion\stability matrix\data\packages\stable-diffusion-webui-reforge\venv\lib\site-packages (from sympy->torch==2.3.1) (1.3.0)
F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\extensions-builtin\forge_legacy_preprocessors\install.py:2: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\extensions-builtin\sd_forge_controlnet\install.py:2: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
Launching Web UI with arguments: --pin-shared-memory --cuda-malloc --cuda-stream --no-half-vae --reinstall-torch --xformers --api --upcast-sampling --opt-channelslast --opt-split-attention --enable-insecure-extension-access --disable-nan-check --no-half --gradio-allowed-path 'F:\Ai-Stable Diffusion\Stability Matrix\Data\Images'
Using cudaMallocAsync backend.
Total VRAM 8192 MB, total RAM 32472 MB
WARNING:xformers:A matching Triton is not available, some optimizations will not be enabled
Traceback (most recent call last):
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\venv\lib\site-packages\xformers\__init__.py", line 57, in _is_triton_available
    import triton  # noqa
ModuleNotFoundError: No module named 'triton'
xformers version: 0.0.27
Set vram state to: NORMAL_VRAM
Always pin shared GPU memory
Device: cuda:0 NVIDIA GeForce RTX 3070 Laptop GPU : cudaMallocAsync
VAE dtype: torch.bfloat16
CUDA Stream Activated:  True
F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\venv\lib\site-packages\transformers\utils\hub.py:127: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.
  warnings.warn(
F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\venv\lib\site-packages\timm\models\layers\__init__.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers
  warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.layers", FutureWarning)
Using xformers cross attention
ControlNet preprocessor location: F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\models\ControlNetPreprocessor
F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\venv\lib\site-packages\diffusers\models\transformers\transformer_2d.py:34: FutureWarning: `Transformer2DModelOutput` is deprecated and will be removed in version 1.0.0. Importing `Transformer2DModelOutput` from `diffusers.models.transformer_2d` is deprecated and this will be removed in a future version. Please use `from diffusers.models.modeling_outputs import Transformer2DModelOutput`, instead.
  deprecate("Transformer2DModelOutput", "1.0.0", deprecation_message)
[-] ADetailer initialized. version: 24.11.1, num models: 10
F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\venv\lib\site-packages\timm\models\registry.py:4: FutureWarning: Importing from timm.models.registry is deprecated, please import via timm.models
  warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.models", FutureWarning)
Loading model sd\SDXL\autismmixSDXL_autismmixPony.safetensors [821aa5537f] (1 of 1)
Loading weights [821aa5537f] from F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\models\Stable-diffusion\sd\SDXL\autismmixSDXL_autismmixPony.safetensors
2024-12-02 23:13:15,519 - ControlNet - INFO - ControlNet UI callback registered.
model_type EPS
UNet ADM Dimension 2816
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 22.7s (prepare environment: 9.4s, import torch: 3.3s, import gradio: 0.7s, setup paths: 1.0s, initialize shared: 0.2s, other imports: 0.5s, list SD models: 0.4s, load scripts: 2.7s, create ui: 2.7s, gradio launch: 0.9s, add APIs: 0.9s).
Using xformers attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using xformers attention in VAE
extra {'cond_stage_model.clip_l.logit_scale', 'cond_stage_model.clip_l.text_projection'}
left over keys: dict_keys(['cond_stage_model.clip_l.transformer.text_model.embeddings.position_ids'])
Loading VAE weights specified in settings: F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\models\VAE\sdxlVAE_sdxlVAE.safetensors
To load target model SDXLClipModel
Begin to load 1 model
[Memory Management] Current Free GPU Memory (MB) =  7105.996185302734
[Memory Management] Model Memory (MB) =  2144.3535232543945
[Memory Management] Minimal Inference Memory (MB) =  1024.0
[Memory Management] Estimated Remaining GPU Memory (MB) =  3937.64266204834
Moving model(s) has taken 0.33 seconds
Model sd\SDXL\autismmixSDXL_autismmixPony.safetensors [821aa5537f] loaded in 9.8s (load weights from disk: 0.3s, forge instantiate config: 1.6s, forge load real models: 7.0s, load VAE: 0.2s, calculate empty prompt: 0.6s).

ATTENTION: Negative prompt weight is set to 0.75
To load target model SDXL:00, ?it/s]
Begin to load 1 model
[Memory Management] Current Free GPU Memory (MB) =  7038.059499740601
[Memory Management] Model Memory (MB) =  4897.086494445801
[Memory Management] Minimal Inference Memory (MB) =  1024.0
[Memory Management] Estimated Remaining GPU Memory (MB) =  1116.9730052947998
Moving model(s) has taken 1.94 seconds
  0%|          | 0/25 [00:00<?, ?it/s]To load target model SDXLClipModel
Begin to load 1 model
[Memory Management] Current Free GPU Memory (MB) =  7036.668767929077
[Memory Management] Model Memory (MB) =  2144.3535232543945
[Memory Management] Minimal Inference Memory (MB) =  1024.0
[Memory Management] Estimated Remaining GPU Memory (MB) =  3868.3152446746826
Moving model(s) has taken 1.28 seconds
  0%|          | 0/25 [00:01<?, ?it/s]
Traceback (most recent call last):
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\modules_forge\main_thread.py", line 37, in loop
    task.work()
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\modules_forge\main_thread.py", line 26, in work
    self.result = self.func(*self.args, **self.kwargs)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\modules\txt2img.py", line 114, in txt2img_function
    processed = processing.process_images(p)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\modules\processing.py", line 823, in process_images
    res = process_images_inner(p)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\modules\processing.py", line 981, 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 "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\modules\processing.py", line 1356, in sample
    samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x))
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\modules\sd_samplers_kdiffusion.py", line 295, 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 "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\modules\sd_samplers_common.py", line 280, in launch_sampling
    return func()
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\modules\sd_samplers_kdiffusion.py", line 295, 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 "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\venv\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\repositories\k-diffusion\k_diffusion\sampling.py", line 594, in sample_dpmpp_2m
    denoised = model(x, sigmas[i] * s_in, **extra_args)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\venv\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\venv\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\modules\sd_samplers_cfg_denoiser.py", line 228, in forward
    denoised = sampling_function(model, x, sigma, uncond_patched, cond_patched, cond_scale, model_options, seed)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\ldm_patched\modules\samplers.py", line 299, in sampling_function
    cond_pred, uncond_pred = calc_cond_uncond_batch(model, cond, uncond_, x, timestep, model_options)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\ldm_patched\modules\samplers.py", line 262, in calc_cond_uncond_batch
    output = model.apply_model(input_x, timestep_, **c).chunk(batch_chunks)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\ldm_patched\modules\model_base.py", line 90, in apply_model
    model_output = self.diffusion_model(xc, t, context=context, control=control, transformer_options=transformer_options, **extra_conds).float()
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\venv\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\venv\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\ldm_patched\ldm\modules\diffusionmodules\openaimodel.py", line 873, in forward
    emb = self.time_embed(t_emb)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\venv\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\venv\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\venv\lib\site-packages\torch\nn\modules\container.py", line 217, in forward
    input = module(input)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\venv\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\venv\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\ldm_patched\modules\ops.py", line 98, in forward
    return super().forward(*args, **kwargs)
  File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\venv\lib\site-packages\torch\nn\modules\linear.py", line 116, in forward
    return F.linear(input, self.weight, self.bias)
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument mat1 in method wrapper_CUDA_addmm)
Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument mat1 in method wrapper_CUDA_addmm)
*** Error completing request
*** Arguments: ('task(s0hiv1jvd9un48h)', <gradio.routes.Request object at 0x00000200141ECC10>, 'castle, tall pillar, citadel,  waterfall, terrain', 'small building, wasteland, people, night', [], 1, 1, 7, 680, 1024, True, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', 'Use same scheduler', '', '', [], 0, 25, 'DPM++ 2M', 'Automatic', False, '', 0.8, -1, False, -1, 0, 0, 0, False, False, False, 'SDXL', '', 'Equal Weights', 832, 1216, False, False, {'ad_model': 'face_yolov8n.pt', 'ad_model_classes': '', 'ad_tab_enable': True, 'ad_prompt': '', 'ad_negative_prompt': '', 'ad_confidence': 0.3, 'ad_mask_filter_method': 'Area', 'ad_mask_k': 0, 'ad_mask_min_ratio': 0, 'ad_mask_max_ratio': 1, 'ad_x_offset': 0, 'ad_y_offset': 0, 'ad_dilate_erode': 4, 'ad_mask_merge_invert': 'None', 'ad_mask_blur': 4, 'ad_denoising_strength': 0.4, 'ad_inpaint_only_masked': True, 'ad_inpaint_only_masked_padding': 32, 'ad_use_inpaint_width_height': False, 'ad_inpaint_width': 512, 'ad_inpaint_height': 512, 'ad_use_steps': False, 'ad_steps': 28, 'ad_use_cfg_scale': False, 'ad_cfg_scale': 7, 'ad_use_checkpoint': False, 'ad_checkpoint': 'Use same checkpoint', 'ad_use_vae': False, 'ad_vae': 'Use same VAE', 'ad_use_sampler': False, 'ad_sampler': 'DPM++ 2M', 'ad_scheduler': 'Use same scheduler', 'ad_use_noise_multiplier': False, 'ad_noise_multiplier': 1, 'ad_use_clip_skip': False, 'ad_clip_skip': 1, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_module': 'None', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, {'ad_model': 'None', 'ad_model_classes': '', 'ad_tab_enable': True, 'ad_prompt': '', 'ad_negative_prompt': '', 'ad_confidence': 0.3, 'ad_mask_filter_method': 'Area', 'ad_mask_k': 0, 'ad_mask_min_ratio': 0, 'ad_mask_max_ratio': 1, 'ad_x_offset': 0, 'ad_y_offset': 0, 'ad_dilate_erode': 4, 'ad_mask_merge_invert': 'None', 'ad_mask_blur': 4, 'ad_denoising_strength': 0.4, 'ad_inpaint_only_masked': True, 'ad_inpaint_only_masked_padding': 32, 'ad_use_inpaint_width_height': False, 'ad_inpaint_width': 512, 'ad_inpaint_height': 512, 'ad_use_steps': False, 'ad_steps': 28, 'ad_use_cfg_scale': False, 'ad_cfg_scale': 7, 'ad_use_checkpoint': False, 'ad_checkpoint': 'Use same checkpoint', 'ad_use_vae': False, 'ad_vae': 'Use same VAE', 'ad_use_sampler': False, 'ad_sampler': 'DPM++ 2M', 'ad_scheduler': 'Use same scheduler', 'ad_use_noise_multiplier': False, 'ad_noise_multiplier': 1, 'ad_use_clip_skip': False, 'ad_clip_skip': 1, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_module': 'None', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, {'ad_model': 'None', 'ad_model_classes': '', 'ad_tab_enable': True, 'ad_prompt': '', 'ad_negative_prompt': '', 'ad_confidence': 0.3, 'ad_mask_filter_method': 'Area', 'ad_mask_k': 0, 'ad_mask_min_ratio': 0, 'ad_mask_max_ratio': 1, 'ad_x_offset': 0, 'ad_y_offset': 0, 'ad_dilate_erode': 4, 'ad_mask_merge_invert': 'None', 'ad_mask_blur': 4, 'ad_denoising_strength': 0.4, 'ad_inpaint_only_masked': True, 'ad_inpaint_only_masked_padding': 32, 'ad_use_inpaint_width_height': False, 'ad_inpaint_width': 512, 'ad_inpaint_height': 512, 'ad_use_steps': False, 'ad_steps': 28, 'ad_use_cfg_scale': False, 'ad_cfg_scale': 7, 'ad_use_checkpoint': False, 'ad_checkpoint': 'Use same checkpoint', 'ad_use_vae': False, 'ad_vae': 'Use same VAE', 'ad_use_sampler': False, 'ad_sampler': 'DPM++ 2M', 'ad_scheduler': 'Use same scheduler', 'ad_use_noise_multiplier': False, 'ad_noise_multiplier': 1, 'ad_use_clip_skip': False, 'ad_clip_skip': 1, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_module': 'None', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, {'ad_model': 'None', 'ad_model_classes': '', 'ad_tab_enable': True, 'ad_prompt': '', 'ad_negative_prompt': '', 'ad_confidence': 0.3, 'ad_mask_filter_method': 'Area', 'ad_mask_k': 0, 'ad_mask_min_ratio': 0, 'ad_mask_max_ratio': 1, 'ad_x_offset': 0, 'ad_y_offset': 0, 'ad_dilate_erode': 4, 'ad_mask_merge_invert': 'None', 'ad_mask_blur': 4, 'ad_denoising_strength': 0.4, 'ad_inpaint_only_masked': True, 'ad_inpaint_only_masked_padding': 32, 'ad_use_inpaint_width_height': False, 'ad_inpaint_width': 512, 'ad_inpaint_height': 512, 'ad_use_steps': False, 'ad_steps': 28, 'ad_use_cfg_scale': False, 'ad_cfg_scale': 7, 'ad_use_checkpoint': False, 'ad_checkpoint': 'Use same checkpoint', 'ad_use_vae': False, 'ad_vae': 'Use same VAE', 'ad_use_sampler': False, 'ad_sampler': 'DPM++ 2M', 'ad_scheduler': 'Use same scheduler', 'ad_use_noise_multiplier': False, 'ad_noise_multiplier': 1, 'ad_use_clip_skip': False, 'ad_clip_skip': 1, 'ad_restore_face': False, 'ad_controlnet_model': 'None', 'ad_controlnet_module': 'None', 'ad_controlnet_weight': 1, 'ad_controlnet_guidance_start': 0, 'ad_controlnet_guidance_end': 1, 'is_api': ()}, 0.75, ControlNetUnit(input_mode=<InputMode.SIMPLE: 'simple'>, use_preview_as_input=False, batch_image_dir='', batch_mask_dir='', batch_input_gallery=[], batch_mask_gallery=[], multi_inputs_gallery=[], generated_image=None, mask_image=None, hr_option=<HiResFixOption.BOTH: 'Both'>, enabled=False, module='None', model='None', weight=1, image=None, resize_mode=<ResizeMode.INNER_FIT: 'Crop and Resize'>, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode=<ControlMode.BALANCED: 'Balanced'>, advanced_weighting=None, save_detected_map=True), ControlNetUnit(input_mode=<InputMode.SIMPLE: 'simple'>, use_preview_as_input=False, batch_image_dir='', batch_mask_dir='', batch_input_gallery=[], batch_mask_gallery=[], multi_inputs_gallery=[], generated_image=None, mask_image=None, hr_option=<HiResFixOption.BOTH: 'Both'>, enabled=False, module='None', model='None', weight=1, image=None, resize_mode=<ResizeMode.INNER_FIT: 'Crop and Resize'>, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode=<ControlMode.BALANCED: 'Balanced'>, advanced_weighting=None, save_detected_map=True), ControlNetUnit(input_mode=<InputMode.SIMPLE: 'simple'>, use_preview_as_input=False, batch_image_dir='', batch_mask_dir='', batch_input_gallery=[], batch_mask_gallery=[], multi_inputs_gallery=[], generated_image=None, mask_image=None, hr_option=<HiResFixOption.BOTH: 'Both'>, enabled=False, module='None', model='None', weight=1, image=None, resize_mode=<ResizeMode.INNER_FIT: 'Crop and Resize'>, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode=<ControlMode.BALANCED: 'Balanced'>, advanced_weighting=None, save_detected_map=True), False, False, 7, 1, 'Constant', 0, 'Constant', 0, 1, 'enable', 'MEAN', 'AD', 1, False, 1.01, 1.02, 0.99, 0.95, False, 0.5, 2, False, 256, 2, 0, False, False, 3, 2, 0, 0.35, True, 'bicubic', 'bicubic', False, 0.5, 0.18, 15, 1, False, 5.42, 0.28, False, 0.7, False, 'Discrete', 'v_prediction', True, 'v_prediction', 120, 0.002, False, 'MultiDiffusion', 768, 768, 64, 4, False, False, False, False, 'positive', 'comma', 0, False, False, 'start', '', 1, '', [], 0, '', [], 0, '', [], True, False, 0, False, False, False, False, False, False, 0, False) {}
    Traceback (most recent call last):
      File "F:\Ai-Stable Diffusion\Stability Matrix\Data\Packages\stable-diffusion-webui-reForge\modules\call_queue.py", line 74, in f
        res = list(func(*args, **kwargs))
    TypeError: 'NoneType' object is not iterable

---

Additional information

I have Nvidia GeForce RTX 3070 with a driver version of 566.14 and Cuda Version 12.7 on my system.

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Wed_Feb__8_05:53:42_Coordinated_Universal_Time_2023
Cuda compilation tools, release 12.1, V12.1.66
Build cuda_12.1.r12.1/compiler.32415258_0

@metapea
Copy link

metapea commented Dec 6, 2024

I get "NoneType' object is not iterable" with "Enable Dynamic Lora Weights" (when it's checked/enabled).

@Panchovix
Copy link
Owner

Hi there, does this extension work on normal forge?

Tested and works on A1111, but I can replicate the issue on reforge. But it seems the extension has to be adapter for reforge.

@WardCraft
Copy link
Author

Hi there, does this extension work on normal forge?

Tested and works on A1111, but I can replicate the issue on reforge. But it seems the extension has to be adapter for reforge.

Yeah, A1111 worked fine and I also tested Forge, which gives me the same runtime error. I don't know what is the causes to not functionally work with allocating 2 devices or the nonetype which I'm not familiar with. I have figured out a way to work around this by using the command line for --always-gpu which SD was able to generate the image successfully however I find it tedious to work with considering that if Have to work with higher samples and resolution, it will chalk up my memory so it limits my capacity to work with and I'm hoping if there's a better alternative method.

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