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

ModuleNotFoundError: No module named 'utils.extra_config'; 'utils' is not a package #228

Open
carlosInverse opened this issue Sep 11, 2024 · 7 comments

Comments

@carlosInverse
Copy link

when i install comfyui by stable diffusion v1.10.1, i don't know where i'm so wrong, can you help me?

venv "E:\AI Drawing\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 sd-webui-comfyui requirement: changing portalocker version from 2.10.1 to 2.7.0
Launching Web UI with arguments: --xformers --enable-insecure-extension-access
[-] ADetailer initialized. version: 24.9.0, num models: 22
ControlNet preprocessor location: E:\AI Drawing\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2024-09-12 04:29:24,732 - ControlNet - INFO - ControlNet v1.1.455
Loading weights [31829c378d] from E:\AI Drawing\stable-diffusion-webui\models\Stable-diffusion\3dAnimationDiffusion_v10.safetensors
2024-09-12 04:29:25,335 - ControlNet - INFO - ControlNet UI callback registered.
Creating model from config: E:\AI Drawing\stable-diffusion-webui\configs\v1-inference.yaml
E:\AI Drawing\stable-diffusion-webui\venv\lib\site-packages\huggingface_hub\file_download.py:1150: FutureWarning: "resume_download" is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use "force_download=True".
warnings.warn(
Running on local URL: http://127.0.0.1:7860

To create a public link, set “share=True” in “launch()".
[sd-webui-comfyui] Started callback listeners for process webui
[sd-webui-comfyui] Starting subprocess for comfyui...
IIB Database file has been successfully backed up to the backup folder.
Startup time: 13.1s (prepare environment: 3.8s, import torch: 3.0s, import gradio: 0.8s, setup paths: 0.9s, initialize shared: 0.2s, other imports: 0.5s, list SD models: 0.1s, load scripts: 2.7s, create ui: 0.7s, gradio launch: 0.4s).
Applying attention optimization: xformers... done.
[ComfyUI] [sd-webui-comfyui] Setting up IPC...
[ComfyUI] [sd-webui-comfyui] Using inter-process communication strategy: Shared memory
[ComfyUI] [sd-webui-comfyui] Started callback listeners for process comfyui
[ComfyUI] [sd-webui-comfyui] Patching ComfyUI...
Model loaded in 4.7s (load weights from disk: 0.7s, create model: 0.4s, apply weights to model: 1.0s, load textual inversion embeddings: 2.3s, calculate empty prompt: 0.1s).
WARNING:xformers:A matching Triton is not available, some optimizations will not be enabled.
Error caught was: No module named 'triton'
[ComfyUI] [sd-webui-comfyui] Launching ComfyUI with arguments: --listen 127.0.0.1 --port 8189
[ComfyUI] [START] Security scan
[ComfyUI] [DONE] Security scan
[ComfyUI] ## ComfyUI-Manager: installing dependencies done.
[ComfyUI] ** ComfyUI startup time: 2024-09-12 04:29:32.394336
[ComfyUI] ** Platform: Windows
[ComfyUI] ** Python version: 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
[ComfyUI] ** Python executable: E:\AI Drawing\stable-diffusion-webui\venv\Scripts\python.exe
[ComfyUI] ** ComfyUI Path: E:\AI Drawing\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI
[ComfyUI] ** Log path: E:\AI Drawing\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\comfyui.log
Traceback (most recent call last):
File "E:\AI Drawing\stable-diffusion-webui\extensions\sd-webui-comfyui\lib_comfyui\comfyui\pre_main.py", line 98, in
main()
File "E:\AI Drawing\stable-diffusion-webui\extensions\sd-webui-comfyui\lib_comfyui\ipc_init_.py", line 41, in wrapper
return function(*args, **kwargs)
File "E:\AI Drawing\stable-diffusion-webui\extensions\sd-webui-comfyui\lib_comfyui\comfyui\pre_main.py", line 44, in main
start_comfyui()
File "E:\AI Drawing\stable-diffusion-webui\extensions\sd-webui-comfyui\lib_comfyui\ipc_init_.py", line 41, in wrapper
return function(*args, **kwargs)
File "E:\AI Drawing\stable-diffusion-webui\extensions\sd-webui-comfyui\lib_comfyui\comfyui\pre_main.py", line 93, in start_comfyui
runpy.run_path(os.path.join(os.getcwd(), 'main.py'), {'comfyui_print': comfyui_print}, 'main')
File "C:\Users\Carlos\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 289, in run_path
return _run_module_code(code, init_globals, run_name,
File "C:\Users\Carlos\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 96, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "C:\Users\Carlos\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "E:\AI Drawing\stable-diffusion-webui\extensions\sd-webui-comfyui\ComfyUI\main.py", line 66, in
import utils.extra_config
ModuleNotFoundError: No module named 'utils.extra_config'; 'utils' is not a package

@curl3y
Copy link

curl3y commented Sep 12, 2024

I think i found a workaround,
remove line 66 in main.py and add

import sys
sys.path.append("C:/path to/ComfyUI/utils/")
import extra_config

@carlosInverse
Copy link
Author

I think it's package name confilict, so i rename utils to utilsed and edit line 66 in main.py, utils.extra_config to utilsed.extra_config.
then we need install torchaudio=2.1.2 by self, at the end, it's work.

@sozturk88
Copy link

Thank you it has solved my issue.

I think i found a workaround, remove line 66 in main.py and add

import sys
sys.path.append("C:/path to/ComfyUI/utils/")
import extra_config

@pwlivewire
Copy link

I think it's package name confilict, so i rename utils to utilsed and edit line 66 in main.py, utils.extra_config to utilsed.extra_config. then we need install torchaudio=2.1.2 by self, at the end, it's work.

This worked for me, it had been driving me mad so thank you so much for posting this here.

@ChrisTello
Copy link

I think it's package name confilict, so i rename utils to utilsed and edit line 66 in main.py, utils.extra_config to utilsed.extra_config. then we need install torchaudio=2.1.2 by self, at the end, it's work.

where and how do i install torchaudio?

@carlosInverse
Copy link
Author

I think it's package name confilict, so i rename utils to utilsed and edit line 66 in main.py, utils.extra_config to utilsed.extra_config. then we need install torchaudio=2.1.2 by self, at the end, it's work.

where and how do i install torchaudio?

In your patch \stable-diffusion-webui\venv\ ,open cmd and start up venv, then you can use pip command to install torchaudio=2.1.2

@ChrisTello
Copy link

ChrisTello commented Jan 23, 2025

I think it's package name confilict, so i rename utils to utilsed and edit line 66 in main.py, utils.extra_config to utilsed.extra_config. then we need install torchaudio=2.1.2 by self, at the end, it's work.

where and how do i install torchaudio?

In your patch \stable-diffusion-webui\venv\ ,open cmd and start up venv, then you can use pip command to install torchaudio=2.1.2

i tried but i get this error

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchvision 0.15.2+cu118 requires torch==2.0.1, but you have torch 2.1.2 which is incompatible.

i should say, comfyui will open but if i try to load workflows it freezes. even simple ones or trying to load the default freeze it.

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

5 participants