Skip to content

[Bug]: ImportError: cannot import name 'InferenceHelper' from 'infer' (D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\venv\lib\site-packages\infer\__init__.py) #986

@Luxor0238

Description

@Luxor0238

Have you read the latest version of the FAQ?

  • I have visited the FAQ page right now and my issue is not present there

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits of both this extension and the webui

Are you using the latest version of the Deforum extension?

  • I have Deforum updated to the lastest version and I still have the issue.

What happened?

The extension loads fine, but when I click generate these errors appear.

Steps to reproduce the problem

  1. Go to .... Deforum Tab
  2. Press .... Generate, after set prompts and parameters
  3. ... Error: ImportError: cannot import name 'InferenceHelper' from 'infer' (D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\venv\lib\site-packages\infer_init_.py)

What should have happened/how would you fix it?

No response

Torch version

(venv) D:\Nueva_carpeta_2\UIs\stable-diffusion-webui>pip show torch
Name: torch
Version: 2.1.2+cu121
Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration
Home-page: https://pytorch.org/
Author: PyTorch Team
Author-email: [email protected]
License: BSD-3
Location: d:\nueva_carpeta_2\uis\stable-diffusion-webui\venv\lib\site-packages
Requires: filelock, fsspec, jinja2, networkx, sympy, typing-extensions
Required-by: accelerate, clean-fid, clip, clip-interrogator, controlnet-aux, depth_anything, depth_anything_v2, dsine, easyocr, facexlib, geffnet, kornia, open-clip-torch, pytorch-lightning, spandrel, spandrel_extra_arches, timm, tomesd, torchaudio, torchdiffeq, torchmetrics, torchsde, torchvision

(venv) D:\Nueva_carpeta_2\UIs\stable-diffusion-webui>

On which platform are you launching the webui with the extension?

Automatic 1111 for windows

Deforum settings

deforum_settings.txt

Webui core settings

ui-config.json

Console logs

venv "D:\Nueva_carpeta_2\UIs\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.10.1
Commit hash: 82a973c04367123ae98bd9abdf80d9eda9b910e2
Installing requirements
Installing sd-webui-controlnet requirement: changing pydantic version from 1.10.21 to 1.10.17
Launching Web UI with arguments:
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
CivitAI Browser+: Aria2 RPC started
ControlNet preprocessor location: D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2025-01-17 00:42:45,378 - ControlNet - INFO - ControlNet v1.1.455
Loading weights [d2e2564c72] from D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\models\Stable-diffusion\pornmasterAmateur_v7FP16VAE-inpainting_851424.safetensors
Creating model from config: D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\configs\v1-inpainting-inference.yaml
2025-01-17 00:42:48,540 - ControlNet - INFO - ControlNet UI callback registered.
Civitai Shortcut: v1.6.7
Civitai Shortcut: There are no registered shortcuts.
Civitai Shortcut: There are no registered shortcuts.
Civitai Shortcut: There are no registered shortcuts.
Civitai Shortcut: There are no registered shortcuts.
Applying attention optimization: Doggettx... done.
*Deforum ControlNet support: enabled*
Model loaded in 16.4s (create model: 0.5s, apply weights to model: 1.8s, move model to device: 0.2s, load textual inversion embeddings: 13.5s, calculate empty prompt: 0.2s).
[ERROR]: Config states D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\config_states\civitai_subfolders.json, "created_at" does not exist
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 78.5s (prepare environment: 38.1s, import torch: 7.2s, import gradio: 2.4s, setup paths: 1.8s, initialize shared: 0.3s, other imports: 0.7s, list SD models: 0.4s, load scripts: 7.1s, refresh VAE: 0.1s, create ui: 16.9s, gradio launch: 3.2s).
started run_deforum
times_to_run: 1
Deforum extension for auto1111 webui
Git commit: 5d63a339
Starting job task(bjw43glfc8hbzbt)-0...
*** Error completing request
*** Arguments: ('task(bjw43glfc8hbzbt)', {}, False, None, '2D', 120, 'replicate', '0: (0)', '0: (1.0025+0.002*sin(1.25*3.14*t/30))', '0: (0)', '0: (0)', '0: (1.75)', '0: (0.5)', '0: (0.5)', '0: (0)', '0: (0)', '0: (0)', False, '0: (0)', '0: (0)', '0: (0)', '0: (53)', '0: (0.065)', '0: (0.65)', '0: (1.0)', '0: (7)', False, '0: (25)', '0: (70)', '0: (1)', False, '0: (200)', '0: (10000)', '0:(s), 1:(-1), "max_f-2":(-1), "max_f-1":(s)', '0:(1.5)', False, '0: (1)', '0: (0)', False, '0: ("Euler a")', False, '0: ("{video_mask}")', '0: ("{video_mask}")', False, '0: ("model1.ckpt"), 100: ("model2.safetensors")', False, '0: (2)', True, '0: (1.05)', False, '20230129210106', False, '0: (0)', False, '0: (1)', '0: (0.1)', '0: (5)', '0: (1)', '0: (0)', 'LAB', '', 1, False, False, 2, 'None', '0: (1)', 'None', '0: (1)', '0', 'perlin', 8, 8, 4, 0.5, True, 'Midas-3-Hybrid', 0.2, 'border', 'bicubic', False, 'https://deforum.github.io/a1/V1.mp4', 1, 0, -1, False, False, 'https://deforum.github.io/a1/VM1.mp4', '0:(0.5)', '0:(0.5)', '0:(1)', '0:(100)', '0:(0)', '0:(1)', False, 'None', True, 'None', False, False, 2, 'RAFT', 'None', False, 'None', False, 'None', False, False, '{\n    "0": "tiny cute bunny, vibrant diffraction, highly detailed, intricate, ultra hd, sharp photo, crepuscular rays, in focus",\n    "30": "anthropomorphic clean cat, surrounded by fractals, epic angle and pose, symmetrical, 3d, depth of field",\n    "60": "a beautiful coconut --neg photo, realistic",\n    "90": "a beautiful durian, award winning photography"\n}\n    ', 'apple', 'nsfw, nude', 512, 512, True, False, False, 0, 0, -1, 'Euler a', 'Automatic', 25, 'Deforum_{timestring}', 'iter', 1, False, 0.8, True, 'https://deforum.github.io/a1/I1.png', None, False, False, 'https://deforum.github.io/a1/M1.jpg', False, 1.0, 1.0, True, 4, 1, True, 4, 'ignore', 10.0, False, False, 15, False, False, False, 'C:/SD/20230124234916_%09d.png', 'None', 'https://deforum.github.io/a1/A1.mp3', False, 'x2', 'realesr-animevideov3', True, False, 'None', 2, False, 2, True, False, '', True, True, False, '{\n    "0": "https://deforum.github.io/a1/Gi1.png",\n    "max_f/4-5": "https://deforum.github.io/a1/Gi2.png",\n    "max_f/2-10": "https://deforum.github.io/a1/Gi3.png",\n    "3*max_f/4-15": "https://deforum.github.io/a1/Gi4.jpg",\n    "max_f-20": "https://deforum.github.io/a1/Gi1.png"\n}', '0:(0.75)', '0:(0.35)', '0:(0.25)', '0:(20)', '0:(0.075)', True, '', '', False, False, False, 'none', 'None', '0:(1)', '0:(0.0)', '0:(1.0)', 64, 64, 64, 'Inner Fit (Scale to Fit)', 'Balanced', False, True, '', '', False, False, False, 'none', 'None', '0:(1)', '0:(0.0)', '0:(1.0)', 64, 64, 64, 'Inner Fit (Scale to Fit)', 'Balanced', False, True, '', '', False, False, False, 'none', 'None', '0:(1)', '0:(0.0)', '0:(1.0)', 64, 64, 64, 'Inner Fit (Scale to Fit)', 'Balanced', False, True, '', '', False, False, False, 'none', 'None', '0:(1)', '0:(0.0)', '0:(1.0)', 64, 64, 64, 'Inner Fit (Scale to Fit)', 'Balanced', False, True, '', '', False, False, False, 'none', 'None', '0:(1)', '0:(0.0)', '0:(1.0)', 64, 64, 64, 'Inner Fit (Scale to Fit)', 'Balanced', False) {}
    Traceback (most recent call last):
      File "D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\modules\call_queue.py", line 74, in f
        res = list(func(*args, **kwargs))
      File "D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\modules\call_queue.py", line 53, in f
        res = func(*args, **kwargs)
      File "D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\modules\call_queue.py", line 37, in f
        res = func(*args, **kwargs)
      File "D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\run_deforum.py", line 104, in run_deforum
        from .render import render_animation
      File "D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\render.py", line 32, in <module>
        from .depth import DepthModel
      File "D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\depth.py", line 25, in <module>
        from .depth_adabins import AdaBinsModel
      File "D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\extensions\deforum-for-automatic1111-webui\scripts\deforum_helpers\depth_adabins.py", line 22, in <module>
        from infer import InferenceHelper
    ImportError: cannot import name 'InferenceHelper' from 'infer' (D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\venv\lib\site-packages\infer\__init__.py)

---
Traceback (most recent call last):
  File "D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1434, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1297, in postprocess_data
    self.validate_outputs(fn_index, predictions)  # type: ignore
  File "D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1272, in validate_outputs
    raise ValueError(
ValueError: An event handler (run_deforum) didn't receive enough output values (needed: 4, received: 3).
Wanted outputs:
    [gallery, textbox, textbox, html]
Received outputs:
    [None, "", "<div class='error'>ImportError: cannot import name &#x27;InferenceHelper&#x27; from &#x27;infer&#x27; (D:\Nueva_carpeta_2\UIs\stable-diffusion-webui\venv\lib\site-packages\infer\__init__.py)</div><div class='performance'><p class='time'>Time taken: <wbr><span class='measurement'>0.5 sec.</span></p><p class='vram'><abbr title='Active: peak amount of video memory used during generation (excluding cached data)'>A</abbr>: <span class='measurement'>2.04 GB</span>, <wbr><abbr title='Reserved: total amount of video memory allocated by the Torch library '>R</abbr>: <span class='measurement'>2.05 GB</span>, <wbr><abbr title='System: peak amount of video memory allocated by all running programs, out of total capacity'>Sys</abbr>: <span class='measurement'>3.2/8 GB</span> (39.6%)</p></div>"]

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions