Comments (7)
@IAn2018cs could you post the rest of your alwayson_script params? I don't need your entire code changes since i'm only using 1 reference photo I think. About to start testing now, looks like you got it working though!
"faceswaplab": {
"args": [
# ============> Face 1 <============
# Reference
get_base64_image('./test_img/t1.png'),
# Face Checkpoint (precedence over reference face)
None,
# Batch Sources Images
f"{get_base64_image('./test_img/t1.png')},{get_base64_image('./test_img/t2.webp')},{get_base64_image('./test_img/t3.jpg')}",
# Blend Faces ((Source|Checkpoint)+References = 1)
True,
# Enable
True,
# Same Gender
False,
# Sort by size (larger>smaller)
True,
# Check similarity
True,
# Compute similarity
True,
# Min similarity
0.5,
# "Min reference similarity"
0.2,
# Target face : Comma separated face number(s)
"0",
# Reference source face : start from 0
0,
# Swap in source image (blended face)
True,
# Swap in generated image
True,
# Denoising strenght
0,
# Inpainting prompt use [gender] instead of men or woman
"Portrait of a [gender]",
# Inpainting negative prompt use [gender] instead of men or woman
"blurry",
# Inpainting steps
20,
# Inpainting Sampler
"Euler a",
# sd model (experimental)
None,
# Inpainting seed
0,
# Restore Face
"None",
# Restore visibility
1,
# codeformer weight
1,
# Upscaler
"",
# Use improved segmented mask (use pastenet to mask only the face)
False,
# Use color corrections
False,
# sharpen face
False,
# Upscaled swapper mask erosion factor, 1 = default behaviour.
1,
# Denoising strenght
0,
# Inpainting prompt use [gender] instead of men or woman
"Portrait of a [gender]",
# Inpainting negative prompt use [gender] instead of men or woman
"blurry",
# Inpainting steps
20,
# Inpainting Sampler
"Euler a",
# sd model (experimental)
None,
# Inpainting seed
0,
# ============> Face 2 <============
# Reference
None,
# Face Checkpoint (precedence over reference face)
None,
# Batch Sources Images
None,
# Blend Faces ((Source|Checkpoint)+References = 1)
True,
# Enable
False,
# Same Gender
False,
# Sort by size (larger>smaller)
False,
# Check similarity
False,
# Compute similarity
False,
# Min similarity
0,
# "Min reference similarity"
0,
# Target face : Comma separated face number(s)
"1",
# Reference source face : start from 0
0,
# Swap in source image (blended face)
False,
# Swap in generated image
True,
# Denoising strenght
0,
# Inpainting prompt use [gender] instead of men or woman
"Portrait of a [gender]",
# Inpainting negative prompt use [gender] instead of men or woman
"blurry",
# Inpainting steps
20,
# Inpainting Sampler
"Euler a",
# sd model (experimental)
None,
# Inpainting seed
0,
# Restore Face
"None",
# Restore visibility
1,
# codeformer weight
1,
# Upscaler
"",
# Use improved segmented mask (use pastenet to mask only the face)
False,
# Use color corrections
False,
# sharpen face
False,
# Upscaled swapper mask erosion factor, 1 = default behaviour.
1,
# Denoising strenght
0,
# Inpainting prompt use [gender] instead of men or woman
"Portrait of a [gender]",
# Inpainting negative prompt use [gender] instead of men or woman
"blurry",
# Inpainting steps
20,
# Inpainting Sampler
"Euler a",
# sd model (experimental)
None,
# Inpainting seed
0,
# ============> Face 3 <============
# Reference
None,
# Face Checkpoint (precedence over reference face)
None,
# Batch Sources Images
None,
# Blend Faces ((Source|Checkpoint)+References = 1)
True,
# Enable
False,
# Same Gender
False,
# Sort by size (larger>smaller)
False,
# Check similarity
False,
# Compute similarity
False,
# Min similarity
0,
# "Min reference similarity"
0,
# Target face : Comma separated face number(s)
"2",
# Reference source face : start from 0
0,
# Swap in source image (blended face)
False,
# Swap in generated image
True,
# Denoising strenght
0,
# Inpainting prompt use [gender] instead of men or woman
"Portrait of a [gender]",
# Inpainting negative prompt use [gender] instead of men or woman
"blurry",
# Inpainting steps
20,
# Inpainting Sampler
"Euler a",
# sd model (experimental)
None,
# Inpainting seed
0,
# Restore Face
"None",
# Restore visibility
1,
# codeformer weight
1,
# Upscaler
"",
# Use improved segmented mask (use pastenet to mask only the face)
False,
# Use color corrections
False,
# sharpen face
False,
# Upscaled swapper mask erosion factor, 1 = default behaviour.
1,
# Denoising strenght
0,
# Inpainting prompt use [gender] instead of men or woman
"Portrait of a [gender]",
# Inpainting negative prompt use [gender] instead of men or woman
"blurry",
# Inpainting steps
20,
# Inpainting Sampler
"Euler a",
# sd model (experimental)
None,
# Inpainting seed
0,
# ============> Global Post-Processing <============
# Restore Face
"GFPGAN",
# Restore visibility
1,
# codeformer weight
1,
# Upscaler
"R-ESRGAN 4x+",
# Upscaler scale
1,
# Upscaler visibility (if scale = 1)
1,
# Enable/When
"After Upscaling/Before Restore Face",
# Denoising strenght
0,
# Inpainting prompt use [gender] instead of men or woman
"Portrait of a [gender]",
# Inpainting negative prompt use [gender] instead of men or woman
"blurry",
# Inpainting steps
20,
# Inpainting Sampler
"Euler a",
# sd model (experimental)
None,
# Inpainting seed
0
]
}
from sd-webui-faceswaplab.
I did not have time to look at it. Thanks the proposal, i will check if it does not break anything. I am mostly using my version of the API https://github.com/glucauze/sd-webui-faceswaplab/blob/main/client_api/faceswaplab_api_example.py
from sd-webui-faceswaplab.
Got it, i will try to integrate that.
from sd-webui-faceswaplab.
Do I need to submit a pull request?
from sd-webui-faceswaplab.
I am mostly using my version of the API https://github.com/glucauze/sd-webui-faceswaplab/blob/main/client_api/faceswaplab_api_example.py
Your API works absolutely fine. Still there are valid use cases for using alwayson_scripts if you don't want to split image generation / face swap into two API calls. Depending on how many images you generate in a batch, this can be a quite significant overhead.
Not criticizing your extension here as it's a wonderful tool. Just want you to better understand why some prefer the alwayson_scripts.
from sd-webui-faceswaplab.
@IAn2018cs could you post the rest of your alwayson_script params? I don't need your entire code changes since i'm only using 1 reference photo I think. About to start testing now, looks like you got it working though!
from sd-webui-faceswaplab.
@IAn2018cs I appreciate this so much. I almost had it all figured out by looking at the dev tools. I wasn't exactly sure where it started/stopped. This is great, thank you.
from sd-webui-faceswaplab.
Related Issues (20)
- "Use improved segmented mask" not working
- Comfyui version
- Can't see faceswap in the Automatic1111 UI HOT 2
- Broken model download link
- Future warning 'rcond' parametr
- Pytorch and Torchvision incompatibility in Ubuntu
- It is not working HOT 3
- Cannot load faceswap model in webui-forge HOT 3
- Failed to swap face in postprocess method : apply_overlay() takes 3 positional arguments but 4 were given HOT 19
- Change only the target face in an existing image
- FaceSwapLab - ERROR - Conversion failed max() arg is an empty sequence
- ERROR - Failed to swap face in postprocess method : apply_overlay() takes 3 positional arguments but 4 were given HOT 20
- Please delete sorry
- failed to install in automatic1111 HOT 1
- img2img -> Inpaint -> dont work HOT 11
- How do I build a checkpoint with multiple angles of a face? HOT 2
- img2img not saving batch images into output directory HOT 3
- Does not work on Automatic1111 HOT 6
- Extension does not respect stable-diffusion-webui `--data-dir` option
- Documentation for API?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sd-webui-faceswaplab.