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

[Bug]: ModuleNotFoundError: No module named 'platformdirs' #19

Open
2 tasks done
nitinmukesh opened this issue Jun 30, 2024 · 1 comment
Open
2 tasks done

[Bug]: ModuleNotFoundError: No module named 'platformdirs' #19

nitinmukesh opened this issue Jun 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@nitinmukesh
Copy link

Prerequisites

Describe the problem

WebUI failed to launch

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
Version mismatch for tqdm: Installed version 4.64.1 does not meet requirement tqdm==4.65.0
Installing requirements
Downloading: "https://huggingface.co/lllyasviel/misc/resolve/main/xlvaeapp.pth" to C:\sd\DeFooocus_win64_portable\DeFooocus\models\vae_approx\xlvaeapp.pth

100%|███████████████████████████████████████████████████████████████████████████████| 209k/209k [00:00<00:00, 13.7MB/s]
Downloading: "https://huggingface.co/lllyasviel/misc/resolve/main/vaeapp_sd15.pt" to C:\sd\DeFooocus_win64_portable\DeFooocus\models\vae_approx\vaeapp_sd15.pth

100%|███████████████████████████████████████████████████████████████████████████████| 209k/209k [00:00<00:00, 6.88MB/s]
Downloading: "https://huggingface.co/lllyasviel/misc/resolve/main/xl-to-v1_interposer-v3.1.safetensors" to C:\sd\DeFooocus_win64_portable\DeFooocus\models\vae_approx\xl-to-v1_interposer-v3.1.safetensors

100%|█████████████████████████████████████████████████████████████████████████████| 6.25M/6.25M [00:00<00:00, 12.3MB/s]
Downloading: "https://huggingface.co/lllyasviel/misc/resolve/main/fooocus_expansion.bin" to C:\sd\DeFooocus_win64_portable\DeFooocus\models\prompt_expansion\fooocus_expansion\pytorch_model.bin

100%|███████████████████████████████████████████████████████████████████████████████| 335M/335M [00:27<00:00, 12.7MB/s]
Downloading: "https://huggingface.co/fluently/Fluently-XL-v4/resolve/main/FluentlyXL-v4.safetensors" to C:\sd\DeFooocus_win64_portable\DeFooocus\models\checkpoints\FluentlyXL-v4.safetensors

100%|█████████████████████████████████████████████████████████████████████████████| 6.62G/6.62G [09:19<00:00, 12.7MB/s]
Downloading: "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors" to C:\sd\DeFooocus_win64_portable\DeFooocus\models\loras\sd_xl_offset_example-lora_1.0.safetensors

100%|█████████████████████████████████████████████████████████████████████████████| 47.3M/47.3M [00:04<00:00, 11.4MB/s]
Total VRAM 8188 MB, total RAM 16108 MB
Set vram state to: NORMAL_VRAM
Always offload VRAM
Device: cuda:0 NVIDIA GeForce RTX 4060 Laptop GPU : 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
extra {'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_l.logit_scale', 'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids'}
Base model loaded: C:\sd\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 [C:\sd\DeFooocus_win64_portable\DeFooocus\models\checkpoints\FluentlyXL-v4.safetensors].
Loaded LoRA [C:\sd\DeFooocus_win64_portable\DeFooocus\models\loras\sd_xl_offset_example-lora_1.0.safetensors] for UNet [C:\sd\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 2.63 seconds
Exception in thread Thread-5 (worker):
Traceback (most recent call last):
  File "threading.py", line 1016, in _bootstrap_inner
  File "threading.py", line 953, in run
  File "C:\sd\DeFooocus_win64_portable\DeFooocus\modules\async_worker.py", line 47, in worker
    from modules.censor import censor_batch
  File "C:\sd\DeFooocus_win64_portable\DeFooocus\modules\censor.py", line 4, in <module>
    from diffusers.pipelines.stable_diffusion.safety_checker import StableDiffusionSafetyChecker
  File "C:\sd\DeFooocus_win64_portable\python_embeded\lib\site-packages\diffusers\__init__.py", line 5, in <module>
    from .utils import (
  File "C:\sd\DeFooocus_win64_portable\python_embeded\lib\site-packages\diffusers\utils\__init__.py", line 21, in <module>
    from .constants import (
  File "C:\sd\DeFooocus_win64_portable\python_embeded\lib\site-packages\diffusers\utils\constants.py", line 17, in <module>
    from huggingface_hub.constants import HF_HOME
ImportError: cannot import name 'HF_HOME' from 'huggingface_hub.constants' (C:\sd\DeFooocus_win64_portable\python_embeded\lib\site-packages\huggingface_hub\constants.py)
Traceback (most recent call last):
  File "C:\sd\DeFooocus_win64_portable\DeFooocus\entry_with_update.py", line 46, in <module>
    from launch import *
  File "C:\sd\DeFooocus_win64_portable\DeFooocus\launch.py", line 128, in <module>
    from webui import *
  File "C:\sd\DeFooocus_win64_portable\DeFooocus\webui.py", line 16, in <module>
    from modules.rembg import rembg_run
  File "C:\sd\DeFooocus_win64_portable\DeFooocus\modules\rembg.py", line 1, in <module>
    from rembg import remove
  File "C:\sd\DeFooocus_win64_portable\python_embeded\lib\site-packages\rembg\__init__.py", line 5, in <module>
    from .bg import remove
  File "C:\sd\DeFooocus_win64_portable\python_embeded\lib\site-packages\rembg\bg.py", line 21, in <module>
    from .session_factory import new_session
  File "C:\sd\DeFooocus_win64_portable\python_embeded\lib\site-packages\rembg\session_factory.py", line 6, in <module>
    from .sessions import sessions_class
  File "C:\sd\DeFooocus_win64_portable\python_embeded\lib\site-packages\rembg\sessions\__init__.py", line 13, in <module>
    module = import_module(f"{__name__}.{module_name}")
  File "importlib\__init__.py", line 126, in import_module
  File "C:\sd\DeFooocus_win64_portable\python_embeded\lib\site-packages\rembg\sessions\dis_anime.py", line 5, in <module>
    import pooch
  File "C:\sd\DeFooocus_win64_portable\python_embeded\lib\site-packages\pooch\__init__.py", line 10, in <module>
    from .core import Pooch, create, retrieve
  File "C:\sd\DeFooocus_win64_portable\python_embeded\lib\site-packages\pooch\core.py", line 19, in <module>
    from .utils import (
  File "C:\sd\DeFooocus_win64_portable\python_embeded\lib\site-packages\pooch\utils.py", line 19, in <module>
    import platformdirs
ModuleNotFoundError: No module named 'platformdirs'
Press any key to continue . . .

Version

Fooocus version: 0.2

Where are you running Fooocus?

Locally

Operating System

Windows 11

What browsers are you seeing the problem on?

Chrome

@nitinmukesh nitinmukesh added the bug Something isn't working label Jun 30, 2024
@ehristoforu
Copy link
Owner

Portable version?

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

2 participants