Skip to content

Commit

Permalink
Merge for Fooocus v2.1.837
Browse files Browse the repository at this point in the history
  • Loading branch information
konieshadow committed Dec 14, 2023
1 parent 1167e6f commit 71048ed
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

FastAPI powered API for [Fooocus](https://github.com/lllyasviel/Fooocus)

Currently loaded Fooocus version: 2.1.824
Currently loaded Fooocus version: 2.1.837

### Run with Replicate
Now you can use Fooocus-API by Replicate, the model is in [konieshadow/fooocus-api](https://replicate.com/konieshadow/fooocus-api).
Expand Down
2 changes: 1 addition & 1 deletion fooocus_api_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '0.3.22'
version = '0.3.23'
4 changes: 2 additions & 2 deletions fooocusapi/repositories_versions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os

fooocus_version = '2.1.824'
fooocus_version = '2.1.837'
fooocus_commit_hash = os.environ.get(
'FOOOCUS_COMMIT_HASH', "3bc9ac88fd8aa05e157aeff78eaa3631552119e0")
'FOOOCUS_COMMIT_HASH', "28b07cd658806c204a51de9c6ff20d0bbe2da041")
12 changes: 6 additions & 6 deletions fooocusapi/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@


def process_top():
import fcbh.model_management
fcbh.model_management.interrupt_current_processing()
import ldm_patched.modules.model_management
ldm_patched.modules.model_management.interrupt_current_processing()


@torch.no_grad()
Expand All @@ -38,10 +38,10 @@ def process_generate(async_task: QueueTask, params: ImageGenerationParams) -> Li
import modules.config as config
import modules.advanced_parameters as advanced_parameters
import modules.constants as constants
import fooocus_extras.preprocessors as preprocessors
import fooocus_extras.ip_adapter as ip_adapter
import fooocus_extras.face_crop as face_crop
import fcbh.model_management as model_management
import extras.preprocessors as preprocessors
import extras.ip_adapter as ip_adapter
import extras.face_crop as face_crop
import ldm_patched.modules.model_management as model_management
from modules.util import remove_empty_str, resize_image, HWC3, set_image_shape_ceil, get_image_shape_ceil, get_shape_ceil, resample_image
from modules.private_logger import log
from modules.upscaler import perform_upscale
Expand Down
6 changes: 2 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from fooocusapi.repositories_versions import fooocus_commit_hash

os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"
os.environ["PYTORCH_MPS_HIGH_WATERMARK_RATIO"] = "0.0"

python = sys.executable
default_command_live = True
Expand Down Expand Up @@ -262,10 +263,7 @@ def prepare_environments(args) -> bool:
# Add dependent repositories to import path
sys.path.append(script_path)
fooocus_path = os.path.join(script_path, dir_repos, fooocus_name)
sys.path.insert(0, fooocus_path) # need add __init__.py in folder "modules"
backend_path = os.path.join(fooocus_path, 'backend', 'headless')
if backend_path not in sys.path:
sys.path.append(backend_path)
sys.path.append(fooocus_path)
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"

sys.argv = [sys.argv[0]]
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ pytorch_lightning==1.9.4
omegaconf==2.2.3
pygit2==1.12.2
opencv-contrib-python==4.8.0.74
onnxruntime==1.16.3
timm==0.9.2
fastapi==0.103.1
pydantic==2.4.2
pydantic_core==2.10.1
Expand Down

0 comments on commit 71048ed

Please sign in to comment.