[Fooocus 2.0.60] Fooocus Inpaint or Outpaint (Midjourney Left/Right/Top/Bottom) (#402)

[Fooocus 2.0.60] Fooocus Inpaint or Outpaint (Midjourney Left/Right/Top/Bottom) (#402)
This commit is contained in:
lllyasviel
2023-09-18 01:16:07 -07:00
committed by GitHub
parent 43e59c1676
commit b61642ecba
11 changed files with 572 additions and 53 deletions
+5 -1
View File
@@ -5,7 +5,7 @@ import modules.path
import modules.virtual_memory as virtual_memory
from comfy.model_base import SDXL, SDXLRefiner
from modules.patch import cfg_patched
from modules.patch import cfg_patched, patched_model_function
from modules.expansion import FooocusExpansion
@@ -201,10 +201,14 @@ def patch_all_models():
assert xl_base_patched is not None
xl_base.unet.model_options['sampler_cfg_function'] = cfg_patched
xl_base.unet.model_options['model_function_wrapper'] = patched_model_function
xl_base_patched.unet.model_options['sampler_cfg_function'] = cfg_patched
xl_base_patched.unet.model_options['model_function_wrapper'] = patched_model_function
if xl_refiner is not None:
xl_refiner.unet.model_options['sampler_cfg_function'] = cfg_patched
xl_refiner.unet.model_options['model_function_wrapper'] = patched_model_function
return