mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-04-21 14:59:05 +00:00
Forge Space and BiRefNet
This commit is contained in:
@@ -2,6 +2,7 @@ import os
|
||||
import sys
|
||||
|
||||
|
||||
INITIALIZED = False
|
||||
MONITOR_MODEL_MOVING = False
|
||||
|
||||
|
||||
@@ -25,6 +26,13 @@ def monitor_module_moving():
|
||||
|
||||
|
||||
def initialize_forge():
|
||||
global INITIALIZED
|
||||
|
||||
if INITIALIZED:
|
||||
return
|
||||
|
||||
INITIALIZED = True
|
||||
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), 'packages_3rdparty'))
|
||||
|
||||
bad_list = ['--lowvram', '--medvram', '--medvram-sdxl']
|
||||
@@ -60,9 +68,6 @@ def initialize_forge():
|
||||
from modules_forge.bnb_installer import try_install_bnb
|
||||
try_install_bnb()
|
||||
|
||||
import modules_forge.patch_basic
|
||||
modules_forge.patch_basic.patch_all_basics()
|
||||
|
||||
from backend import stream
|
||||
print('CUDA Using Stream:', stream.should_use_stream())
|
||||
|
||||
@@ -85,4 +90,8 @@ def initialize_forge():
|
||||
|
||||
if 'HF_HUB_CACHE' not in os.environ:
|
||||
os.environ['HF_HUB_CACHE'] = diffusers_dir
|
||||
|
||||
import modules_forge.patch_basic
|
||||
modules_forge.patch_basic.patch_all_basics()
|
||||
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user