UPDATE: UI rework

+ Inpaint info update
+ VersionUP (beta2)
This commit is contained in:
Gourieff 2023-08-31 15:09:11 +07:00
parent b2ace90b72
commit 08aba2cdb6
4 changed files with 61 additions and 59 deletions

View File

@ -2,7 +2,7 @@
<img src="example/ReActor_logo_red.png" alt="logo" width="180px"/>
![Version](https://img.shields.io/badge/version-0.4.1_beta1-green?style=for-the-badge&labelColor=darkgreen)<hr>
![Version](https://img.shields.io/badge/version-0.4.1_beta2-green?style=for-the-badge&labelColor=darkgreen)<hr>
[![Commit activity](https://img.shields.io/github/commit-activity/t/Gourieff/sd-webui-reactor/main?cacheSeconds=0)](https://github.com/Gourieff/sd-webui-reactor/commits/main)
![Last commit](https://img.shields.io/github/last-commit/Gourieff/sd-webui-reactor/main?cacheSeconds=0)
[![Opened issues](https://img.shields.io/github/issues/Gourieff/sd-webui-reactor?color=red)](https://github.com/Gourieff/sd-webui-reactor/issues?cacheSeconds=0)
@ -118,7 +118,7 @@ Select the face numbers you wish to swap using the "Comma separated face number(
You can choose to activate the swap on the source image or on the generated image, or on both using the checkboxes. Activating on source image allows you to start from a given base and apply the diffusion process to it.
ReActor works with Inpainting - but only the masked part will be swapped.<br>Please use with the "Only masked" option for "Inpaint area" if you enabled "Upscaler".
ReActor works with Inpainting - but only the masked part will be swapped.<br>Please use with the "Only masked" option for "Inpaint area" if you enabled "Upscaler". Otherwise use the upscale option via the Extras tab or via the Script loader (below the screen) with "SD upscale" or "Ultimate SD upscale".
## API

View File

@ -2,7 +2,7 @@
<img src="example/ReActor_logo_red.png" alt="logo" width="180px"/>
![Version](https://img.shields.io/badge/версия-0.4.1_beta1-green?style=for-the-badge&labelColor=darkgreen)<hr>
![Version](https://img.shields.io/badge/версия-0.4.1_beta2-green?style=for-the-badge&labelColor=darkgreen)<hr>
[![Commit activity](https://img.shields.io/github/commit-activity/t/Gourieff/sd-webui-reactor/main?cacheSeconds=0)](https://github.com/Gourieff/sd-webui-reactor/commits/main)
![Last commit](https://img.shields.io/github/last-commit/Gourieff/sd-webui-reactor/main?cacheSeconds=0)
[![Opened issues](https://img.shields.io/github/issues/Gourieff/sd-webui-reactor?color=red)](https://github.com/Gourieff/sd-webui-reactor/issues?cacheSeconds=0)
@ -118,7 +118,7 @@
Используйте эту вкладку, чтобы заменить лицо на уже готовом изображении (флажок "Swap in source image") или на сгенерированном на основе готового (флажок "Swap in generated image").
Inpainting также работает, но замена лица происходит только в области маски.<br>Пожалуйста, используйте с опцией "Only masked" для "Inpaint area", если вы применяете "Upscaler".
Inpainting также работает, но замена лица происходит только в области маски.<br>Пожалуйста, используйте с опцией "Only masked" для "Inpaint area", если вы применяете "Upscaler". Иначе, используйте функцию увеличения (апскейла) через вкладку "Extras" или через опциональный загрузчик "Script" (внизу экрана), применив "SD upscale" или "Ultimate SD upscale".
## API

View File

@ -44,10 +44,11 @@ class FaceSwapScript(scripts.Script):
def ui(self, is_img2img):
with gr.Accordion(f"{app_title}", open=False):
with gr.Tab("Input"):
with gr.Column():
img = gr.inputs.Image(type="pil")
enable = gr.Checkbox(False, label="Enable", info=f"The Fast and Simple \"roop-based\" FaceSwap Extension - {version_flag}")
gr.Markdown("---")
enable = gr.Checkbox(False, label="Enable", info=f"The Fast and Simple FaceSwap Extension - {version_flag}")
gr.Markdown("<br>")
gr.Markdown("Source Image (above):")
with gr.Row():
source_faces_index = gr.Textbox(
@ -61,7 +62,7 @@ class FaceSwapScript(scripts.Script):
label="Gender Detection (Source)",
type="index",
)
gr.Markdown("---")
gr.Markdown("<br>")
gr.Markdown("Target Image (result):")
with gr.Row():
faces_index = gr.Textbox(
@ -75,7 +76,7 @@ class FaceSwapScript(scripts.Script):
label="Gender Detection (Target)",
type="index",
)
gr.Markdown("---")
gr.Markdown("<br>")
with gr.Row():
face_restorer_name = gr.Radio(
label="Restore Face",
@ -86,21 +87,7 @@ class FaceSwapScript(scripts.Script):
face_restorer_visibility = gr.Slider(
0, 1, 1, step=0.1, label="Restore Face Visibility"
)
restore_first = gr.Checkbox(
True,
label="1. Restore Face -> 2. Upscale (-Uncheck- if you want vice versa)",
info="Postprocessing Order"
)
upscaler_name = gr.inputs.Dropdown(
choices=[upscaler.name for upscaler in shared.sd_upscalers],
label="Upscaler",
)
with gr.Row():
upscaler_scale = gr.Slider(1, 8, 1, step=0.1, label="Scale by")
upscaler_visibility = gr.Slider(
0, 1, 1, step=0.1, label="Upscaler Visibility (if scale = 1)"
)
gr.Markdown("---")
gr.Markdown("<br>")
swap_in_source = gr.Checkbox(
False,
label="Swap in source image",
@ -111,7 +98,23 @@ class FaceSwapScript(scripts.Script):
label="Swap in generated image",
visible=is_img2img,
)
with gr.Tab("Upscale"):
restore_first = gr.Checkbox(
True,
label="1. Restore Face -> 2. Upscale (-Uncheck- if you want vice versa)",
info="Postprocessing Order"
)
upscaler_name = gr.inputs.Dropdown(
choices=[upscaler.name for upscaler in shared.sd_upscalers],
label="Upscaler",
)
gr.Markdown("<br>")
with gr.Row():
upscaler_scale = gr.Slider(1, 8, 1, step=0.1, label="Scale by")
upscaler_visibility = gr.Slider(
0, 1, 1, step=0.1, label="Upscaler Visibility (if scale = 1)"
)
with gr.Tab("Settings"):
models = get_models()
with gr.Row():
if len(models) == 0:
@ -132,7 +135,6 @@ class FaceSwapScript(scripts.Script):
label="Console Log Level",
type="index",
)
gr.Markdown("---")
return [
img,

View File

@ -1,5 +1,5 @@
app_title = "ReActor"
version_flag = "v0.4.1-b1"
version_flag = "v0.4.1-b2"
from scripts.logger import logger, get_Run, set_Run