ailoov/video_postpro_v2
Run ailoov/video_postpro_v2 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 |
|---|---|---|---|
| face_detector_model |
None
|
yolo_face
|
Model face detector
|
| face_selector_mode |
None
|
one
|
Face selector mode
|
| face_selector_order |
None
|
large-small
|
Face selector order
|
| pingpong |
None
|
no
|
Mode pingpong video (no=tanpa pingpong, short=1x pingpong, long=loop minimal 30 detik)
|
| uid |
string
|
|
UID unik untuk penamaan file sementara (opsional)
|
| source |
string
|
Source image (wajah yang akan di-swap ke target)
|
|
| target |
string
|
Target image atau video yang akan diproses
|
|
| upscale |
boolean
|
False
|
Upscale akhir video ke 1080x1920 (Lanczos). Jika False, hanya re-encode ke H.264 tanpa ubah resolusi.
|
| rembg_hex |
string
|
#00b140
|
Hex color untuk background replacement (kosongkan untuk transparent background)
|
| processors |
string
|
face_swapper
|
Processors yang akan digunakan (comma-separated: face_swapper,expression_restorer,face_enhancer)
|
| rembg_enabled |
boolean
|
False
|
Aktifkan background removal menggunakan Inspyrenet Rembg
|
| face_mask_blur |
number
|
0.8
Max: 1 |
Face mask blur (0.0-1.0)
|
| face_mask_types |
string
|
box,occlusion,region
|
Face mask types (comma-separated: box,occlusion,area,region)
|
| output_image_scale |
number
|
1
Min: 0.1 Max: 2 |
Output image scale
|
| face_detector_score |
number
|
0.5
Max: 1 |
Face detector score threshold
|
| face_enhancer_blend |
integer
|
80
Max: 100 |
Face enhancer blend (0-100)
|
| face_enhancer_model |
string
|
gpen_bfr_512
|
Model face enhancer (default: gpen_bfr_512, preloaded)
|
| face_swapper_weight |
number
|
1
Max: 1 |
Weight untuk face swapper (0.0-1.0, default: 1.0 untuk swap penuh)
|
| face_enhancer_weight |
number
|
0.5
Max: 1 |
Face enhancer weight (0.0-1.0)
|
| output_image_quality |
integer
|
80
Max: 100 |
Output image quality (0-100)
|
| reference_face_distance |
number
|
0.6
Max: 1 |
Reference face distance threshold
|
| reference_face_position |
integer
|
0
|
Reference face position
|
| expression_restorer_areas |
string
|
upper-face,lower-face
|
Expression restorer areas (comma-separated: upper-face,lower-face)
|
{
"type": "object",
"title": "Input",
"required": [
"target"
],
"properties": {
"uid": {
"type": "string",
"title": "Uid",
"default": "",
"description": "UID unik untuk penamaan file sementara (opsional)"
},
"source": {
"type": "string",
"title": "Source",
"format": "uri",
"description": "Source image (wajah yang akan di-swap ke target)"
},
"target": {
"type": "string",
"title": "Target",
"format": "uri",
"description": "Target image atau video yang akan diproses"
},
"upscale": {
"type": "boolean",
"title": "Upscale",
"default": false,
"description": "Upscale akhir video ke 1080x1920 (Lanczos). Jika False, hanya re-encode ke H.264 tanpa ubah resolusi."
},
"pingpong": {
"enum": [
"no",
"short",
"long"
],
"type": "string",
"title": "pingpong",
"description": "Mode pingpong video (no=tanpa pingpong, short=1x pingpong, long=loop minimal 30 detik)",
"default": "no",
"x-order": 19
},
"rembg_hex": {
"type": "string",
"title": "Rembg Hex",
"default": "#00b140",
"description": "Hex color untuk background replacement (kosongkan untuk transparent background)"
},
"processors": {
"type": "string",
"title": "Processors",
"default": "face_swapper",
"description": "Processors yang akan digunakan (comma-separated: face_swapper,expression_restorer,face_enhancer)"
},
"rembg_enabled": {
"type": "boolean",
"title": "Rembg Enabled",
"default": false,
"description": "Aktifkan background removal menggunakan Inspyrenet Rembg"
},
"face_mask_blur": {
"type": "number",
"title": "Face Mask Blur",
"default": 0.8,
"maximum": 1,
"minimum": 0,
"description": "Face mask blur (0.0-1.0)"
},
"face_mask_types": {
"type": "string",
"title": "Face Mask Types",
"default": "box,occlusion,region",
"description": "Face mask types (comma-separated: box,occlusion,area,region)"
},
"face_selector_mode": {
"enum": [
"many",
"one",
"reference"
],
"type": "string",
"title": "face_selector_mode",
"description": "Face selector mode",
"default": "one",
"x-order": 10
},
"output_image_scale": {
"type": "number",
"title": "Output Image Scale",
"default": 1,
"maximum": 2,
"minimum": 0.1,
"description": "Output image scale"
},
"face_detector_model": {
"enum": [
"yolo_face",
"retinaface",
"scrfd",
"many",
"yunet"
],
"type": "string",
"title": "face_detector_model",
"description": "Model face detector",
"default": "yolo_face",
"x-order": 8
},
"face_detector_score": {
"type": "number",
"title": "Face Detector Score",
"default": 0.5,
"maximum": 1,
"minimum": 0,
"description": "Face detector score threshold"
},
"face_enhancer_blend": {
"type": "integer",
"title": "Face Enhancer Blend",
"default": 80,
"maximum": 100,
"minimum": 0,
"description": "Face enhancer blend (0-100)"
},
"face_enhancer_model": {
"type": "string",
"title": "Face Enhancer Model",
"default": "gpen_bfr_512",
"description": "Model face enhancer (default: gpen_bfr_512, preloaded)"
},
"face_selector_order": {
"enum": [
"left-right",
"right-left",
"top-bottom",
"bottom-top",
"small-large",
"large-small",
"best-worst",
"worst-best"
],
"type": "string",
"title": "face_selector_order",
"description": "Face selector order",
"default": "large-small",
"x-order": 11
},
"face_swapper_weight": {
"type": "number",
"title": "Face Swapper Weight",
"default": 1,
"maximum": 1,
"minimum": 0,
"description": "Weight untuk face swapper (0.0-1.0, default: 1.0 untuk swap penuh)"
},
"face_enhancer_weight": {
"type": "number",
"title": "Face Enhancer Weight",
"default": 0.5,
"maximum": 1,
"minimum": 0,
"description": "Face enhancer weight (0.0-1.0)"
},
"output_image_quality": {
"type": "integer",
"title": "Output Image Quality",
"default": 80,
"maximum": 100,
"minimum": 0,
"description": "Output image quality (0-100)"
},
"reference_face_distance": {
"type": "number",
"title": "Reference Face Distance",
"default": 0.6,
"maximum": 1,
"minimum": 0,
"description": "Reference face distance threshold"
},
"reference_face_position": {
"type": "integer",
"title": "Reference Face Position",
"default": 0,
"minimum": 0,
"description": "Reference face position"
},
"expression_restorer_areas": {
"type": "string",
"title": "Expression Restorer Areas",
"default": "upper-face,lower-face",
"description": "Expression restorer areas (comma-separated: upper-face,lower-face)"
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
{
"type": "string",
"title": "Output",
"format": "uri"
}