UPDATE: UI rework
+ Inpaint info update + VersionUP (beta2)
This commit is contained in:
parent
b2ace90b72
commit
08aba2cdb6
@ -2,7 +2,7 @@
|
||||
|
||||
<img src="example/ReActor_logo_red.png" alt="logo" width="180px"/>
|
||||
|
||||
<hr>
|
||||
<hr>
|
||||
[](https://github.com/Gourieff/sd-webui-reactor/commits/main)
|
||||

|
||||
[](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
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
<img src="example/ReActor_logo_red.png" alt="logo" width="180px"/>
|
||||
|
||||
<hr>
|
||||
<hr>
|
||||
[](https://github.com/Gourieff/sd-webui-reactor/commits/main)
|
||||

|
||||
[](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
|
||||
|
||||
|
||||
@ -44,48 +44,61 @@ class FaceSwapScript(scripts.Script):
|
||||
|
||||
def ui(self, is_img2img):
|
||||
with gr.Accordion(f"{app_title}", open=False):
|
||||
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("---")
|
||||
gr.Markdown("Source Image (above):")
|
||||
with gr.Row():
|
||||
source_faces_index = gr.Textbox(
|
||||
value="0",
|
||||
placeholder="Which face(s) to use as Source (comma separated)",
|
||||
label="Comma separated face number(s); Example: 0,2,1",
|
||||
)
|
||||
gender_source = gr.Radio(
|
||||
["No", "Female Only", "Male Only"],
|
||||
value="No",
|
||||
label="Gender Detection (Source)",
|
||||
type="index",
|
||||
)
|
||||
gr.Markdown("---")
|
||||
gr.Markdown("Target Image (result):")
|
||||
with gr.Row():
|
||||
faces_index = gr.Textbox(
|
||||
value="0",
|
||||
placeholder="Which face(s) to Swap into Target (comma separated)",
|
||||
label="Comma separated face number(s); Example: 1,0,2",
|
||||
)
|
||||
gender_target = gr.Radio(
|
||||
["No", "Female Only", "Male Only"],
|
||||
value="No",
|
||||
label="Gender Detection (Target)",
|
||||
type="index",
|
||||
)
|
||||
gr.Markdown("---")
|
||||
with gr.Row():
|
||||
face_restorer_name = gr.Radio(
|
||||
label="Restore Face",
|
||||
choices=["None"] + [x.name() for x in shared.face_restorers],
|
||||
value=shared.face_restorers[0].name(),
|
||||
type="value",
|
||||
)
|
||||
face_restorer_visibility = gr.Slider(
|
||||
0, 1, 1, step=0.1, label="Restore Face Visibility"
|
||||
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 FaceSwap Extension - {version_flag}")
|
||||
gr.Markdown("<br>")
|
||||
gr.Markdown("Source Image (above):")
|
||||
with gr.Row():
|
||||
source_faces_index = gr.Textbox(
|
||||
value="0",
|
||||
placeholder="Which face(s) to use as Source (comma separated)",
|
||||
label="Comma separated face number(s); Example: 0,2,1",
|
||||
)
|
||||
gender_source = gr.Radio(
|
||||
["No", "Female Only", "Male Only"],
|
||||
value="No",
|
||||
label="Gender Detection (Source)",
|
||||
type="index",
|
||||
)
|
||||
gr.Markdown("<br>")
|
||||
gr.Markdown("Target Image (result):")
|
||||
with gr.Row():
|
||||
faces_index = gr.Textbox(
|
||||
value="0",
|
||||
placeholder="Which face(s) to Swap into Target (comma separated)",
|
||||
label="Comma separated face number(s); Example: 1,0,2",
|
||||
)
|
||||
gender_target = gr.Radio(
|
||||
["No", "Female Only", "Male Only"],
|
||||
value="No",
|
||||
label="Gender Detection (Target)",
|
||||
type="index",
|
||||
)
|
||||
gr.Markdown("<br>")
|
||||
with gr.Row():
|
||||
face_restorer_name = gr.Radio(
|
||||
label="Restore Face",
|
||||
choices=["None"] + [x.name() for x in shared.face_restorers],
|
||||
value=shared.face_restorers[0].name(),
|
||||
type="value",
|
||||
)
|
||||
face_restorer_visibility = gr.Slider(
|
||||
0, 1, 1, step=0.1, label="Restore Face Visibility"
|
||||
)
|
||||
gr.Markdown("<br>")
|
||||
swap_in_source = gr.Checkbox(
|
||||
False,
|
||||
label="Swap in source image",
|
||||
visible=is_img2img,
|
||||
)
|
||||
swap_in_generated = gr.Checkbox(
|
||||
True,
|
||||
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)",
|
||||
@ -95,23 +108,13 @@ class FaceSwapScript(scripts.Script):
|
||||
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)"
|
||||
)
|
||||
gr.Markdown("---")
|
||||
swap_in_source = gr.Checkbox(
|
||||
False,
|
||||
label="Swap in source image",
|
||||
visible=is_img2img,
|
||||
)
|
||||
swap_in_generated = gr.Checkbox(
|
||||
True,
|
||||
label="Swap in generated image",
|
||||
visible=is_img2img,
|
||||
)
|
||||
|
||||
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,
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user