lllyasviel / Fooocus

Focus on prompting and generating
GNU General Public License v3.0
41.33k stars 5.85k forks source link

[Bug]: model_fields_schema() got an unexpected keyword argument 'extra_validator' #3320

Closed SirDariusIsCoding closed 3 months ago

SirDariusIsCoding commented 3 months ago

Checklist

What happened?

Fooocus was working fine on the 17th, launched with the auto update switch and ran into some intial errors. Then began trying to perform the update per your instructions once I realized a new release was available and was able to successfully complete 1 and 2. However, I am getting different errors when the software launches. The first error below on a fresh install.

Running Python 3.10.9, although I have/had other versions installed for comfyui/animate diff etc. - i've uninstalled anything newer than 3.10.9.

--- In one instance, I have also tried removing the code for the extra validator in the python script and it did pass but errored on something else.

Steps to reproduce the problem

Launch run.bat with default switches.

What should have happened?

Generally fooocus would launch into the GUI console

What browsers do you use to access Fooocus?

No response

Where are you running Fooocus?

Locally

What operating system are you using?

Windows 11

Console logs

E:\Fooocus>.\python_embeded\python.exe -s Fooocus\entry_with_update.py
Fast-forward merge
Update succeeded.
[System ARGV] ['Fooocus\\entry_with_update.py']
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Fooocus version: 2.5.0
Version mismatch for torchsde: Installed version 0.2.5 does not meet requirement torchsde==0.2.6
Installing requirements
[Cleanup] Attempting to delete content of temp dir C:\Users\DARIUS~1\AppData\Local\Temp\fooocus
[Cleanup] Cleanup successful
Downloading: "https://huggingface.co/mashb1t/misc/resolve/main/xl-to-v1_interposer-v4.0.safetensors" to E:\Fooocus\Fooocus\models\vae_approx\xl-to-v1_interposer-v4.0.safetensors

100%|█████████████████████████████████████████████████████████████████████████████| 5.40M/5.40M [00:00<00:00, 30.3MB/s]
Downloading: "https://huggingface.co/lllyasviel/fav_models/resolve/main/fav/juggernautXL_v8Rundiffusion.safetensors" to E:\Fooocus\Fooocus\models\checkpoints\juggernautXL_v8Rundiffusion.safetensors

100%|██████████████████████████████████████████████████████████████████████████████| 6.62G/6.62G [01:03<00:00, 111MB/s]
Traceback (most recent call last):
  File "E:\Fooocus\Fooocus\entry_with_update.py", line 46, in <module>
    from launch import *
  File "E:\Fooocus\Fooocus\launch.py", line 147, in <module>
    from webui import *
  File "E:\Fooocus\Fooocus\webui.py", line 1, in <module>
    import gradio as gr
  File "E:\Fooocus\python_embeded\lib\site-packages\gradio\__init__.py", line 3, in <module>
    import gradio.components as components
  File "E:\Fooocus\python_embeded\lib\site-packages\gradio\components\__init__.py", line 1, in <module>
    from gradio.components.annotated_image import AnnotatedImage
  File "E:\Fooocus\python_embeded\lib\site-packages\gradio\components\annotated_image.py", line 13, in <module>
    from gradio.components.base import IOComponent, _Keywords
  File "E:\Fooocus\python_embeded\lib\site-packages\gradio\components\base.py", line 20, in <module>
    from fastapi import UploadFile
  File "E:\Fooocus\python_embeded\lib\site-packages\fastapi\__init__.py", line 7, in <module>
    from .applications import FastAPI as FastAPI
  File "E:\Fooocus\python_embeded\lib\site-packages\fastapi\applications.py", line 16, in <module>
    from fastapi import routing
  File "E:\Fooocus\python_embeded\lib\site-packages\fastapi\routing.py", line 22, in <module>
    from fastapi import params
  File "E:\Fooocus\python_embeded\lib\site-packages\fastapi\params.py", line 8, in <module>
    from ._compat import PYDANTIC_V2, Undefined
  File "E:\Fooocus\python_embeded\lib\site-packages\fastapi\_compat.py", line 20, in <module>
    from fastapi.exceptions import RequestErrorModel
  File "E:\Fooocus\python_embeded\lib\site-packages\fastapi\exceptions.py", line 18, in <module>
    RequestErrorModel: Type[BaseModel] = create_model("Request")
  File "E:\Fooocus\python_embeded\lib\site-packages\pydantic\main.py", line 1349, in create_model
    return meta(__model_name, resolved_bases, namespace, __pydantic_reset_parent_namespace__=False, **kwds)
  File "E:\Fooocus\python_embeded\lib\site-packages\pydantic\_internal\_model_construction.py", line 173, in __new__
    complete_model_class(
  File "E:\Fooocus\python_embeded\lib\site-packages\pydantic\_internal\_model_construction.py", line 463, in complete_model_class
    schema = cls.__get_pydantic_core_schema__(cls, handler)
  File "E:\Fooocus\python_embeded\lib\site-packages\pydantic\main.py", line 549, in __get_pydantic_core_schema__
    return __handler(__source)
  File "E:\Fooocus\python_embeded\lib\site-packages\pydantic\_internal\_schema_generation_shared.py", line 82, in __call__
    schema = self._handler(__source_type)
  File "E:\Fooocus\python_embeded\lib\site-packages\pydantic\_internal\_generate_schema.py", line 426, in generate_schema
    return self._generate_schema_for_type(
  File "E:\Fooocus\python_embeded\lib\site-packages\pydantic\_internal\_generate_schema.py", line 458, in _generate_schema_for_type
    schema = self._generate_schema(obj)
  File "E:\Fooocus\python_embeded\lib\site-packages\pydantic\_internal\_generate_schema.py", line 684, in _generate_schema
    return self._model_schema(obj)
  File "E:\Fooocus\python_embeded\lib\site-packages\pydantic\_internal\_generate_schema.py", line 527, in _model_schema
    fields_schema: core_schema.CoreSchema = core_schema.model_fields_schema(
TypeError: model_fields_schema() got an unexpected keyword argument 'extra_validator'

E:\Fooocus>pause
Press any key to continue . . .

Additional information

Currently on driver 560.70 released 7/16/2024

SirDariusIsCoding commented 3 months ago

E:\Fooocus\Fooocus>..\python_embeded\python.exe -m pip install -r .\requirements_versions.txt --user Requirement already satisfied: torchsde==0.2.6 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 1)) (0.2.6) Requirement already satisfied: einops==0.8.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 2)) (0.8.0) Requirement already satisfied: transformers==4.42.4 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 3)) (4.42.4) Requirement already satisfied: safetensors==0.4.3 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 4)) (0.4.3) Requirement already satisfied: accelerate==0.32.1 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 5)) (0.32.1) Requirement already satisfied: pyyaml==6.0.1 in e:\fooocus\python_embeded\lib\site-packages (from -r .\requirements_versions.txt (line 6)) (6.0.1) Requirement already satisfied: pillow==10.4.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 7)) (10.4.0) Requirement already satisfied: scipy==1.14.0 in e:\fooocus\python_embeded\lib\site-packages (from -r .\requirements_versions.txt (line 8)) (1.14.0) Requirement already satisfied: tqdm==4.66.4 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 9)) (4.66.4) Requirement already satisfied: psutil==6.0.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 10)) (6.0.0) Requirement already satisfied: pytorch_lightning==2.3.3 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 11)) (2.3.3) Requirement already satisfied: omegaconf==2.3.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 12)) (2.3.0) Requirement already satisfied: gradio==3.41.2 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 13)) (3.41.2) Requirement already satisfied: pygit2==1.15.1 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 14)) (1.15.1) Requirement already satisfied: opencv-contrib-python-headless==4.10.0.84 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 15)) (4.10.0.84) Requirement already satisfied: httpx==0.27.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 16)) (0.27.0) Requirement already satisfied: onnxruntime==1.18.1 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 17)) (1.18.1) Requirement already satisfied: timm==1.0.7 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 18)) (1.0.7) Requirement already satisfied: numpy==1.26.4 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 19)) (1.26.4) Requirement already satisfied: tokenizers==0.19.1 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 20)) (0.19.1) Requirement already satisfied: packaging==24.1 in e:\fooocus\python_embeded\lib\site-packages (from -r .\requirements_versions.txt (line 21)) (24.1) Requirement already satisfied: rembg==2.0.57 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 22)) (2.0.57) Requirement already satisfied: groundingdino-py==0.4.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 23)) (0.4.0) Requirement already satisfied: segment_anything==1.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from -r .\requirements_versions.txt (line 24)) (1.0) Requirement already satisfied: torch>=1.6.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from torchsde==0.2.6->-r .\requirements_versions.txt (line 1)) (2.3.1) Requirement already satisfied: trampoline>=0.1.2 in c:\users\DF\appdata\roaming\python\python310\site-packages (from torchsde==0.2.6->-r .\requirements_versions.txt (line 1)) (0.1.2) Requirement already satisfied: filelock in c:\users\DF\appdata\roaming\python\python310\site-packages (from transformers==4.42.4->-r .\requirements_versions.txt (line 3)) (3.13.1) Requirement already satisfied: huggingface-hub<1.0,>=0.23.2 in c:\users\DF\appdata\roaming\python\python310\site-packages (from transformers==4.42.4->-r .\requirements_versions.txt (line 3)) (0.24.0) Requirement already satisfied: regex!=2019.12.17 in c:\users\DF\appdata\roaming\python\python310\site-packages (from transformers==4.42.4->-r .\requirements_versions.txt (line 3)) (2024.5.15) Requirement already satisfied: requests in c:\users\DF\appdata\roaming\python\python310\site-packages (from transformers==4.42.4->-r .\requirements_versions.txt (line 3)) (2.31.0) Requirement already satisfied: colorama in e:\fooocus\python_embeded\lib\site-packages (from tqdm==4.66.4->-r .\requirements_versions.txt (line 9)) (0.4.6) Requirement already satisfied: fsspec>=2022.5.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from fsspec[http]>=2022.5.0->pytorch_lightning==2.3.3->-r .\requirements_versions.txt (line 11)) (2024.2.0) Requirement already satisfied: torchmetrics>=0.7.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from pytorch_lightning==2.3.3->-r .\requirements_versions.txt (line 11)) (1.4.0.post0) Requirement already satisfied: typing-extensions>=4.4.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from pytorch_lightning==2.3.3->-r .\requirements_versions.txt (line 11)) (4.10.0) Requirement already satisfied: lightning-utilities>=0.10.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from pytorch_lightning==2.3.3->-r .\requirements_versions.txt (line 11)) (0.11.5) Requirement already satisfied: antlr4-python3-runtime==4.9. in c:\users\DF\appdata\roaming\python\python310\site-packages (from omegaconf==2.3.0->-r .\requirements_versions.txt (line 12)) (4.9.3) Requirement already satisfied: aiofiles<24.0,>=22.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (23.2.1) Requirement already satisfied: altair<6.0,>=4.2.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (5.3.0) Requirement already satisfied: fastapi in c:\users\DF\appdata\roaming\python\python310\site-packages (from gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (0.111.1) Requirement already satisfied: ffmpy in c:\users\DF\appdata\roaming\python\python310\site-packages (from gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (0.3.2) Requirement already satisfied: gradio-client==0.5.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (0.5.0) Requirement already satisfied: importlib-resources<7.0,>=1.3 in c:\users\DF\appdata\roaming\python\python310\site-packages (from gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (6.4.0) Requirement already satisfied: jinja2<4.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (3.1.3) Requirement already satisfied: markupsafe~=2.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (2.1.5) Requirement already satisfied: matplotlib~=3.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (3.9.1) Requirement already satisfied: orjson~=3.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (3.10.6) Requirement already satisfied: pandas<3.0,>=1.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (2.2.2) Requirement already satisfied: pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4 in c:\users\DF\appdata\roaming\python\python310\site-packages (from gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (2.8.2) Requirement already satisfied: pydub in c:\users\DF\appdata\roaming\python\python310\site-packages (from gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (0.25.1) Requirement already satisfied: python-multipart in c:\users\DF\appdata\roaming\python\python310\site-packages (from gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (0.0.9) Requirement already satisfied: semantic-version~=2.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (2.10.0) Requirement already satisfied: uvicorn>=0.14.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (0.30.1) Requirement already satisfied: websockets<12.0,>=10.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (11.0.3) Requirement already satisfied: cffi>=1.16.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from pygit2==1.15.1->-r .\requirements_versions.txt (line 14)) (1.16.0) Requirement already satisfied: anyio in c:\users\DF\appdata\roaming\python\python310\site-packages (from httpx==0.27.0->-r .\requirements_versions.txt (line 16)) (4.4.0) Requirement already satisfied: certifi in e:\fooocus\python_embeded\lib\site-packages (from httpx==0.27.0->-r .\requirements_versions.txt (line 16)) (2023.5.7) Requirement already satisfied: httpcore==1. in c:\users\DF\appdata\roaming\python\python310\site-packages (from httpx==0.27.0->-r .\requirements_versions.txt (line 16)) (1.0.5) Requirement already satisfied: idna in e:\fooocus\python_embeded\lib\site-packages (from httpx==0.27.0->-r .\requirements_versions.txt (line 16)) (3.4) Requirement already satisfied: sniffio in e:\fooocus\python_embeded\lib\site-packages (from httpx==0.27.0->-r .\requirements_versions.txt (line 16)) (1.3.0) Requirement already satisfied: coloredlogs in c:\users\DF\appdata\roaming\python\python310\site-packages (from onnxruntime==1.18.1->-r .\requirements_versions.txt (line 17)) (15.0.1) Requirement already satisfied: flatbuffers in c:\users\DF\appdata\roaming\python\python310\site-packages (from onnxruntime==1.18.1->-r .\requirements_versions.txt (line 17)) (24.3.25) Requirement already satisfied: protobuf in e:\fooocus\python_embeded\lib\site-packages (from onnxruntime==1.18.1->-r .\requirements_versions.txt (line 17)) (5.27.2) Requirement already satisfied: sympy in c:\users\DF\appdata\roaming\python\python310\site-packages (from onnxruntime==1.18.1->-r .\requirements_versions.txt (line 17)) (1.12) Requirement already satisfied: torchvision in c:\users\DF\appdata\roaming\python\python310\site-packages (from timm==1.0.7->-r .\requirements_versions.txt (line 18)) (0.18.1) Requirement already satisfied: jsonschema in c:\users\DF\appdata\roaming\python\python310\site-packages (from rembg==2.0.57->-r .\requirements_versions.txt (line 22)) (4.23.0) Requirement already satisfied: opencv-python-headless in e:\fooocus\python_embeded\lib\site-packages (from rembg==2.0.57->-r .\requirements_versions.txt (line 22)) (4.10.0.84) Requirement already satisfied: pooch in c:\users\DF\appdata\roaming\python\python310\site-packages (from rembg==2.0.57->-r .\requirements_versions.txt (line 22)) (1.8.2) Requirement already satisfied: pymatting in c:\users\DF\appdata\roaming\python\python310\site-packages (from rembg==2.0.57->-r .\requirements_versions.txt (line 22)) (1.1.12) Requirement already satisfied: scikit-image in c:\users\DF\appdata\roaming\python\python310\site-packages (from rembg==2.0.57->-r .\requirements_versions.txt (line 22)) (0.24.0) Requirement already satisfied: addict in e:\fooocus\python_embeded\lib\site-packages (from groundingdino-py==0.4.0->-r .\requirements_versions.txt (line 23)) (2.4.0) Requirement already satisfied: yapf in c:\users\DF\appdata\roaming\python\python310\site-packages (from groundingdino-py==0.4.0->-r .\requirements_versions.txt (line 23)) (0.40.2) Requirement already satisfied: opencv-python in c:\users\DF\appdata\roaming\python\python310\site-packages (from groundingdino-py==0.4.0->-r .\requirements_versions.txt (line 23)) (4.5.4.60) Requirement already satisfied: supervision==0.6.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from groundingdino-py==0.4.0->-r .\requirements_versions.txt (line 23)) (0.6.0) Requirement already satisfied: pycocotools in c:\users\DF\appdata\roaming\python\python310\site-packages (from groundingdino-py==0.4.0->-r .\requirements_versions.txt (line 23)) (2.0.8) Requirement already satisfied: h11<0.15,>=0.13 in c:\users\DF\appdata\roaming\python\python310\site-packages (from httpcore==1.*->httpx==0.27.0->-r .\requirements_versions.txt (line 16)) (0.14.0) Requirement already satisfied: toolz in c:\users\DF\appdata\roaming\python\python310\site-packages (from altair<6.0,>=4.2.0->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (0.12.1) Requirement already satisfied: pycparser in e:\fooocus\python_embeded\lib\site-packages (from cffi>=1.16.0->pygit2==1.15.1->-r .\requirements_versions.txt (line 14)) (2.21) Requirement already satisfied: aiohttp!=4.0.0a0,!=4.0.0a1 in c:\users\DF\appdata\roaming\python\python310\site-packages (from fsspec[http]>=2022.5.0->pytorch_lightning==2.3.3->-r .\requirements_versions.txt (line 11)) (3.9.5) Requirement already satisfied: attrs>=22.2.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from jsonschema->rembg==2.0.57->-r .\requirements_versions.txt (line 22)) (23.2.0) Requirement already satisfied: jsonschema-specifications>=2023.03.6 in c:\users\DF\appdata\roaming\python\python310\site-packages (from jsonschema->rembg==2.0.57->-r .\requirements_versions.txt (line 22)) (2023.12.1) Requirement already satisfied: referencing>=0.28.4 in c:\users\DF\appdata\roaming\python\python310\site-packages (from jsonschema->rembg==2.0.57->-r .\requirements_versions.txt (line 22)) (0.35.1) Requirement already satisfied: rpds-py>=0.7.1 in c:\users\DF\appdata\roaming\python\python310\site-packages (from jsonschema->rembg==2.0.57->-r .\requirements_versions.txt (line 22)) (0.19.0) Requirement already satisfied: setuptools in e:\fooocus\python_embeded\lib\site-packages (from lightning-utilities>=0.10.0->pytorch_lightning==2.3.3->-r .\requirements_versions.txt (line 11)) (68.0.0) Requirement already satisfied: contourpy>=1.0.1 in c:\users\DF\appdata\roaming\python\python310\site-packages (from matplotlib~=3.0->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (1.2.1) Requirement already satisfied: cycler>=0.10 in c:\users\DF\appdata\roaming\python\python310\site-packages (from matplotlib~=3.0->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (0.12.1) Requirement already satisfied: fonttools>=4.22.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from matplotlib~=3.0->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (4.53.1) Requirement already satisfied: kiwisolver>=1.3.1 in e:\fooocus\python_embeded\lib\site-packages (from matplotlib~=3.0->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (1.4.4) Requirement already satisfied: pyparsing>=2.3.1 in e:\fooocus\python_embeded\lib\site-packages (from matplotlib~=3.0->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (3.0.9) Requirement already satisfied: python-dateutil>=2.7 in e:\fooocus\python_embeded\lib\site-packages (from matplotlib~=3.0->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (2.8.2) Requirement already satisfied: pytz>=2020.1 in c:\users\DF\appdata\roaming\python\python310\site-packages (from pandas<3.0,>=1.0->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (2024.1) Requirement already satisfied: tzdata>=2022.7 in c:\users\DF\appdata\roaming\python\python310\site-packages (from pandas<3.0,>=1.0->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (2024.1) Requirement already satisfied: annotated-types>=0.4.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (0.7.0) Requirement already satisfied: pydantic-core==2.20.1 in e:\fooocus\python_embeded\lib\site-packages (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (2.20.1) Requirement already satisfied: charset-normalizer<4,>=2 in e:\fooocus\python_embeded\lib\site-packages (from requests->transformers==4.42.4->-r .\requirements_versions.txt (line 3)) (3.1.0) Requirement already satisfied: urllib3<3,>=1.21.1 in e:\fooocus\python_embeded\lib\site-packages (from requests->transformers==4.42.4->-r .\requirements_versions.txt (line 3)) (2.0.3) Requirement already satisfied: networkx in c:\users\DF\appdata\roaming\python\python310\site-packages (from torch>=1.6.0->torchsde==0.2.6->-r .\requirements_versions.txt (line 1)) (3.2.1) Requirement already satisfied: mkl<=2021.4.0,>=2021.1.1 in c:\users\DF\appdata\roaming\python\python310\site-packages (from torch>=1.6.0->torchsde==0.2.6->-r .\requirements_versions.txt (line 1)) (2021.4.0) Requirement already satisfied: click>=7.0 in e:\fooocus\python_embeded\lib\site-packages (from uvicorn>=0.14.0->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (8.1.6) Requirement already satisfied: exceptiongroup>=1.0.2 in c:\users\DF\appdata\roaming\python\python310\site-packages (from anyio->httpx==0.27.0->-r .\requirements_versions.txt (line 16)) (1.2.2) Requirement already satisfied: humanfriendly>=9.1 in c:\users\DF\appdata\roaming\python\python310\site-packages (from coloredlogs->onnxruntime==1.18.1->-r .\requirements_versions.txt (line 17)) (10.0) Requirement already satisfied: starlette<0.38.0,>=0.37.2 in c:\users\DF\appdata\roaming\python\python310\site-packages (from fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (0.37.2) Requirement already satisfied: fastapi-cli>=0.0.2 in c:\users\DF\appdata\roaming\python\python310\site-packages (from fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (0.0.4) Requirement already satisfied: email_validator>=2.0.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (2.2.0) Requirement already satisfied: platformdirs>=2.5.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from pooch->rembg==2.0.57->-r .\requirements_versions.txt (line 22)) (4.2.2) Requirement already satisfied: numba!=0.49.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from pymatting->rembg==2.0.57->-r .\requirements_versions.txt (line 22)) (0.60.0) Requirement already satisfied: imageio>=2.33 in e:\fooocus\python_embeded\lib\site-packages (from scikit-image->rembg==2.0.57->-r .\requirements_versions.txt (line 22)) (2.34.2) Requirement already satisfied: tifffile>=2022.8.12 in e:\fooocus\python_embeded\lib\site-packages (from scikit-image->rembg==2.0.57->-r .\requirements_versions.txt (line 22)) (2024.7.2) Requirement already satisfied: lazy-loader>=0.4 in c:\users\DF\appdata\roaming\python\python310\site-packages (from scikit-image->rembg==2.0.57->-r .\requirements_versions.txt (line 22)) (0.4) Requirement already satisfied: mpmath>=0.19 in c:\users\DF\appdata\roaming\python\python310\site-packages (from sympy->onnxruntime==1.18.1->-r .\requirements_versions.txt (line 17)) (1.3.0) Requirement already satisfied: importlib-metadata>=6.6.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from yapf->groundingdino-py==0.4.0->-r .\requirements_versions.txt (line 23)) (8.0.0) Requirement already satisfied: tomli>=2.0.1 in e:\fooocus\python_embeded\lib\site-packages (from yapf->groundingdino-py==0.4.0->-r .\requirements_versions.txt (line 23)) (2.0.1) Requirement already satisfied: aiosignal>=1.1.2 in c:\users\DF\appdata\roaming\python\python310\site-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]>=2022.5.0->pytorch_lightning==2.3.3->-r .\requirements_versions.txt (line 11)) (1.3.1) Requirement already satisfied: frozenlist>=1.1.1 in c:\users\DF\appdata\roaming\python\python310\site-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]>=2022.5.0->pytorch_lightning==2.3.3->-r .\requirements_versions.txt (line 11)) (1.4.1) Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\DF\appdata\roaming\python\python310\site-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]>=2022.5.0->pytorch_lightning==2.3.3->-r .\requirements_versions.txt (line 11)) (6.0.5) Requirement already satisfied: yarl<2.0,>=1.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]>=2022.5.0->pytorch_lightning==2.3.3->-r .\requirements_versions.txt (line 11)) (1.9.4) Requirement already satisfied: async-timeout<5.0,>=4.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]>=2022.5.0->pytorch_lightning==2.3.3->-r .\requirements_versions.txt (line 11)) (4.0.3) Requirement already satisfied: dnspython>=2.0.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from email_validator>=2.0.0->fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (2.6.1) Requirement already satisfied: typer>=0.12.3 in c:\users\DF\appdata\roaming\python\python310\site-packages (from fastapi-cli>=0.0.2->fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (0.12.3) Requirement already satisfied: pyreadline3 in c:\users\DF\appdata\roaming\python\python310\site-packages (from humanfriendly>=9.1->coloredlogs->onnxruntime==1.18.1->-r .\requirements_versions.txt (line 17)) (3.4.1) Requirement already satisfied: zipp>=0.5 in e:\fooocus\python_embeded\lib\site-packages (from importlib-metadata>=6.6.0->yapf->groundingdino-py==0.4.0->-r .\requirements_versions.txt (line 23)) (3.19.2) Requirement already satisfied: intel-openmp==2021. in c:\users\DF\appdata\roaming\python\python310\site-packages (from mkl<=2021.4.0,>=2021.1.1->torch>=1.6.0->torchsde==0.2.6->-r .\requirements_versions.txt (line 1)) (2021.4.0) Requirement already satisfied: tbb==2021. in e:\fooocus\python_embeded\lib\site-packages (from mkl<=2021.4.0,>=2021.1.1->torch>=1.6.0->torchsde==0.2.6->-r .\requirements_versions.txt (line 1)) (2021.13.0) Requirement already satisfied: llvmlite<0.44,>=0.43.0dev0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from numba!=0.49.0->pymatting->rembg==2.0.57->-r .\requirements_versions.txt (line 22)) (0.43.0) Requirement already satisfied: six>=1.5 in e:\fooocus\python_embeded\lib\site-packages (from python-dateutil>=2.7->matplotlib~=3.0->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (1.16.0) Requirement already satisfied: httptools>=0.5.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from uvicorn[standard]>=0.12.0->fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (0.6.1) Requirement already satisfied: python-dotenv>=0.13 in c:\users\DF\appdata\roaming\python\python310\site-packages (from uvicorn[standard]>=0.12.0->fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (1.0.1) Requirement already satisfied: watchfiles>=0.13 in c:\users\DF\appdata\roaming\python\python310\site-packages (from uvicorn[standard]>=0.12.0->fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (0.22.0) Requirement already satisfied: shellingham>=1.3.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from typer>=0.12.3->fastapi-cli>=0.0.2->fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (1.5.4) Requirement already satisfied: rich>=10.11.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from typer>=0.12.3->fastapi-cli>=0.0.2->fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (13.7.1) Requirement already satisfied: markdown-it-py>=2.2.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from rich>=10.11.0->typer>=0.12.3->fastapi-cli>=0.0.2->fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (3.0.0) Requirement already satisfied: pygments<3.0.0,>=2.13.0 in c:\users\DF\appdata\roaming\python\python310\site-packages (from rich>=10.11.0->typer>=0.12.3->fastapi-cli>=0.0.2->fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (2.18.0) Requirement already satisfied: mdurl~=0.1 in e:\fooocus\python_embeded\lib\site-packages (from markdown-it-py>=2.2.0->rich>=10.11.0->typer>=0.12.3->fastapi-cli>=0.0.2->fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (0.1.2)

SirDariusIsCoding commented 3 months ago

E:\Fooocus\Fooocus>git pull Already up to date.

mashb1t commented 3 months ago

Your PC is not using the embedded python version, but rather c:\users\DF\appdata\roaming\python\python310. Ensure to run ..\python_embeded\python.exe -m pip install -r .\requirements_versions.txt without --user and/or uninstall Python 3.10 from your system. Last resort is always to download the zip file in the latest release containing all packages.

SirDariusIsCoding commented 3 months ago

Hi there @mashb1t ,

Thanks for taking a look. This is happening on a fresh install btw/brand new zip. Also I have uninstalled Python 3.10 and am receiving the same error.

fields_schema: core_schema.CoreSchema = core_schema.model_fields_schema( TypeError: model_fields_schema() got an unexpected keyword argument 'extra_validator'


E:\Fooocus 25\Fooocus_win64_2-5-0\python_embeded>where python E:\Fooocus 25\Fooocus_win64_2-5-0\python_embeded\python.exe C:\Users\DF\AppData\Local\Programs\Python\Python38\python.exe C:\Users\DF\AppData\Local\Microsoft\WindowsApps\python.exe

mashb1t commented 3 months ago

@SirDariusIsCoding i've already posted 2 solutions in the last comment, please choose one or the other.

SirDariusIsCoding commented 3 months ago

@SirDariusIsCoding i've already posted 2 solutions in the last comment, please choose one or the other.

@mashb1t Yessir - I have tried both solutions and am still receiving the same error. I have re-run the command that you provided, removing --user switch and also uninstalled python 3.10 via add/remove programs in windows 11.

Doing some research apparently uninstalling Python via add/remove programs in windows 10/11 doesn't remove it from everywhere. When I run ..\python_embeded\python.exe -m pip install -r .\requirements_versions.txt - it is still checking the text list against c:\users\DF\appdata\roaming\python\python310\site-packages


E:\Fooocus 25\Fooocus_win64_2-5-0\Fooocus>..\python_embeded\python.exe -m pip install -r .\requirements_versions.txt

Truncated example output:

Requirement already satisfied: llvmlite<0.44,>=0.43.0dev0 in c:\users\darius fowler\appdata\roaming\python\python310\site-packages (from numba!=0.49.0->pymatting->rembg==2.0.57->-r .\requirements_versions.txt (line 22)) (0.43.0) Requirement already satisfied: six>=1.5 in e:\fooocus 25\fooocus_win64_2-5-0\python_embeded\lib\site-packages (from python-dateutil>=2.7->matplotlib~=3.0->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (1.16.0) Requirement already satisfied: httptools>=0.5.0 in c:\users\darius fowler\appdata\roaming\python\python310\site-packages (from uvicorn[standard]>=0.12.0->fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (0.6.1) Requirement already satisfied: python-dotenv>=0.13 in c:\users\darius fowler\appdata\roaming\python\python310\site-packages (from uvicorn[standard]>=0.12.0->fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (1.0.1) Requirement already satisfied: watchfiles>=0.13 in c:\users\darius fowler\appdata\roaming\python\python310\site-packages (from uvicorn[standard]>=0.12.0->fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (0.22.0) Requirement already satisfied: shellingham>=1.3.0 in c:\users\darius fowler\appdata\roaming\python\python310\site-packages (from typer>=0.12.3->fastapi-cli>=0.0.2->fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (1.5.4) Requirement already satisfied: rich>=10.11.0 in c:\users\darius fowler\appdata\roaming\python\python310\site-packages (from typer>=0.12.3->fastapi-cli>=0.0.2->fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (13.7.1) Requirement already satisfied: markdown-it-py>=2.2.0 in c:\users\darius fowler\appdata\roaming\python\python310\site-packages (from rich>=10.11.0->typer>=0.12.3->fastapi-cli>=0.0.2->fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (3.0.0) Requirement already satisfied: pygments<3.0.0,>=2.13.0 in c:\users\darius fowler\appdata\roaming\python\python310\site-packages (from rich>=10.11.0->typer>=0.12.3->fastapi-cli>=0.0.2->fastapi->gradio==3.41.2->-r .\requirements_versions.txt (line 13)) (2.18.0)

mashb1t commented 3 months ago

Last resort is always to download the zip file in the latest release containing all packages.

@SirDariusIsCoding This works no matter which packages you have installed in any of the native python versions as the zip file already includes all necessary python files incl. packages to run Fooocus without updates (given your system isn't completely messed up).

Did you already try a fresh install?

SirDariusIsCoding commented 3 months ago

Last resort is always to download the zip file in the latest release containing all packages.

@SirDariusIsCoding This works no matter which packages you have installed in any of the native python versions as the zip file already includes all necessary python files incl. packages to run Fooocus without updates (given your system isn't completely messed up).

Did you already try a fresh install?

Yes, I have done a completely fresh install several times. Each time, its looking to the appdata local roaming folder for python repo/modules. I was thinking as a next step of deleting the app data roaming python that the add/remove didn't get rid of and trying a fresh fooocus install again. Perhaps that might do the trick. What do you think?

mashb1t commented 3 months ago

might help, but please also ensure you do not have python in your PATH vars or aliases anymore.

SirDariusIsCoding commented 3 months ago

might help, but please also ensure you do not have python in your PATH vars anymore.

Agree - I checked there too, the app data roaming paths aren't in either system or user Path variables. I haven't checked the aliases o.o

SirDariusIsCoding commented 3 months ago

@mashb1t deleting user/appdata/local/roaming/python folder and redoing the fooocus install, followed by ..\python_embeded\python.exe -m pip install -r .\requirements_versions.txt
worked.

I believe I can reproduce this issue if it boils down to it, I think this might've been caused when I installed python again for another project. The "install for all users" flag modifies the environment path variables. I believe if you don't install for all users, it goes into the user path which overrides the system path. -- another place to check which dawned on me afterward was the python path in the registry.

( That is in Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Python)

*For anyone looking at this thread after the fact --- Disclaimer: If you don't know what you are doing or you are not comfortable do not make any registry changes on your computer

SirDariusIsCoding commented 3 months ago

@mashb1t Thank you for your help today