dream-textures icon indicating copy to clipboard operation
dream-textures copied to clipboard

No such file or directory: openai--clip-vit-large-patch14

Open tokipona-today opened this issue 2 years ago • 12 comments

Installation runs smoothly. When I ask for a texture generation, i get this messages:

Task exception was never retrieved future: <Task finished name='Task-1' coro=<DreamTexture.dream_texture() done, defined at /Users/nikos/Library/Application Support/Blender/3.2/scripts/addons/dream_textures/operators/dream_texture.py:105> exception=FileNotFoundError(2, 'No such file or directory')> Traceback (most recent call last): File "/Users/nikos/Library/Application Support/Blender/3.2/scripts/addons/dream_textures/operators/dream_texture.py", line 136, in dream_texture generator.load_model() File "/Users/nikos/Library/Application Support/Blender/3.2/scripts/addons/dream_textures/stable_diffusion/ldm/generate.py", line 457, in load_model model = self._load_model_from_config(self.config, self.weights) File "/Users/nikos/Library/Application Support/Blender/3.2/scripts/addons/dream_textures/stable_diffusion/ldm/generate.py", line 578, in _load_model_from_config model = instantiate_from_config(c.model) File "/Users/nikos/Library/Application Support/Blender/3.2/scripts/addons/dream_textures/stable_diffusion/ldm/util.py", line 89, in instantiate_from_config return get_obj_from_str(config['target'])( File "/Users/nikos/Library/Application Support/Blender/3.2/scripts/addons/dream_textures/stable_diffusion/ldm/models/diffusion/ddpm.py", line 657, in __init__ self.instantiate_cond_stage(cond_stage_config) File "/Users/nikos/Library/Application Support/Blender/3.2/scripts/addons/dream_textures/stable_diffusion/ldm/models/diffusion/ddpm.py", line 768, in instantiate_cond_stage model = instantiate_from_config(config) File "/Users/nikos/Library/Application Support/Blender/3.2/scripts/addons/dream_textures/stable_diffusion/ldm/util.py", line 89, in instantiate_from_config return get_obj_from_str(config['target'])( File "/Users/nikos/Library/Application Support/Blender/3.2/scripts/addons/dream_textures/stable_diffusion/ldm/modules/encoders/modules.py", line 245, in __init__ self.tokenizer = CLIPTokenizer.from_pretrained( File "/Applications/Blender.app/Contents/Resources/3.2/python/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 1734, in from_pretrained resolved_vocab_files[file_id] = cached_file( File "/Applications/Blender.app/Contents/Resources/3.2/python/lib/python3.10/site-packages/transformers/utils/hub.py", line 408, in cached_file resolved_file = hf_hub_download( File "/Applications/Blender.app/Contents/Resources/3.2/python/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1172, in hf_hub_download with open(ref_path) as f: FileNotFoundError: [Errno 2] No such file or directory: '/Users/nikos/.cache/huggingface/hub/models--openai--clip-vit-large-patch14/refs/main'

tokipona-today avatar Sep 18 '22 09:09 tokipona-today

my huggingface/hub/models--openai--clip-vit-large-patch14/ directory is empty.

tokipona-today avatar Sep 18 '22 09:09 tokipona-today

If you are on Apple Silicon, please try version 0.0.5 and install again.

carson-katri avatar Sep 18 '22 11:09 carson-katri

Thanks ! I'll give it a go. (btw, congrats for this very polished addon !)

tokipona-today avatar Sep 18 '22 13:09 tokipona-today

Still doesn't work unfortunately. Mac OS M1 - 16Mo ram Blender 3.3 and 3.2 Same issue

tokipona-today avatar Sep 18 '22 14:09 tokipona-today

I'm having the same issue. Running on OS Monterey and Blender 3.3. Upgraded to version 0.0.5 and still having the issue.

winterwarrior3 avatar Sep 18 '22 15:09 winterwarrior3

Can you try this solution from Reddit: https://www.reddit.com/r/blender/comments/xgltrm/comment/iovru3j/

The command you need to run will probably be slightly different, more like:

/Applications/Blender.app/Contents/MacOS/Blender -b -P ~/Library/Application\ Support/Blender/3.3/scripts/addons/dream_textures/stable_diffusion/scripts/preload_models.py

carson-katri avatar Sep 18 '22 16:09 carson-katri

It works ! Well done and thanks again !

tokipona-today avatar Sep 18 '22 18:09 tokipona-today

Can you try this solution from Reddit: https://www.reddit.com/r/blender/comments/xgltrm/comment/iovru3j/

The command you need to run will probably be slightly different, more like:

/Applications/Blender.app/Contents/MacOS/Blender -b -P ~/Library/Application\ Support/Blender/3.3/scripts/addons/dream_textures/stable_diffusion/scripts/preload_models.py

I'm running that command in my terminal and I'm getting the follow error:

jakebaine@MacBook-Pro ~ % /Applications/Blender.app/Contents/MacOS/Blender -b -P ~/Library/Application\ Support/Blender/3.3/scripts/addons/dream_textures/stable_diffusion/scripts/preload_models.py Blender 3.3.0 Release Candidate (hash 8000d5268423 built 2022-09-05 23:43:24) Read prefs: /Users/jakebaine/Library/Application Support/Blender/3.3/config/userpref.blend blenderkit addon: Verbose is enabled blenderkit addon: Read in JSON settings from file BoxCutter: keyconfig unavailable (in batch mode?), no keybinding items registered Traceback (most recent call last): File "/Users/jakebaine/Library/Application Support/Blender/3.3/scripts/addons/Boxcutter/addon/property/preference/keymap.py", line 18, in pie_hotkey for kmi in kc.keymaps['3D View Tool: BoxCutter'].keymap_items: AttributeError: 'NoneType' object has no attribute 'keymaps' File "/Users/jakebaine/Library/Application Support/Blender/3.3/scripts/addons/Boxcutter/addon/property/preference/keymap.py", line 12, in pie_hotkey Traceback (most recent call last): File "/Applications/Blender.app/Contents/Resources/3.3/scripts/modules/addon_utils.py", line 333, in enable mod = __import__(module_name) File "/Users/jakebaine/Library/Application Support/Blender/3.3/scripts/addons/HOps/__init__.py", line 46, in <module> from .registration import register_all, unregister_all File "/Users/jakebaine/Library/Application Support/Blender/3.3/scripts/addons/HOps/registration.py", line 11, in <module> from . operators.booleans.dice.shader import remove_dice_draw_shader File "/Users/jakebaine/Library/Application Support/Blender/3.3/scripts/addons/HOps/operators/booleans/dice/shader.py", line 13, in <module> class SD: File "/Users/jakebaine/Library/Application Support/Blender/3.3/scripts/addons/HOps/operators/booleans/dice/shader.py", line 24, in SD shader = gpu.shader.from_builtin('3D_UNIFORM_COLOR') SystemError: GPU functions for drawing are not available in background mode Exception ignored in: <function ImagePreviewCollection.__del__ at 0x1193f8e50> Traceback (most recent call last): File "/Applications/Blender.app/Contents/Resources/3.3/scripts/modules/bpy/utils/previews.py", line 64, in __del__ raise ResourceWarning( ResourceWarning: <ImagePreviewCollection id=0x11a7fd5d0[0], <super: <class 'ImagePreviewCollection'>, <ImagePreviewCollection object>>>: left open, remove with 'bpy.utils.previews.remove()' botaniq install dir autodetected as /Users/jakebaine/Library/Application Support/Blender/3.3/scripts/addons/botaniq_free (big zip embedded) Exception in module register(): /Applications/Blender.app/Contents/Resources/3.3/scripts/addons/amaranth/__init__.py Traceback (most recent call last): File "/Applications/Blender.app/Contents/Resources/3.3/scripts/modules/addon_utils.py", line 369, in enable mod.register() File "/Applications/Blender.app/Contents/Resources/3.3/scripts/addons/amaranth/__init__.py", line 95, in register _call_globals("register") File "/Applications/Blender.app/Contents/Resources/3.3/scripts/addons/amaranth/__init__.py", line 91, in _call_globals getattr(m, attr_name)() File "/Applications/Blender.app/Contents/Resources/3.3/scripts/addons/amaranth/scene/refresh.py", line 53, in register km = kc.keymaps.new(name="Window") AttributeError: 'NoneType' object has no attribute 'keymaps' Reloading external rigs... Reloading external metarigs... Exception in module register(): /Users/jakebaine/Library/Application Support/Blender/3.3/scripts/addons/dream_textures/__init__.py Traceback (most recent call last): File "/Applications/Blender.app/Contents/Resources/3.3/scripts/modules/addon_utils.py", line 369, in enable mod.register() File "/Users/jakebaine/Library/Application Support/Blender/3.3/scripts/addons/dream_textures/__init__.py", line 81, in register bpy.utils.register_tool(tool) File "/Applications/Blender.app/Contents/Resources/3.3/scripts/modules/bpy/utils/__init__.py", line 873, in register_tool tool_converted = tool_from_class(tool_cls) File "/Applications/Blender.app/Contents/Resources/3.3/scripts/modules/bpy/utils/__init__.py", line 870, in tool_from_class cls._km_action_simple(kc_default, kc, context_descr, tool_def.label, keymap_data) File "/Applications/Blender.app/Contents/Resources/3.3/scripts/startup/bl_ui/space_toolsystem_common.py", line 488, in _km_action_simple km = kc.keymaps.get(km_idname) AttributeError: 'NoneType' object has no attribute 'keymaps' preloading bert tokenizer... ...success preloading Kornia requirements (ignore the deprecation warnings)... ...success preloading CLIP model (Ignore the deprecation warnings)... Error: Python: Traceback (most recent call last): File "/Users/jakebaine/Library/Application Support/Blender/3.3/scripts/addons/dream_textures/stable_diffusion/scripts/preload_models.py", line 34, in <module> tokenizer = CLIPTokenizer.from_pretrained(version) File "/Applications/Blender.app/Contents/Resources/3.3/python/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 1734, in from_pretrained resolved_vocab_files[file_id] = cached_file( File "/Applications/Blender.app/Contents/Resources/3.3/python/lib/python3.10/site-packages/transformers/utils/hub.py", line 408, in cached_file resolved_file = hf_hub_download( File "/Applications/Blender.app/Contents/Resources/3.3/python/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1210, in hf_hub_download _cache_commit_hash_for_specific_revision(storage_folder, revision, commit_hash) File "/Applications/Blender.app/Contents/Resources/3.3/python/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 861, in _cache_commit_hash_for_specific_revision with open(ref_path, "w") as f: IsADirectoryError: [Errno 21] Is a directory: '/Users/jakebaine/.cache/huggingface/hub/models--openai--clip-vit-large-patch14/refs/main' ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

winterwarrior3 avatar Sep 18 '22 22:09 winterwarrior3

@tokipona-today — could you walk me through what you did to fix your issue? I'm having the same issue and don't know what to do exactly to fix this.

winterwarrior3 avatar Sep 18 '22 22:09 winterwarrior3

Can you try this solution from Reddit: https://www.reddit.com/r/blender/comments/xgltrm/comment/iovru3j/

The command you need to run will probably be slightly different, more like:

/Applications/Blender.app/Contents/MacOS/Blender -b -P ~/Library/Application\ Support/Blender/3.3/scripts/addons/dream_textures/stable_diffusion/scripts/preload_models.py

What exactly this command does? I'm using Ubuntu 22.04 and have this issue

Tony2371 avatar Sep 22 '22 11:09 Tony2371

@Tony2371 On Ubuntu that exact command won’t work, but basically what it does is run the last part of the installation, which is downloading the CLIP model.

carson-katri avatar Sep 22 '22 11:09 carson-katri

@Tony2371 you can try this

Move to your SD folder and then run

python scripts/preload_models.py.

hades2510 avatar Dec 15 '22 13:12 hades2510

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar May 18 '23 01:05 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale.

github-actions[bot] avatar May 25 '23 01:05 github-actions[bot]