-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
No module named 'diffusers.pipelines.controlnet_xs' #2110
Comments
Hello, I also encountered this problem just now, I reduced the diffusers version to 0.24.0 and this error did not occur. |
pip install diffusers==0.24.0 |
I had the same problem, I installed diffusers==0.24.0 and the problem has been solved, but now I get a new error: |
followed by this offical guide. /home/leo/.conda/envs/leo_inpainting/lib/python3.10/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_5m_224 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_5m_224. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
return register_model(fn_wrapper)
/home/leo/.conda/envs/leo_inpainting/lib/python3.10/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_11m_224 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_11m_224. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
return register_model(fn_wrapper)
/home/leo/.conda/envs/leo_inpainting/lib/python3.10/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_21m_224 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_21m_224. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
return register_model(fn_wrapper)
/home/leo/.conda/envs/leo_inpainting/lib/python3.10/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_21m_384 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_21m_384. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
return register_model(fn_wrapper)
/home/leo/.conda/envs/leo_inpainting/lib/python3.10/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_21m_512 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_21m_512. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
return register_model(fn_wrapper)
Traceback (most recent call last):
File "/home/leo/MentorWorks/ImageInpainting/MMLab/test.py", line 2, in <module>
sd_inferencer = MMagicInferencer(model_name='stable_diffusion')
File "/home/leo/MentorWorks/ImageInpainting/MMLab/mmagic/mmagic/apis/mmagic_inferencer.py", line 147, in __init__
self.inferencer = Inferencers(
File "/home/leo/MentorWorks/ImageInpainting/MMLab/mmagic/mmagic/apis/inferencers/__init__.py", line 81, in __init__
self.inferencer = Text2ImageInferencer(
File "/home/leo/MentorWorks/ImageInpainting/MMLab/mmagic/mmagic/apis/inferencers/base_mmagic_inferencer.py", line 59, in __init__
register_all_modules()
File "/home/leo/MentorWorks/ImageInpainting/MMLab/mmagic/mmagic/utils/setup_env.py", line 25, in register_all_modules
import mmagic.evaluation # noqa: F401,F403
File "/home/leo/MentorWorks/ImageInpainting/MMLab/mmagic/mmagic/evaluation/__init__.py", line 2, in <module>
from .evaluator import Evaluator
File "/home/leo/MentorWorks/ImageInpainting/MMLab/mmagic/mmagic/evaluation/evaluator.py", line 12, in <module>
from .metrics.base_gen_metric import GenMetric
File "/home/leo/MentorWorks/ImageInpainting/MMLab/mmagic/mmagic/evaluation/metrics/__init__.py", line 12, in <module>
from .niqe import NIQE, niqe
File "/home/leo/MentorWorks/ImageInpainting/MMLab/mmagic/mmagic/evaluation/metrics/niqe.py", line 12, in <module>
from mmagic.datasets.transforms import MATLABLikeResize
File "/home/leo/MentorWorks/ImageInpainting/MMLab/mmagic/mmagic/datasets/transforms/__init__.py", line 2, in <module>
from .albu_function import AlbuCorruptFunction, PairedAlbuTransForms
File "/home/leo/MentorWorks/ImageInpainting/MMLab/mmagic/mmagic/datasets/transforms/albu_function.py", line 4, in <module>
import albumentations as albu
ModuleNotFoundError: No module named 'albumentations' after
|
i'm having the same issue! i'm on a macbook air (m1), have followed several different official guides, and am about to try changing my python model with pyenv. which version of python have y'all been running? |
I think this is an issue with the diffusers library. I commented out the line referring to |
it works, thanks |
I have not been able to resolve the issue with diffusers=0.24.0 nor by commenting out the
This got me to a new error message: My full repro from head using virtual Python environments:
|
I was able to get things working with the addition of:
and changing
I also ran into #2110 for which I added:
The full working script with a Python virtual environment is:
|
Prerequisite
Task
I'm using the official example scripts/configs for the officially supported tasks/models/datasets.
Branch
main branch https://github.com/open-mmlab/mmagic
Environment
Python: 3.8.18 (default, Sep 11 2023, 13:40:15) [GCC 11.2.0]
CUDA available: True
numpy_random_seed: 2147483648
GPU 0: NVIDIA TITAN X (Pascal)
CUDA_HOME: /usr/local/cuda-10.2
NVCC: Cuda compilation tools, release 10.2, V10.2.8
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
PyTorch: 1.12.1+cu102
PyTorch compiling details: PyTorch built with:
TorchVision: 0.13.1+cu102
OpenCV: 4.8.1
MMEngine: 0.8.4
MMCV: 2.0.1
MMCV Compiler: GCC 7.3
MMCV CUDA Compiler: 10.2
MMagic: 1.2.0dev0+1bdd952
Reproduces the problem - code sample
from mmagic.apis import MMagicInferencer
Reproduces the problem - command or script
python demo/mmagic_inference_demo.py
Reproduces the problem - error message
ie_xiong/SR2/mmagic/yfolder/mmagic_inference_demo.py
/media/veily/work/envs/openmmlab/lib/python3.8/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_5m_224 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_5m_224. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
return register_model(fn_wrapper)
/media/veily/work/envs/openmmlab/lib/python3.8/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_11m_224 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_11m_224. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
return register_model(fn_wrapper)
/media/veily/work/envs/openmmlab/lib/python3.8/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_21m_224 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_21m_224. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
return register_model(fn_wrapper)
/media/veily/work/envs/openmmlab/lib/python3.8/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_21m_384 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_21m_384. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
return register_model(fn_wrapper)
/media/veily/work/envs/openmmlab/lib/python3.8/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_21m_512 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_21m_512. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
return register_model(fn_wrapper)
Traceback (most recent call last):
File "/media/veily/work/envs/openmmlab/lib/python3.8/site-packages/diffusers/utils/import_utils.py", line 710, in _get_module
return importlib.import_module("." + module_name, self.name)
File "/media/veily/work/envs/openmmlab/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'diffusers.pipelines.controlnet_xs'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/media/veily/other/winnie_xiong/SR2/mmagic/yfolder/mmagic_inference_demo.py", line 5, in
from mmagic.apis import MMagicInferencer
File "/media/veily/other/winnie_xiong/SR2/mmagic/mmagic/apis/init.py", line 2, in
from .inferencers.inference_functions import init_model
File "/media/veily/other/winnie_xiong/SR2/mmagic/mmagic/apis/inferencers/init.py", line 16, in
from .translation_inferencer import TranslationInferencer
File "/media/veily/other/winnie_xiong/SR2/mmagic/mmagic/apis/inferencers/translation_inferencer.py", line 12, in
from mmagic.models.base_models import BaseTranslationModel
File "/media/veily/other/winnie_xiong/SR2/mmagic/mmagic/models/init.py", line 6, in
from .editors import * # noqa: F401, F403
File "/media/veily/other/winnie_xiong/SR2/mmagic/mmagic/models/editors/init.py", line 2, in
from .animatediff import AnimateDiff, UNet3DConditionMotionModel
File "/media/veily/other/winnie_xiong/SR2/mmagic/mmagic/models/editors/animatediff/init.py", line 2, in
from .animatediff import AnimateDiff
File "/media/veily/other/winnie_xiong/SR2/mmagic/mmagic/models/editors/animatediff/animatediff.py", line 15, in
from mmagic.models.archs import TokenizerWrapper, set_lora
File "/media/veily/other/winnie_xiong/SR2/mmagic/mmagic/models/archs/init.py", line 80, in
register_diffusers_models()
File "/media/veily/other/winnie_xiong/SR2/mmagic/mmagic/models/archs/init.py", line 69, in register_diffusers_models
pipeline = getattr(diffusers.pipelines, pipeline_name)
File "/media/veily/work/envs/openmmlab/lib/python3.8/site-packages/diffusers/utils/import_utils.py", line 698, in getattr
value = self._get_module(name)
File "/media/veily/work/envs/openmmlab/lib/python3.8/site-packages/diffusers/utils/import_utils.py", line 712, in _get_module
raise RuntimeError(
RuntimeError: Failed to import diffusers.pipelines.controlnet_xs because of the following error (look up to see its traceback):
No module named 'diffusers.pipelines.controlnet_xs'
Additional information
No response
The text was updated successfully, but these errors were encountered: