Mikubill / sd-webui-controlnet

WebUI extension for ControlNet
GNU General Public License v3.0
16.84k stars 1.94k forks source link

[Bug]: 'NoneType' object is not iterable. Please, check your schedules/ init values. #2067

Closed vihansolo closed 1 year ago

vihansolo commented 1 year ago

Is there an existing issue for this?

What happened?

I am trying to use the ControlNet with Deforum (https://github.com/deforum-art/sd-webui-deforum) extension in Automatic1111 and it was working fine before 7th Sept, that's when I started running into this issue. All my settings are the same, only prompts change.

Steps to reproduce the problem

  1. Go to .... Deforum tab in automatic1111
  2. Press .... Press 'Generate' after adding all the pre-requisites

What should have happened?

The code should have ran as usual and the preview of the output should have been visible in the preview tab.

Commit where the problem happens

webui: v1.5.2 deforum: 86921f79 controlnet: f77c5eb5

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--xformers

List of enabled extensions

WhatsApp Image 2023-09-06 at 21 17 28

Console logs

Loading A111 WebUI Launcher
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 i   Settings file found, loading
 →   Updating Settings File  ✓
 i   Launcher Version 1.7.0
 i   Found a custom WebUI Config
 i   No Launcher launch options
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 →   Checking requirements :
 i   Python 3.10.6150.1013 found in registry:  C:\Users\paras\AppData\Local\Programs\Python\Python310\
 i   Clearing PATH of any mention of Python
 →   Adding python 3.10 to path  ✓
 i   Git found and already in PATH:  C:\Program Files\Git\cmd\git.exe
 i   Automatic1111 SD WebUI found:  D:\Coding\stable-diffusion-webui
 i   One or more checkpoint models were found
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Loading Complete, opening launcher
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 i   Arguments are now: --xformers
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 ↺   Updating Webui
error: Your local changes to the following files would be overwritten by merge:
        modules/shared.py
Please commit your changes or stash them before you merge.
Aborting
 ✓   Done
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 ↺   Updating Extension: deforum-for-automatic1111-webui
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 ↺   Updating Extension: promptgen-lexart
error: Your local changes to the following files would be overwritten by merge:
        modules/shared.py
Please commit your changes or stash them before you merge.
Aborting
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 ↺   Updating Extension: Retrieval-based-Voice-Conversion-WebUI
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 ↺   Updating Extension: sd-webui-controlnet
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 ↺   Updating Extension: stable-diffusion-webui-promptgen
 ✓   Done
 i   Arguments are now: --xformers
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  WEBUI LAUNCHING VIA EMS LAUNCHER, EXIT THIS WINDOW TO STOP THE WEBUI
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 !   Any error happening after 'commit hash : XXXX' is not related to the launcher. Please report them on Automatic1111's github instead :
 ☁   https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/new/choose
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Cancel
venv "D:\Coding\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.5.2
Commit hash: c9c8485bc1e8720aba70f029d25cba1c4abf2b5c

Launching Web UI with arguments: --autolaunch --xformers
2023-09-06 14:03:29,934 - ControlNet - INFO - ControlNet v1.1.407
ControlNet preprocessor location: D:\Coding\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2023-09-06 14:03:30,203 - ControlNet - INFO - ControlNet v1.1.407
Loading weights [76be5be1b2] from D:\Coding\stable-diffusion-webui\models\Stable-diffusion\epicrealism_pureEvolutionV5.safetensors
Creating model from config: D:\Coding\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
Deforum ControlNet support: enabled
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
DiffusionWrapper has 859.52 M params.
Startup time: 21.6s (launcher: 8.7s, import torch: 5.6s, import gradio: 1.3s, setup paths: 0.8s, other imports: 0.9s, load scripts: 1.7s, create ui: 0.8s, gradio launch: 1.5s).
Applying attention optimization: xformers... done.
Model loaded in 5.7s (load weights from disk: 0.6s, create model: 1.9s, apply weights to model: 0.7s, apply half(): 1.6s, move model to device: 0.7s).
reading custom settings from D:\Coding\stable-diffusion-webui\deforum_settings4.txt
reading custom settings from D:\Coding\stable-diffusion-webui\deforum_settings4.txt
started run_deforum
times_to_run: 1
Deforum extension for auto1111 webui
Git commit: 86921f79
Starting job task(dybow8q6b9ndgax)-0...
Video to extract: F:\Grasshoppers\Video\Premier Pro\Instagram Reels\production_id 4935617 (1080p).mp4
Extracting video (1 every 1) frames to D:\Coding\stable-diffusion-webui\outputs\img2img-images\Deforum_20230906140709\inputframes...
Trying to extract frames from video with input FPS of 25.0. Please wait patiently.
Extracted 505 frames from video in 3.83 seconds!
Using 505 input frames from D:\Coding\stable-diffusion-webui\outputs\img2img-images\Deforum_20230906140709\inputframes...
Using init_image from video: D:\Coding\stable-diffusion-webui\outputs\img2img-images\Deforum_20230906140709\inputframes\production_id 4935617 (1080p)000000000.jpg
Unpacking ControlNet 1 base video
Exporting Video Frames to D:\Coding\stable-diffusion-webui\outputs\img2img-images\Deforum_20230906140709\controlnet_1_inputframes...
Trying to extract frames from video with input FPS of 25.0. Please wait patiently.
Extracted 505 frames from video in 3.74 seconds!
Loading 505 input frames from D:\Coding\stable-diffusion-webui\outputs\img2img-images\Deforum_20230906140709\controlnet_1_inputframes and saving video frames to D:\Coding\stable-diffusion-webui\outputs\img2img-images\Deforum_20230906140709
ControlNet 1 base video unpacked!
Unpacking ControlNet 2 base video
Exporting Video Frames to D:\Coding\stable-diffusion-webui\outputs\img2img-images\Deforum_20230906140709\controlnet_2_inputframes...
Trying to extract frames from video with input FPS of 25.0. Please wait patiently.
Extracted 505 frames from video in 3.95 seconds!
Loading 505 input frames from D:\Coding\stable-diffusion-webui\outputs\img2img-images\Deforum_20230906140709\controlnet_2_inputframes and saving video frames to D:\Coding\stable-diffusion-webui\outputs\img2img-images\Deforum_20230906140709
ControlNet 2 base video unpacked!
Saving animation frames to:
D:\Coding\stable-diffusion-webui\outputs\img2img-images\Deforum_20230906140709
Loading MiDaS model from dpt_large-midas-2f21e586.pt...
Animation frame: 0/505
Seed: 90130583
Prompt: full-blown hallucination and psychedelic trip of DMT, LSD with amazing psychedelic  visuals, patterns and colors, high quality video, dmt trip, hallucinogenic, 8K, High detail, HD
Neg Prompt: nsfw, nude
╭─────┬───┬───────┬────┬────┬────┬────┬────┬────╮
│Steps│CFG│Denoise│Tr X│Tr Y│Tr Z│Ro X│Ro Y│Ro Z│
├─────┼───┼───────┼────┼────┼────┼────┼────┼────┤
│ 15  │3.0│   1   │ 0  │ 0  │ 0  │ 0  │ 0  │ 0  │
╰─────┴───┴───────┴────┴────┴────┴────┴────┴────╯
Reading ControlNet 1 base frame #0 at D:\Coding\stable-diffusion-webui\outputs\img2img-images\Deforum_20230906140709\controlnet_1_inputframes\000000000.jpg
Reading ControlNet 2 base frame #0 at D:\Coding\stable-diffusion-webui\outputs\img2img-images\Deforum_20230906140709\controlnet_2_inputframes\000000000.jpg

START OF TRACEBACK
Traceback (most recent call last):
  File "D:\Coding\stable-diffusion-webui\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\run_deforum.py", line 110, in run_deforum
    render_animation(args, anim_args, video_args, parseq_args, loop_args, controlnet_args, root)
  File "D:\Coding\stable-diffusion-webui\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\render.py", line 575, in render_animation
    image = generate(args, keys, anim_args, loop_args, controlnet_args, root, parseq_adapter, frame_idx, sampler_name=scheduled_sampler_name)
  File "D:\Coding\stable-diffusion-webui\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\generate.py", line 76, in generate
    return generate_inner(args, keys, anim_args, loop_args, controlnet_args, root, parseq_adapter, frame, sampler_name)
  File "D:\Coding\stable-diffusion-webui\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\generate.py", line 277, in generate_inner
    process_with_controlnet(p, args, anim_args, controlnet_args, root, parseq_adapter, is_img2img=True, frame_idx=frame)  File "D:\Coding\stable-diffusion-webui\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\deforum_controlnet.py", line 316, in process_with_controlnet
    cnet.update_cn_script_in_processing(p, cn_units, is_img2img=is_img2img, is_ui=False)
  File "D:\Coding\stable-diffusion-webui\extensions\sd-webui-controlnet\internal_controlnet\external_code.py", line 340, in update_cn_script_in_processing
    script_args = list(p.script_args)
TypeError: 'NoneType' object is not iterable
END OF TRACEBACK

User friendly error message:
Error: 'NoneType' object is not iterable. Please, check your schedules/ init values.

Additional information

This is a screenshot of error in the web-ui:

WhatsApp Image 2023-09-06 at 20 37 48

This is a screenshot of the control net settings used:

WhatsApp Image 2023-09-06 at 20 58 14

WhatsApp Image 2023-09-06 at 20 58 14

solemankazmi commented 1 year ago

hey @vihansolo did you find any solution?

vihansolo commented 1 year ago

Nothing yet sorry @solemankazmi

solemankazmi commented 1 year ago

How this worked for this gentleman @vihansolo

RodinIvan commented 1 year ago

Same error here! Everythong worked fine just 3 days ago

Daraindrg commented 1 year ago

I had the same thing happen. I changed nothing and started getting this error. It happens whenever I use control net with Deforum. I ended up installing version 1.6 of stable diffusion. And transferred everything there and it's working there, but I still cant get it working on V1.5

vihansolo commented 1 year ago

I updated to v1.6 and it is working for me as well but still doesn't explain the earlier behavior

RodinIvan commented 1 year ago

Excuse me, could you share the link to download sd-1.6 weights? Couldn't find them on hugging face

FONGKA2 commented 1 year ago

same here

vihansolo commented 1 year ago

Excuse me, could you share the link to download sd-1.6 weights? Couldn't find them on hugging face

Oh, the v1.6 I'm talking here is the stable-diffusion-webui v1.6 (https://github.com/AUTOMATIC1111/stable-diffusion-webui) @RodinIvan @FONGKA2

matthew2k commented 1 year ago

hmmm.... still getting the same error even on 1.6 when running on colab

Daraindrg commented 1 year ago

hmmm.... still getting the same error even on 1.6 when running on colab

I haven't had any issues in 1.6 (yet). But my 1.5 doesn't work. I even tried uninstalling and reinstalling Controlnet and Deforum. But no luck, I probably need to reinstall everything. But I still can't figure out why. Looks like this bug was closed so who knows when it will get fixed.

vihansolo commented 1 year ago

hmmm.... still getting the same error even on 1.6 when running on colab

I haven't had any issues in 1.6 (yet). But my 1.5 doesn't work. I even tried uninstalling and reinstalling Controlnet and Deforum. But no luck, I probably need to reinstall everything. But I still can't figure out why. Looks like this bug was closed so who knows when it will get fixed.

I only closed it because it was working in 1.6, if you want me to reopen it I could do so @Daraindrg