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

Torch Issue: AttributeError: module 'torch' has no attribute 'uint1' #97

Open
Pivo987 opened this issue Dec 23, 2024 · 9 comments
Open

Comments

@Pivo987
Copy link

Pivo987 commented Dec 23, 2024

Screenshot 2024-12-23 092004
Hello, I have installed everything step by step and properly on Windows.
I am actually having this issue, could someone help me please?

(MagicQuill) C:\Users\aaaaaaa\OneDrive\Desktop\MagicQuill>python gradio_run.py
Total VRAM 8192 MB, total RAM 32689 MB
pytorch version: 2.1.2+cu118
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3070 : native

Using pytorch cross attention
Traceback (most recent call last):
File "C:\Users\aaaaaaa\OneDrive\Desktop\MagicQuill\gradio_run.py", line 17, in
from MagicQuill.scribble_color_edit import ScribbleColorEditModel
File "C:\Users\aaaaaaa\OneDrive\Desktop\MagicQuill\MagicQuill\scribble_color_edit.py", line 9, in
from .brushnet_nodes import BrushNetLoader, BrushNet, BlendInpaint, get_files_with_extension
File "C:\Users\aaaaaaa\OneDrive\Desktop\MagicQuill\MagicQuill\brushnet_nodes.py", line 21, in
from .brushnet.brushnet import BrushNetModel
File "C:\Users\aaaaaaa\OneDrive\Desktop\MagicQuill\MagicQuill\brushnet\brushnet.py", line 18, in
from diffusers.models.modeling_utils import ModelMixin
File "C:\Users\aaaaaaa\miniconda3\envs\MagicQuill\lib\site-packages\diffusers\models\modeling_utils.py", line 35, in
from ..quantizers import DiffusersAutoQuantizer, DiffusersQuantizer
File "C:\Users\aaaaaaa\miniconda3\envs\MagicQuill\lib\site-packages\diffusers\quantizers_init_.py", line 15, in
from .auto import DiffusersAutoQuantizer
File "C:\Users\aaaaaaa\miniconda3\envs\MagicQuill\lib\site-packages\diffusers\quantizers\auto.py", line 31, in
from .torchao import TorchAoHfQuantizer
File "C:\Users\aaaaaaa\miniconda3\envs\MagicQuill\lib\site-packages\diffusers\quantizers\torchao_init_.py", line 15, in
from .torchao_quantizer import TorchAoHfQuantizer
File "C:\Users\aaaaaaa\miniconda3\envs\MagicQuill\lib\site-packages\diffusers\quantizers\torchao\torchao_quantizer.py", line 45, in
torch.uint1,
File "C:\Users\aaaaaaa\miniconda3\envs\MagicQuill\lib\site-packages\torch_init_.py", line 1833, in getattr
raise AttributeError(f"module '{name}' has no attribute '{name}'")
AttributeError: module 'torch' has no attribute 'uint1'

@armansh2210
Copy link

Same issue here as well

@GiannisCon
Copy link

GiannisCon commented Dec 23, 2024

@Pivo987 @armansh2210
i managed to resolve the issue by executing these commands:
first this:
pip uninstall torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2
then this:
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

@elssantosr
Copy link

@Pivo987 @armansh2210 i managed to resolve the issue by executing these commands: first this: pip uninstall torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 then this: pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

this evolves for the following 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.
llava 1.2.2.post1 requires torch==2.1.2, but you have torch 2.5.1+cu118 which is incompatible.
llava 1.2.2.post1 requires torchvision==0.16.2, but you have torchvision 0.20.1+cu118 which is incompatible.

but even so, it goes thru the uint1 error.

thanks @GiannisCon

@GiannisCon
Copy link

GiannisCon commented Dec 23, 2024

@elssantosr
i get the same error as you but it runs, i can use the app when i execute the command:
python gradio_run.py

@vhrs6
Copy link

vhrs6 commented Dec 23, 2024

same issue

@Pivo987
Copy link
Author

Pivo987 commented Dec 24, 2024

@Pivo987 @armansh2210 i managed to resolve the issue by executing these commands: first this: pip uninstall torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 then this: pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

this evolves for the following 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. llava 1.2.2.post1 requires torch==2.1.2, but you have torch 2.5.1+cu118 which is incompatible. llava 1.2.2.post1 requires torchvision==0.16.2, but you have torchvision 0.20.1+cu118 which is incompatible.

but even so, it goes thru the uint1 error.

thanks @GiannisCon

Same here. Error evolved, but now it is working at least. Thanks a lot @GiannisCon

@gjnave
Copy link

gjnave commented Dec 24, 2024

i belive the issue is that diffusers just updated yesteday.. been unable to get anything working but am attempting to try different versions of dependent packages.
I update one and it breaks another

@thepilip
Copy link

i get the same error as you but it runs, i can use the app when i execute the command:
python gradio_run.py

when i run gradio_run.py i get
OSError: Incorrect path_or_model_id: 'C:\Users\xxxxx\MagicQuill\models\llava-v1.5-7b-finetune-clean'. Please provide either the path to a local folder or the repo_id of a model on the Hub.

@zliucz
Copy link
Member

zliucz commented Dec 25, 2024

@thepilip Hi, check this issue#54. Please download the llava checkpoint and place it in the correct path.

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

8 participants