parent
d8e300b202
commit
805a0cae17
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<img src="https://github.com/Gourieff/Assets/raw/main/sd-webui-reactor/ReActor_logo_NEW_EN.png?raw=true" alt="logo" width="180px"/>
|
<img src="https://github.com/Gourieff/Assets/raw/main/sd-webui-reactor/ReActor_logo_NEW_EN.png?raw=true" alt="logo" width="180px"/>
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
<a href="https://boosty.to/artgourieff" target="_blank">
|
<a href="https://boosty.to/artgourieff" target="_blank">
|
||||||
<img src="https://lovemet.ru/www/boosty.jpg" width="108" alt="Support Me on Boosty"/>
|
<img src="https://lovemet.ru/www/boosty.jpg" width="108" alt="Support Me on Boosty"/>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<img src="https://github.com/Gourieff/Assets/raw/main/sd-webui-reactor/ReActor_logo_NEW_RU.png?raw=true" alt="logo" width="180px"/>
|
<img src="https://github.com/Gourieff/Assets/raw/main/sd-webui-reactor/ReActor_logo_NEW_RU.png?raw=true" alt="logo" width="180px"/>
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
<a href="https://boosty.to/artgourieff" target="_blank">
|
<a href="https://boosty.to/artgourieff" target="_blank">
|
||||||
<img src="https://lovemet.ru/www/boosty.jpg" width="108" alt="Поддержать проект на Boosty"/>
|
<img src="https://lovemet.ru/www/boosty.jpg" width="108" alt="Поддержать проект на Boosty"/>
|
||||||
|
|||||||
@ -28,6 +28,7 @@ from scripts.console_log_patch import apply_logging_patch
|
|||||||
from scripts.reactor_helpers import (
|
from scripts.reactor_helpers import (
|
||||||
make_grid,
|
make_grid,
|
||||||
set_Device,
|
set_Device,
|
||||||
|
get_SDNEXT
|
||||||
)
|
)
|
||||||
from scripts.reactor_globals import SWAPPER_MODELS_PATH #, DEVICE, DEVICE_LIST
|
from scripts.reactor_globals import SWAPPER_MODELS_PATH #, DEVICE, DEVICE_LIST
|
||||||
|
|
||||||
@ -50,6 +51,10 @@ class FaceSwapScript(scripts.Script):
|
|||||||
# def on_files_clear():
|
# def on_files_clear():
|
||||||
# clear_faces_list()
|
# clear_faces_list()
|
||||||
# return gr.Checkbox.update(value=SAVE_ORIGINAL,visible=True)
|
# return gr.Checkbox.update(value=SAVE_ORIGINAL,visible=True)
|
||||||
|
|
||||||
|
# SD.Next fix
|
||||||
|
if get_SDNEXT():
|
||||||
|
enable = gr.Checkbox(False, label="Enable")
|
||||||
|
|
||||||
# enable = gr.Checkbox(False, label="Enable", info=f"The Fast and Simple FaceSwap Extension - {version_flag}")
|
# enable = gr.Checkbox(False, label="Enable", info=f"The Fast and Simple FaceSwap Extension - {version_flag}")
|
||||||
gr.Markdown(f"<sup>The Fast and Simple FaceSwap Extension - {version_flag}</sup>")
|
gr.Markdown(f"<sup>The Fast and Simple FaceSwap Extension - {version_flag}</sup>")
|
||||||
@ -408,6 +413,10 @@ class FaceSwapScriptExtras(scripts_postprocessing.ScriptPostprocessing):
|
|||||||
def ui(self):
|
def ui(self):
|
||||||
with ui_components.InputAccordion(False, label=f"{app_title}") as enable:
|
with ui_components.InputAccordion(False, label=f"{app_title}") as enable:
|
||||||
# with gr.Accordion(f"{app_title}", open=False):
|
# with gr.Accordion(f"{app_title}", open=False):
|
||||||
|
|
||||||
|
# SD.Next fix
|
||||||
|
if get_SDNEXT():
|
||||||
|
enable = gr.Checkbox(False, label="Enable")
|
||||||
|
|
||||||
# enable = gr.Checkbox(False, label="Enable", info=f"The Fast and Simple FaceSwap Extension - {version_flag}")
|
# enable = gr.Checkbox(False, label="Enable", info=f"The Fast and Simple FaceSwap Extension - {version_flag}")
|
||||||
gr.Markdown(f"<span style='display:block;font-size:0.75em;margin-bottom:-24px;'>The Fast and Simple FaceSwap Extension - {version_flag}</span>")
|
gr.Markdown(f"<span style='display:block;font-size:0.75em;margin-bottom:-24px;'>The Fast and Simple FaceSwap Extension - {version_flag}</span>")
|
||||||
|
|||||||
@ -18,6 +18,8 @@ SWAPPER_MODELS_PATH = os.path.join(MODELS_PATH, "insightface")
|
|||||||
REACTOR_MODELS_PATH = os.path.join(MODELS_PATH, "reactor")
|
REACTOR_MODELS_PATH = os.path.join(MODELS_PATH, "reactor")
|
||||||
FACE_MODELS_PATH = os.path.join(REACTOR_MODELS_PATH, "faces")
|
FACE_MODELS_PATH = os.path.join(REACTOR_MODELS_PATH, "faces")
|
||||||
|
|
||||||
|
IS_SDNEXT = False
|
||||||
|
|
||||||
if not os.path.exists(REACTOR_MODELS_PATH):
|
if not os.path.exists(REACTOR_MODELS_PATH):
|
||||||
os.makedirs(REACTOR_MODELS_PATH)
|
os.makedirs(REACTOR_MODELS_PATH)
|
||||||
if not os.path.exists(FACE_MODELS_PATH):
|
if not os.path.exists(FACE_MODELS_PATH):
|
||||||
|
|||||||
@ -11,7 +11,7 @@ from insightface.app.common import Face
|
|||||||
|
|
||||||
from modules.images import FilenameGenerator, get_next_sequence_number
|
from modules.images import FilenameGenerator, get_next_sequence_number
|
||||||
from modules import shared, script_callbacks
|
from modules import shared, script_callbacks
|
||||||
from scripts.reactor_globals import DEVICE, BASE_PATH, FACE_MODELS_PATH
|
from scripts.reactor_globals import DEVICE, BASE_PATH, FACE_MODELS_PATH, IS_SDNEXT
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from modules.paths_internal import models_path
|
from modules.paths_internal import models_path
|
||||||
@ -33,6 +33,14 @@ def get_Device():
|
|||||||
global DEVICE
|
global DEVICE
|
||||||
return DEVICE
|
return DEVICE
|
||||||
|
|
||||||
|
def set_SDNEXT():
|
||||||
|
global IS_SDNEXT
|
||||||
|
IS_SDNEXT = True
|
||||||
|
|
||||||
|
def get_SDNEXT():
|
||||||
|
global IS_SDNEXT
|
||||||
|
return IS_SDNEXT
|
||||||
|
|
||||||
def make_grid(image_list: List):
|
def make_grid(image_list: List):
|
||||||
|
|
||||||
# Count the occurrences of each image size in the image_list
|
# Count the occurrences of each image size in the image_list
|
||||||
|
|||||||
@ -17,7 +17,8 @@ from scripts.reactor_helpers import (
|
|||||||
save_face_model,
|
save_face_model,
|
||||||
load_face_model,
|
load_face_model,
|
||||||
get_images_from_folder,
|
get_images_from_folder,
|
||||||
get_images_from_list
|
get_images_from_list,
|
||||||
|
set_SDNEXT
|
||||||
)
|
)
|
||||||
from scripts.console_log_patch import apply_logging_patch
|
from scripts.console_log_patch import apply_logging_patch
|
||||||
|
|
||||||
@ -26,6 +27,7 @@ try: # A1111
|
|||||||
from modules import codeformer_model, gfpgan_model
|
from modules import codeformer_model, gfpgan_model
|
||||||
except: # SD.Next
|
except: # SD.Next
|
||||||
from modules.postprocess import codeformer_model, gfpgan_model
|
from modules.postprocess import codeformer_model, gfpgan_model
|
||||||
|
set_SDNEXT()
|
||||||
from modules.upscaler import UpscalerData
|
from modules.upscaler import UpscalerData
|
||||||
from modules.shared import state
|
from modules.shared import state
|
||||||
from scripts.reactor_logger import logger
|
from scripts.reactor_logger import logger
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
app_title = "ReActor"
|
app_title = "ReActor"
|
||||||
version_flag = "v0.6.0-a3"
|
version_flag = "v0.6.0-a4"
|
||||||
|
|
||||||
from scripts.reactor_logger import logger, get_Run, set_Run
|
from scripts.reactor_logger import logger, get_Run, set_Run
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user