ehristoforu / DeFooocus

Always focus on prompting and generating
GNU General Public License v3.0
209 stars 54 forks source link

[Bug]: cant start defoocus #32

Closed lgwenl closed 1 week ago

lgwenl commented 1 month ago

Prerequisites

Describe the problem

ImportError: cannot import name 'cached_download' from 'huggingface_hub' (D:\ProgramasOpenSource\DeFooocus_win64_portable\python_embeded\lib\site-packages\huggingface_hub__init__.py)

Full console log output

Already up-to-date
Update succeeded.
[System ARGV] ['DeFooocus\\entry_with_update.py', '--attention-split', '--in-browser', '--theme', 'dark']
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Fooocus version: 0.2
Total VRAM 8187 MB, total RAM 32658 MB
Set vram state to: NORMAL_VRAM
Always offload VRAM
Device: cuda:0 NVIDIA GeForce RTX 4060 Ti : native
VAE dtype: torch.bfloat16
Using split optimization for cross attention
Refiner unloaded.
model_type EPS
UNet ADM Dimension 2816
Using split attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using split attention in VAE
Running on local URL:  http://127.0.0.1:7865

To create a public link, set `share=True` in `launch()`.
IMPORTANT: You are using gradio version 3.41.2, however version 4.44.1 is available, please upgrade.
--------
extra {'cond_stage_model.clip_l.logit_scale', 'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids', 'cond_stage_model.clip_l.text_projection'}
Base model loaded: D:\ProgramasOpenSource\DeFooocus_win64_portable\DeFooocus\models\checkpoints\FluentlyXL-v4.safetensors
Request to load LoRAs [['sd_xl_offset_example-lora_1.0.safetensors', 0.1], ['None', 1.0], ['None', 1.0], ['None', 1.0], ['None', 1.0]] for model [D:\ProgramasOpenSource\DeFooocus_win64_portable\DeFooocus\models\checkpoints\FluentlyXL-v4.safetensors].
Loaded LoRA [D:\ProgramasOpenSource\DeFooocus_win64_portable\DeFooocus\models\loras\sd_xl_offset_example-lora_1.0.safetensors] for UNet [D:\ProgramasOpenSource\DeFooocus_win64_portable\DeFooocus\models\checkpoints\FluentlyXL-v4.safetensors] with 788 keys at weight 0.1.
Fooocus V2 Expansion: Vocab with 642 words.
Fooocus Expansion engine loaded for cuda:0, use_fp16 = True.
Requested to load SDXLClipModel
Requested to load GPT2LMHeadModel
Loading 2 new models
[Fooocus Model Management] Moving model(s) has taken 0.66 seconds
Exception in thread Thread-2 (worker):
Traceback (most recent call last):
  File "threading.py", line 1016, in _bootstrap_inner
  File "threading.py", line 953, in run
  File "D:\ProgramasOpenSource\DeFooocus_win64_portable\DeFooocus\modules\async_worker.py", line 47, in worker
    from modules.censor import censor_batch
  File "D:\ProgramasOpenSource\DeFooocus_win64_portable\DeFooocus\modules\censor.py", line 4, in <module>
    from diffusers.pipelines.stable_diffusion.safety_checker import StableDiffusionSafetyChecker
  File "D:\ProgramasOpenSource\DeFooocus_win64_portable\python_embeded\lib\site-packages\diffusers\__init__.py", line 5, in <module>
    from .utils import (
  File "D:\ProgramasOpenSource\DeFooocus_win64_portable\python_embeded\lib\site-packages\diffusers\utils\__init__.py", line 37, in <module>
    from .dynamic_modules_utils import get_class_from_dynamic_module
  File "D:\ProgramasOpenSource\DeFooocus_win64_portable\python_embeded\lib\site-packages\diffusers\utils\dynamic_modules_utils.py", line 28, in <module>
    from huggingface_hub import cached_download, hf_hub_download, model_info
ImportError: cannot import name 'cached_download' from 'huggingface_hub' (D:\ProgramasOpenSource\DeFooocus_win64_portable\python_embeded\lib\site-packages\huggingface_hub\__init__.py)

Version

latest

Where are you running Fooocus?

Locally

Operating System

windows 11 24h2

What browsers are you seeing the problem on?

Chrome

fouadmabchour commented 3 weeks ago

Hello guys, Ihave the same issue Capture d'écran 2024-11-04 004228

fouadmabchour commented 3 weeks ago

@lgwenl i just resolve the problem by creating an empty folder called "cached_download" in ...DeFooocus\python_embeded\Lib\site-packages\huggingface_hub and it work perfectly 🥳

ehtryedgpepe commented 2 weeks ago

@lgwenlAcabo de resolver el problema creando una carpeta vacía llamada "cached_download" en ...DeFooocus\python_embeded\Lib\site-packages\huggingface_hub y funciona perfectamente 🥳

I can't find the line you mentioned DeFooocus\python_embeded\Lib\site-packages\huggingface_hub , could you please send a screenshot to do what you say?

Filarh commented 2 weeks ago

@lgwenl i just resolve the problem by creating an empty folder called "cached_download" in ...DeFooocus\python_embeded\Lib\site-packages\huggingface_hub and it work perfectly 🥳

TNXS i just fixed my fork

ehristoforu commented 1 week ago

Fixed. Your client will update and fix itself automatically. The problem was with the migration of the huggingface_hub module in version 0.26.1.