vetkastar / face_swap_lab

  • Public
  • 81 runs

Run vetkastar/face_swap_lab with an API

Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.

Input schema

The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.

Field Type Default value Description
image
string
Input image [img2img or postprocessing modes only]
face_1_source_img
string
reference image
face_1_blend_faces
boolean
True
Will blend faces if True
face_1_same_gender
boolean
False
Use same gender filtering
face_1_sort_by_size
boolean
False
Sort Faces by size
face_1_check_similarity
boolean
False
If True, discard images with low similarity
face_1_compute_similarity
boolean
False
If True will compute similarity and add it to the image info
face_1_min_sim
number
0

Max: 1

Minimum similarity against the used face
face_1_min_ref_sim
number
0

Max: 1

Minimum similarity against the reference
face_1_faces_index
string
0
The face index to use for swapping, comma separated list of face numbers starting from 0
face_1_reference_face_index
integer
0
The face index to use to extract face from reference
face_1_improved_mask
boolean
False
Use Improved Mask
face_1_color_corrections
boolean
False
Use Color Correction
face_1_sharpen
boolean
False
Sharpen Image
face_1_erosion_factor
number
1

Max: 10

Erosion Factor
face_2_enable
boolean
False
Enable face 2
face_2_source_img
string
reference image
face_2_blend_faces
boolean
True
Will blend faces if True
face_2_same_gender
boolean
False
Use same gender filtering
face_2_sort_by_size
boolean
False
Sort Faces by size
face_2_check_similarity
boolean
False
If True, discard images with low similarity
face_2_compute_similarity
boolean
False
If True will compute similarity and add it to the image info
face_2_min_sim
number
0

Max: 1

Minimum similarity against the used face
face_2_min_ref_sim
number
0

Max: 1

Minimum similarity against the reference
face_2_faces_index
string
0
The face index to use for swapping, comma separated list of face numbers starting from 0
face_2_reference_face_index
integer
0
The face index to use to extract face from reference
face_2_improved_mask
boolean
False
Use Improved Mask
face_2_color_corrections
boolean
False
Use Color Correction
face_2_sharpen
boolean
False
Sharpen Image
face_2_erosion_factor
number
1

Max: 10

Erosion Factor
face_restorer_name
string (enum)
CodeFormer

Options:

None, CodeFormer, GFPGAN

face restorer name
restorer_visibility
number
1

Max: 1

face restorer visibility
codeformer_weight
number
1

Max: 1

face restorer codeformer weight
upscaler_name
string (enum)
4x-UltraSharp

Options:

4x-AnimeSharp, 4x-UltraSharp, 4x_foolhardy_Remacri, 8x_NMKD-Superscale_150000_G, Без модели

upscaler name
scale
number
1

Max: 10

upscaling scale
upscaler_visibility
number
1

Max: 1

upscaler visibility

Output schema

The shape of the response you’ll get when you run this model with an API.

Schema
{
  "type": "string",
  "title": "Output",
  "format": "uri"
}