Fooocus
Fooocus copied to clipboard
things stopped working suspiciously with error "To create a public link, set `share=True` in `launch()`"
Describe the problem Every thing seems to be working perfectly, then out of no where it started responding with Error tried to take a look at the Logs in my console and seen this error happens immediately after starting the model
Full Console Log
Running on local URL: http://127.0.0.1:7865
To create a public link, set `share=True` in `launch()`.
Opening in existing browser session.
Exception in thread Thread-2 (worker):
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/monier/open-source/Fooocus-2/modules/async_worker.py", line 25, in worker
import modules.default_pipeline as pipeline
File "/home/monier/open-source/Fooocus-2/modules/default_pipeline.py", line 1, in <module>
import modules.core as core
File "/home/monier/open-source/Fooocus-2/modules/core.py", line 1, in <module>
from modules.patch import patch_all
File "/home/monier/open-source/Fooocus-2/modules/patch.py", line 6, in <module>
import fcbh.model_base
File "/home/monier/open-source/Fooocus-2/backend/headless/fcbh/model_base.py", line 2, in <module>
from fcbh.ldm.modules.diffusionmodules.openaimodel import UNetModel
File "/home/monier/open-source/Fooocus-2/backend/headless/fcbh/ldm/modules/diffusionmodules/openaimodel.py", line 16, in <module>
from ..attention import SpatialTransformer
File "/home/monier/open-source/Fooocus-2/backend/headless/fcbh/ldm/modules/attention.py", line 10, in <module>
from .sub_quadratic_attention import efficient_dot_product_attention
File "/home/monier/open-source/Fooocus-2/backend/headless/fcbh/ldm/modules/sub_quadratic_attention.py", line 27, in <module>
from fcbh import model_management
File "/home/monier/open-source/Fooocus-2/backend/headless/fcbh/model_management.py", line 114, in <module>
total_vram = get_total_memory(get_torch_device()) / (1024 * 1024)
File "/home/monier/open-source/Fooocus-2/backend/headless/fcbh/model_management.py", line 83, in get_torch_device
return torch.device(torch.cuda.current_device())
File "/home/monier/.local/lib/python3.10/site-packages/torch/cuda/__init__.py", line 769, in current_device
_lazy_init()
File "/home/monier/.local/lib/python3.10/site-packages/torch/cuda/__init__.py", line 298, in _lazy_init
torch._C._cuda_init()
RuntimeError: CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero.
Same problem, It worked yesterday then it broke.
from log you forget to activate venv or conda env
or if you intentionally use system python, then all other software will influence fooocus and we never know what is going wrong.
please follow official instillation guide to resolve problem
I am getting the same CUDA error running it in Python Venv
OS: Ubuntu 22.04.3 LTS (headless) RAM: 64GB GPU: GeForce RTX 2060 Driver Version: 530.41.03 CUDA Version: 12.1
(fooocus_env) thecli3nt@gibson:~/Fooocus$ source fooocus_env/bin/activate (fooocus_env) thecli3nt@gibson:~/Fooocus$ python entry_with_update.py --preset realistic --listen Already up-to-date Update succeeded. [System ARGV] ['entry_with_update.py', '--preset', 'realistic', '--listen'] Loaded preset: /home/thecli3nt/Fooocus/presets/realistic.json Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] Fooocus version: 2.1.824 Installing torch and torchvision Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu121 Collecting torch==2.1.0 Using cached https://download.pytorch.org/whl/cu121/torch-2.1.0%2Bcu121-cp310-cp310-linux_x86_64.whl (2200.6 MB) Collecting torchvision==0.16.0 Using cached https://download.pytorch.org/whl/cu121/torchvision-0.16.0%2Bcu121-cp310-cp310-linux_x86_64.whl (7.0 MB) Requirement already satisfied: filelock in ./fooocus_env/lib/python3.10/site-packages (from torch==2.1.0) (3.13.1) Requirement already satisfied: jinja2 in ./fooocus_env/lib/python3.10/site-packages (from torch==2.1.0) (3.1.2) Requirement already satisfied: sympy in ./fooocus_env/lib/python3.10/site-packages (from torch==2.1.0) (1.12) Requirement already satisfied: triton==2.1.0 in ./fooocus_env/lib/python3.10/site-packages (from torch==2.1.0) (2.1.0) Requirement already satisfied: fsspec in ./fooocus_env/lib/python3.10/site-packages (from torch==2.1.0) (2023.12.1) Requirement already satisfied: typing-extensions in ./fooocus_env/lib/python3.10/site-packages (from torch==2.1.0) (4.9.0) Requirement already satisfied: networkx in ./fooocus_env/lib/python3.10/site-packages (from torch==2.1.0) (3.2.1) Requirement already satisfied: numpy in ./fooocus_env/lib/python3.10/site-packages (from torchvision==0.16.0) (1.23.5) Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in ./fooocus_env/lib/python3.10/site-packages (from torchvision==0.16.0) (9.2.0) Requirement already satisfied: requests in ./fooocus_env/lib/python3.10/site-packages (from torchvision==0.16.0) (2.31.0) Requirement already satisfied: MarkupSafe>=2.0 in ./fooocus_env/lib/python3.10/site-packages (from jinja2->torch==2.1.0) (2.1.3) Requirement already satisfied: charset-normalizer<4,>=2 in ./fooocus_env/lib/python3.10/site-packages (from requests->torchvision==0.16.0) (3.3.2) Requirement already satisfied: urllib3<3,>=1.21.1 in ./fooocus_env/lib/python3.10/site-packages (from requests->torchvision==0.16.0) (2.1.0) Requirement already satisfied: idna<4,>=2.5 in ./fooocus_env/lib/python3.10/site-packages (from requests->torchvision==0.16.0) (3.6) Requirement already satisfied: certifi>=2017.4.17 in ./fooocus_env/lib/python3.10/site-packages (from requests->torchvision==0.16.0) (2023.11.17) Requirement already satisfied: mpmath>=0.19 in ./fooocus_env/lib/python3.10/site-packages (from sympy->torch==2.1.0) (1.3.0) Installing collected packages: torch, torchvision Attempting uninstall: torch Found existing installation: torch 2.1.1 Uninstalling torch-2.1.1: Successfully uninstalled torch-2.1.1 Successfully installed torch-2.1.0+cu121 torchvision-0.16.0+cu121 Downloading: "https://huggingface.co/lllyasviel/fav_models/resolve/main/fav/realisticStockPhoto_v10.safetensors" to /home/thecli3nt/Fooocus/models/checkpoints/realisticStockPhoto_v10.safetensors
100%|████████████████████████████████████████████████████████████████████████████| 6.46G/6.46G [01:00<00:00, 115MB/s] Downloading: "https://huggingface.co/lllyasviel/fav_models/resolve/main/fav/SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors" to /home/thecli3nt/Fooocus/models/loras/SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors
100%|██████████████████████████████████████████████████████████████████████████████| 222M/222M [00:01<00:00, 117MB/s] Downloading: "https://huggingface.co/lllyasviel/misc/resolve/main/xlvaeapp.pth" to /home/thecli3nt/Fooocus/models/vae_approx/xlvaeapp.pth
100%|█████████████████████████████████████████████████████████████████████████████| 209k/209k [00:00<00:00, 67.5MB/s] Downloading: "https://huggingface.co/lllyasviel/misc/resolve/main/vaeapp_sd15.pt" to /home/thecli3nt/Fooocus/models/vae_approx/vaeapp_sd15.pth
100%|█████████████████████████████████████████████████████████████████████████████| 209k/209k [00:00<00:00, 48.7MB/s] Downloading: "https://huggingface.co/lllyasviel/misc/resolve/main/xl-to-v1_interposer-v3.1.safetensors" to /home/thecli3nt/Fooocus/models/vae_approx/xl-to-v1_interposer-v3.1.safetensors
100%|████████████████████████████████████████████████████████████████████████████| 6.25M/6.25M [00:00<00:00, 110MB/s] Downloading: "https://huggingface.co/lllyasviel/misc/resolve/main/fooocus_expansion.bin" to /home/thecli3nt/Fooocus/models/prompt_expansion/fooocus_expansion/pytorch_model.bin
100%|██████████████████████████████████████████████████████████████████████████████| 335M/335M [00:02<00:00, 117MB/s]
Exception in thread Thread-3 (worker):
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/thecli3nt/Fooocus/modules/async_worker.py", line 25, in worker
import modules.default_pipeline as pipeline
File "/home/thecli3nt/Fooocus/modules/default_pipeline.py", line 1, in
To create a public link, set share=True
in launch()
.
Closed, please follow official instructions and activate venv or conda env, see https://github.com/lllyasviel/Fooocus/issues/1302#issuecomment-1849229029