chaiNNer-org / spandrel

Spandrel gives your project support for various PyTorch architectures meant for AI Super-Resolution, restoration, and inpainting. Based on the model support implemented in chaiNNer.
MIT License
134 stars 10 forks source link

ImportError: cannot import name 'install' from 'spandrel_extra_arches' (/opt/conda/lib/python3.10/site-packages/spandrel_extra_arches/__init__.py) #299

Open AIManifest opened 2 months ago

AIManifest commented 2 months ago

--------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[1], line 4 2 get_ipython().system('pip install -U spandrel spandrel_extra_arches') 3 from spandrel import ModelLoader ----> 4 from spandrel_extra_arches import install 5 install() 7 denoise_model = ModelLoader().load_from_file(r"/workspace/1x_ArtClarity.pth") ImportError: cannot import name 'install' from 'spandrel_extra_arches' (/opt/conda/lib/python3.10/site-packages/spandrel_extra_arches/__init__.py)

Running the following code produces the error above. Nothing major, just needs to be fixed. Thank you for this awesome repository!

from spandrel import ModelLoader import spandrel_extra_arches

AIManifest commented 1 month ago

Edit: 2024, July 20. Fixed this issue by manually going into spandrel_extra_arches and modifying the code downloaded from pip with the actual Github code. Furthermore, the ignore_duplicates argument in the install func is an unrecognized keyword. Fixed this by removing the argument. Hope this fixes things so it can work out of the box!