carson-katri / dream-textures

Stable Diffusion built-in to Blender
GNU General Public License v3.0
7.77k stars 415 forks source link

<title>Get error when writing in the search text input</title> #814

Open ultraKelevra opened 4 weeks ago

ultraKelevra commented 4 weeks ago

Description

I'm trying to install and run Dream Diffusion in my Blender. I'm on a Mac and downloaded a brand new Blender (4.2)

Installed Dream Textures 0.0.4 ([dream_textures-macos-arm-4-1.zip](https://github.com/carson-katri/dream-textures/releases/download/0.4.0/dream_textures-macos-arm-4-1.zip))

I already downloaded the file and installed as add-on in the settings menu. Clicking the "download 2.1 recommended" worked as expected,the download bar finished and the model was added to the list.

When I try and type anything at the search field it doesn't work nor give any sign to be working.

I read the instructions on installs for macs saying that quarantine could be an issue and already ran the command line (changed version to 4.1) and used it to try and fix the problem to no success: ~ % xattr -r -d com.apple.quarantine /Users/kelevrozo/Library/Application\ Support/Blender/4.2/scripts/addons/dream_textures/.python_dependencies

I can't open the console in Mac so I did what was suggested in the instructions and opened blender from a batch console to see the logs.

The error occurs when I write the name and click outside the input. The error is as follows:

ImportError: cannot import name 'ModelFilter' from 'huggingface_hub' (/Users/kelevrozo/Library/Application Support/Blender/4.2/scripts/addons/dream_textures/.python_dependencies/huggingface_hub/__init__.py)
Exception: Traceback (most recent call last):
  File "/Users/kelevrozo/Library/Application Support/Blender/4.2/scripts/addons/dream_textures/generator_process/actor.py", line 209, in _receive
    response = getattr(self, message.method_name)(*message.args, **message.kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kelevrozo/Library/Application Support/Blender/4.2/scripts/addons/dream_textures/generator_process/actions/huggingface_hub.py", line 35, in hf_list_models
    from huggingface_hub import HfApi, ModelFilter
ImportError: cannot import name 'ModelFilter' from 'huggingface_hub' (/Users/kelevrozo/Library/Application Support/Blender/4.2/scripts/addons/dream_textures/.python_dependencies/huggingface_hub/__init__.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/kelevrozo/Library/Application Support/Blender/4.2/scripts/addons/dream_textures/generator_process/future.py", line 105, in run_callbacks
    done_callback(self)
  File "/Users/kelevrozo/Library/Application Support/Blender/4.2/scripts/addons/dream_textures/preferences.py", line 218, in on_done
    set_model_list('model_results', future.result())
                                    ^^^^^^^^^^^^^^^
  File "/Users/kelevrozo/Library/Application Support/Blender/4.2/scripts/addons/dream_textures/generator_process/future.py", line 46, in result
    raise self._exception
ImportError: cannot import name 'ModelFilter' from 'huggingface_hub' (/Users/kelevrozo/Library/Application Support/Blender/4.2/scripts/addons/dream_textures/.python_dependencies/huggingface_hub/__init__.py)

Additionally, I don't see any model when opening the Dream Textures menu using "n" either in 3D Viewport or Image Editor. It shows "No model selected". When I open the drop down it doesn't populate with any of the models from the list.

I already downloaded one more model from hugging face directly and added through the "Import Checkpoint file" and they were actually added to the list in the add-on menu but still don't show up in the Dream Textures tool menu.

Screenshot 2024-08-14 at 11 55 42 PM ^^^ models populating add-on

Screenshot 2024-08-14 at 11 50 47 PM ^^^ no models in the menu

Steps to Reproduce

1 - Install the add-on 2 - Click the "Download 2.1 (recommended)" button 3 - Model downloaded and added to the list 4 - Open the Dream tab with "N" 5 - Watch in awe how the models are not there.

Expected Behavior

Models should populate the list and I should be generating cool stuff by now.

Addon Version

macOS (Apple Silicon)

Blender Version

Blender 4.1+

GPU

Apple Silicon