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

make some dependencies optional #82

Closed
krummrey opened this issue Mar 14, 2024 · 3 comments
Closed

make some dependencies optional #82

krummrey opened this issue Mar 14, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@krummrey
Copy link

Hi,

I'm on a Mac and having trouble getting taggui to work. There doesn't seem to be a version of auto_gptq for the mac.
Would it be possible to make it optional, so that I can use it in manual mode?

@jhc13 jhc13 added the bug Something isn't working label Mar 14, 2024
@jhc13
Copy link
Owner

jhc13 commented Mar 14, 2024

Thank you for letting me know.

Please git pull the latest commit and check if the problem has been solved.

@krummrey
Copy link
Author

starts up fine now. Thanks for the quick resolve.

@jhc13 jhc13 closed this as completed Mar 14, 2024
@saket424
Copy link

saket424 commented Aug 13, 2024

@krummrey ,
I am trying to get this working on the Mac via pip install -r requirements.txt
I tried to match your March 14 version just so we are on the same baseline
I am using python 3.12

Can you help. Not sure why it says torch module not found when it clearly was installed

(venvtaggui) anand@Anands-MacBook-Pro taggui % pip install torch              
Collecting torch
  Using cached torch-2.4.0-cp312-none-macosx_11_0_arm64.whl.metadata (26 kB)
Collecting filelock (from torch)
  Using cached filelock-3.15.4-py3-none-any.whl.metadata (2.9 kB)
Collecting typing-extensions>=4.8.0 (from torch)
  Using cached typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
Collecting sympy (from torch)
  Using cached sympy-1.13.2-py3-none-any.whl.metadata (12 kB)
Collecting networkx (from torch)
  Using cached networkx-3.3-py3-none-any.whl.metadata (5.1 kB)
Collecting jinja2 (from torch)
  Using cached jinja2-3.1.4-py3-none-any.whl.metadata (2.6 kB)
Collecting fsspec (from torch)
  Using cached fsspec-2024.6.1-py3-none-any.whl.metadata (11 kB)
Collecting setuptools (from torch)
  Using cached setuptools-72.2.0-py3-none-any.whl.metadata (6.6 kB)
Collecting MarkupSafe>=2.0 (from jinja2->torch)
  Using cached MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_universal2.whl.metadata (3.0 kB)
Collecting mpmath<1.4,>=1.1.0 (from sympy->torch)
  Using cached mpmath-1.3.0-py3-none-any.whl.metadata (8.6 kB)
Using cached torch-2.4.0-cp312-none-macosx_11_0_arm64.whl (62.1 MB)
Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Using cached filelock-3.15.4-py3-none-any.whl (16 kB)
Using cached fsspec-2024.6.1-py3-none-any.whl (177 kB)
Using cached jinja2-3.1.4-py3-none-any.whl (133 kB)
Using cached networkx-3.3-py3-none-any.whl (1.7 MB)
Using cached setuptools-72.2.0-py3-none-any.whl (2.3 MB)
Using cached sympy-1.13.2-py3-none-any.whl (6.2 MB)
Using cached MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_universal2.whl (18 kB)
Using cached mpmath-1.3.0-py3-none-any.whl (536 kB)
Installing collected packages: mpmath, typing-extensions, sympy, setuptools, networkx, MarkupSafe, fsspec, filelock, jinja2, torch
Successfully installed MarkupSafe-2.1.5 filelock-3.15.4 fsspec-2024.6.1 jinja2-3.1.4 mpmath-1.3.0 networkx-3.3 setuptools-72.2.0 sympy-1.13.2 torch-2.4.0 typing-extensions-4.12.2

[notice] A new release of pip is available: 24.0 -> 24.2
[notice] To update, run: pip install --upgrade pip
(venvtaggui) anand@Anands-MacBook-Pro taggui % vi requirements.txt            
(venvtaggui) anand@Anands-MacBook-Pro taggui % pip install -r requirements.txt
Ignoring torch: markers 'platform_system == "Windows" and python_version == "3.11"' don't match your environment
Ignoring torch: markers 'platform_system == "Windows" and python_version == "3.10"' don't match your environment
Ignoring auto-gptq: markers 'platform_system == "Linux" or platform_system == "Windows"' don't match your environment
Collecting accelerate==0.27.2 (from -r requirements.txt (line 1))
  Using cached accelerate-0.27.2-py3-none-any.whl.metadata (18 kB)
Collecting bitsandbytes==0.42.0 (from -r requirements.txt (line 2))
  Using cached bitsandbytes-0.42.0-py3-none-any.whl.metadata (9.9 kB)
Collecting ExifRead==3.0.0 (from -r requirements.txt (line 3))
  Using cached ExifRead-3.0.0-py3-none-any.whl.metadata (6.4 kB)
Collecting imagesize==1.4.1 (from -r requirements.txt (line 4))
  Using cached imagesize-1.4.1-py2.py3-none-any.whl.metadata (1.5 kB)
Collecting Pillow==10.2.0 (from -r requirements.txt (line 5))
  Using cached pillow-10.2.0-cp312-cp312-macosx_11_0_arm64.whl.metadata (9.7 kB)
Collecting pyparsing==3.1.2 (from -r requirements.txt (line 6))
  Using cached pyparsing-3.1.2-py3-none-any.whl.metadata (5.1 kB)
Collecting PySide6==6.6.2 (from -r requirements.txt (line 7))
  Using cached PySide6-6.6.2-cp38-abi3-macosx_11_0_universal2.whl.metadata (5.3 kB)
Collecting transformers==4.38.2 (from -r requirements.txt (line 8))
  Using cached transformers-4.38.2-py3-none-any.whl.metadata (130 kB)
Requirement already satisfied: torch==2.4.0 in ./venvtaggui/lib/python3.12/site-packages (from -r requirements.txt (line 11)) (2.4.0)
Collecting einops==0.7.0 (from -r requirements.txt (line 16))
  Using cached einops-0.7.0-py3-none-any.whl.metadata (13 kB)
Collecting protobuf==4.25.3 (from -r requirements.txt (line 17))
  Using cached protobuf-4.25.3-cp37-abi3-macosx_10_9_universal2.whl.metadata (541 bytes)
Collecting sentencepiece==0.2.0 (from -r requirements.txt (line 18))
  Using cached sentencepiece-0.2.0-cp312-cp312-macosx_11_0_arm64.whl.metadata (7.7 kB)
Collecting torchvision==0.17.0 (from -r requirements.txt (line 19))
  Using cached torchvision-0.17.0-cp312-cp312-macosx_11_0_arm64.whl.metadata (6.6 kB)
Collecting xformers==0.0.24 (from -r requirements.txt (line 20))
  Using cached xformers-0.0.24.tar.gz (3.9 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "/Users/anand/Projects/taggui/venvtaggui/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/anand/Projects/taggui/venvtaggui/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/anand/Projects/taggui/venvtaggui/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/hj/wcklqv7d12b3kxx0z08blw180000gn/T/pip-build-env-7_yqfw5c/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 327, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/hj/wcklqv7d12b3kxx0z08blw180000gn/T/pip-build-env-7_yqfw5c/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 297, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/hj/wcklqv7d12b3kxx0z08blw180000gn/T/pip-build-env-7_yqfw5c/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 497, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/hj/wcklqv7d12b3kxx0z08blw180000gn/T/pip-build-env-7_yqfw5c/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 313, in run_setup
          exec(code, locals())
        File "<string>", line 23, in <module>
      ModuleNotFoundError: No module named 'torch'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

[notice] A new release of pip is available: 24.0 -> 24.2
[notice] To update, run: pip install --upgrade pip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants