prompthunt
/
swap_mask
- Public
- 322 runs
Run prompthunt/swap_mask 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 |
---|---|---|---|
weights |
string
|
Weights url
|
|
control_image |
string
|
Optional Image to use for guidance based on posenet
|
|
image |
string
|
Optional Image to use for img2img guidance
|
|
prompt |
string
|
photo of cjw person
|
Input prompt
|
root_prompt |
string
|
Root prompt
|
|
negative_prompt |
string
|
|
Specify things to not see in the output. Supported embeddings: realisticvision-negative-embedding, cyberrealistic-neg, EasyNegative, FastNegativeV2, negative-hand, BadDream, UnrealisticDream, badhandv4
|
width |
integer
|
512
|
Width of output image
|
height |
integer
|
768
|
Height of output image
|
num_outputs |
integer
|
1
Min: 1 Max: 40 |
Number of images to output.
|
num_inference_steps |
integer
|
20
Min: 1 Max: 500 |
Number of denoising steps
|
guidance_scale |
number
|
7.5
Min: 1 Max: 50 |
Scale for classifier-free guidance
|
prompt_strength |
number
|
0.8
Max: 1 |
Prompt strength when using init image. 1.0 corresponds to full destruction of information in init image
|
pose_strength |
number
|
0.75
Max: 1 |
Pose strength
|
scheduler |
string
(enum)
|
DPM++SDEKarras
Options: DDIM, DPMSolverMultistep, HeunDiscrete, K_EULER_ANCESTRAL, K_EULER, KLMS, PNDM, UniPCMultistep, KarrasDPM, DPM++SDEKarras |
Choose a scheduler.
|
seed |
integer
|
Random seed. Leave blank to randomize the seed
|
|
source_image |
string
|
Source image for face swap
|
|
show_debug_images |
boolean
|
False
|
Show debug images
|
upscale_final_size |
integer
|
4
|
Upscale final size multiplier
|
upscale_fidelity |
number
|
0.7
|
Upscale codeformer fidelity
|
upscale_background_enhance |
boolean
|
True
|
Upscale background enhance
|
upscale_face_upsample |
boolean
|
True
|
Upscale face upsample
|
use_new_vae |
boolean
|
False
|
Use new vae
|
second_pass_strength |
number
|
0.8
|
Second pass strength
|
second_pass_guidance_scale |
number
|
7.5
|
Second pass guidance scale
|
second_pass_steps |
integer
|
40
|
Second pass steps
|
third_pass_strength |
number
|
0.5
|
Second pass strength
|
third_pass_guidance_scale |
number
|
3
|
Second pass guidance scale
|
third_pass_steps |
integer
|
40
|
Second pass steps
|
control_image_2 |
string
|
Optional Image to use for guidance based on posenet
|
|
control_image_3 |
string
|
Optional Image to use for guidance based on posenet
|
|
control_image_4 |
string
|
Optional Image to use for guidance based on posenet
|
|
prompt_2 |
string
|
Input prompt
|
|
prompt_3 |
string
|
Input prompt
|
|
prompt_4 |
string
|
Input prompt
|
|
image_2 |
string
|
Optional Image to use for img2img guidance
|
|
image_3 |
string
|
Optional Image to use for img2img guidance
|
|
image_4 |
string
|
Optional Image to use for img2img guidance
|
|
prompt_strength_2 |
number
|
0.8
Max: 1 |
Prompt strength when using init image. 1.0 corresponds to full destruction of information in init image
|
prompt_strength_3 |
number
|
0.8
Max: 1 |
Prompt strength when using init image. 1.0 corresponds to full destruction of information in init image
|
prompt_strength_4 |
number
|
0.8
Max: 1 |
Prompt strength when using init image. 1.0 corresponds to full destruction of information in init image
|
source_image_2 |
string
|
Source image for face swap
|
|
source_image_3 |
string
|
Source image for face swap
|
|
source_image_4 |
string
|
Source image for face swap
|
|
source_image_5 |
string
|
Source image for face swap
|
|
source_image_6 |
string
|
Source image for face swap
|
|
source_image_7 |
string
|
Source image for face swap
|
|
source_image_8 |
string
|
Source image for face swap
|
|
source_image_9 |
string
|
Source image for face swap
|
|
source_image_10 |
string
|
Source image for face swap
|
|
source_image_11 |
string
|
Source image for face swap
|
|
source_image_12 |
string
|
Source image for face swap
|
|
source_image_13 |
string
|
Source image for face swap
|
|
source_image_14 |
string
|
Source image for face swap
|
|
source_image_15 |
string
|
Source image for face swap
|
|
disable_cn_second_pass |
boolean
|
False
|
Disable controlnet second pass
|
use_tile |
boolean
|
False
|
Use tile
|
cf_acc_id |
string
|
Cloudflare account ID
|
|
cf_api_key |
string
|
Cloudflare API key
|
|
mask_blur_amount |
number
|
8
|
Amount of blur to apply to the mask.
|
{
"type": "object",
"title": "Input",
"properties": {
"seed": {
"type": "integer",
"title": "Seed",
"x-order": 14,
"description": "Random seed. Leave blank to randomize the seed"
},
"image": {
"type": "string",
"title": "Image",
"format": "uri",
"x-order": 2,
"description": "Optional Image to use for img2img guidance"
},
"width": {
"type": "integer",
"title": "Width",
"default": 512,
"x-order": 6,
"description": "Width of output image"
},
"height": {
"type": "integer",
"title": "Height",
"default": 768,
"x-order": 7,
"description": "Height of output image"
},
"prompt": {
"type": "string",
"title": "Prompt",
"default": "photo of cjw person",
"x-order": 3,
"description": "Input prompt"
},
"image_2": {
"type": "string",
"title": "Image 2",
"format": "uri",
"x-order": 34,
"description": "Optional Image to use for img2img guidance"
},
"image_3": {
"type": "string",
"title": "Image 3",
"format": "uri",
"x-order": 35,
"description": "Optional Image to use for img2img guidance"
},
"image_4": {
"type": "string",
"title": "Image 4",
"format": "uri",
"x-order": 36,
"description": "Optional Image to use for img2img guidance"
},
"weights": {
"type": "string",
"title": "Weights",
"x-order": 0,
"description": "Weights url"
},
"prompt_2": {
"type": "string",
"title": "Prompt 2",
"x-order": 31,
"description": "Input prompt"
},
"prompt_3": {
"type": "string",
"title": "Prompt 3",
"x-order": 32,
"description": "Input prompt"
},
"prompt_4": {
"type": "string",
"title": "Prompt 4",
"x-order": 33,
"description": "Input prompt"
},
"use_tile": {
"type": "boolean",
"title": "Use Tile",
"default": false,
"x-order": 55,
"description": "Use tile"
},
"cf_acc_id": {
"type": "string",
"title": "Cf Acc Id",
"x-order": 56,
"description": "Cloudflare account ID"
},
"scheduler": {
"enum": [
"DDIM",
"DPMSolverMultistep",
"HeunDiscrete",
"K_EULER_ANCESTRAL",
"K_EULER",
"KLMS",
"PNDM",
"UniPCMultistep",
"KarrasDPM",
"DPM++SDEKarras"
],
"type": "string",
"title": "scheduler",
"description": "Choose a scheduler.",
"default": "DPM++SDEKarras",
"x-order": 13
},
"cf_api_key": {
"type": "string",
"title": "Cf Api Key",
"x-order": 57,
"description": "Cloudflare API key"
},
"num_outputs": {
"type": "integer",
"title": "Num Outputs",
"default": 1,
"maximum": 40,
"minimum": 1,
"x-order": 8,
"description": "Number of images to output."
},
"root_prompt": {
"type": "string",
"title": "Root Prompt",
"x-order": 4,
"description": "Root prompt"
},
"use_new_vae": {
"type": "boolean",
"title": "Use New Vae",
"default": false,
"x-order": 21,
"description": "Use new vae"
},
"source_image": {
"type": "string",
"title": "Source Image",
"format": "uri",
"x-order": 15,
"description": "Source image for face swap"
},
"control_image": {
"type": "string",
"title": "Control Image",
"format": "uri",
"x-order": 1,
"description": "Optional Image to use for guidance based on posenet"
},
"pose_strength": {
"type": "number",
"title": "Pose Strength",
"default": 0.75,
"maximum": 1,
"minimum": 0,
"x-order": 12,
"description": "Pose strength"
},
"guidance_scale": {
"type": "number",
"title": "Guidance Scale",
"default": 7.5,
"maximum": 50,
"minimum": 1,
"x-order": 10,
"description": "Scale for classifier-free guidance"
},
"source_image_2": {
"type": "string",
"title": "Source Image 2",
"format": "uri",
"x-order": 40,
"description": "Source image for face swap"
},
"source_image_3": {
"type": "string",
"title": "Source Image 3",
"format": "uri",
"x-order": 41,
"description": "Source image for face swap"
},
"source_image_4": {
"type": "string",
"title": "Source Image 4",
"format": "uri",
"x-order": 42,
"description": "Source image for face swap"
},
"source_image_5": {
"type": "string",
"title": "Source Image 5",
"format": "uri",
"x-order": 43,
"description": "Source image for face swap"
},
"source_image_6": {
"type": "string",
"title": "Source Image 6",
"format": "uri",
"x-order": 44,
"description": "Source image for face swap"
},
"source_image_7": {
"type": "string",
"title": "Source Image 7",
"format": "uri",
"x-order": 45,
"description": "Source image for face swap"
},
"source_image_8": {
"type": "string",
"title": "Source Image 8",
"format": "uri",
"x-order": 46,
"description": "Source image for face swap"
},
"source_image_9": {
"type": "string",
"title": "Source Image 9",
"format": "uri",
"x-order": 47,
"description": "Source image for face swap"
},
"control_image_2": {
"type": "string",
"title": "Control Image 2",
"format": "uri",
"x-order": 28,
"description": "Optional Image to use for guidance based on posenet"
},
"control_image_3": {
"type": "string",
"title": "Control Image 3",
"format": "uri",
"x-order": 29,
"description": "Optional Image to use for guidance based on posenet"
},
"control_image_4": {
"type": "string",
"title": "Control Image 4",
"format": "uri",
"x-order": 30,
"description": "Optional Image to use for guidance based on posenet"
},
"negative_prompt": {
"type": "string",
"title": "Negative Prompt",
"default": "",
"x-order": 5,
"description": "Specify things to not see in the output. Supported embeddings: realisticvision-negative-embedding, cyberrealistic-neg, EasyNegative, FastNegativeV2, negative-hand, BadDream, UnrealisticDream, badhandv4"
},
"prompt_strength": {
"type": "number",
"title": "Prompt Strength",
"default": 0.8,
"maximum": 1,
"minimum": 0,
"x-order": 11,
"description": "Prompt strength when using init image. 1.0 corresponds to full destruction of information in init image"
},
"source_image_10": {
"type": "string",
"title": "Source Image 10",
"format": "uri",
"x-order": 48,
"description": "Source image for face swap"
},
"source_image_11": {
"type": "string",
"title": "Source Image 11",
"format": "uri",
"x-order": 49,
"description": "Source image for face swap"
},
"source_image_12": {
"type": "string",
"title": "Source Image 12",
"format": "uri",
"x-order": 50,
"description": "Source image for face swap"
},
"source_image_13": {
"type": "string",
"title": "Source Image 13",
"format": "uri",
"x-order": 51,
"description": "Source image for face swap"
},
"source_image_14": {
"type": "string",
"title": "Source Image 14",
"format": "uri",
"x-order": 52,
"description": "Source image for face swap"
},
"source_image_15": {
"type": "string",
"title": "Source Image 15",
"format": "uri",
"x-order": 53,
"description": "Source image for face swap"
},
"mask_blur_amount": {
"type": "number",
"title": "Mask Blur Amount",
"default": 8,
"x-order": 58,
"description": "Amount of blur to apply to the mask."
},
"third_pass_steps": {
"type": "integer",
"title": "Third Pass Steps",
"default": 40,
"x-order": 27,
"description": "Second pass steps"
},
"upscale_fidelity": {
"type": "number",
"title": "Upscale Fidelity",
"default": 0.7,
"x-order": 18,
"description": "Upscale codeformer fidelity"
},
"prompt_strength_2": {
"type": "number",
"title": "Prompt Strength 2",
"default": 0.8,
"maximum": 1,
"minimum": 0,
"x-order": 37,
"description": "Prompt strength when using init image. 1.0 corresponds to full destruction of information in init image"
},
"prompt_strength_3": {
"type": "number",
"title": "Prompt Strength 3",
"default": 0.8,
"maximum": 1,
"minimum": 0,
"x-order": 38,
"description": "Prompt strength when using init image. 1.0 corresponds to full destruction of information in init image"
},
"prompt_strength_4": {
"type": "number",
"title": "Prompt Strength 4",
"default": 0.8,
"maximum": 1,
"minimum": 0,
"x-order": 39,
"description": "Prompt strength when using init image. 1.0 corresponds to full destruction of information in init image"
},
"second_pass_steps": {
"type": "integer",
"title": "Second Pass Steps",
"default": 40,
"x-order": 24,
"description": "Second pass steps"
},
"show_debug_images": {
"type": "boolean",
"title": "Show Debug Images",
"default": false,
"x-order": 16,
"description": "Show debug images"
},
"upscale_final_size": {
"type": "integer",
"title": "Upscale Final Size",
"default": 4,
"x-order": 17,
"description": "Upscale final size multiplier"
},
"num_inference_steps": {
"type": "integer",
"title": "Num Inference Steps",
"default": 20,
"maximum": 500,
"minimum": 1,
"x-order": 9,
"description": "Number of denoising steps"
},
"third_pass_strength": {
"type": "number",
"title": "Third Pass Strength",
"default": 0.5,
"x-order": 25,
"description": "Second pass strength"
},
"second_pass_strength": {
"type": "number",
"title": "Second Pass Strength",
"default": 0.8,
"x-order": 22,
"description": "Second pass strength"
},
"upscale_face_upsample": {
"type": "boolean",
"title": "Upscale Face Upsample",
"default": true,
"x-order": 20,
"description": "Upscale face upsample"
},
"disable_cn_second_pass": {
"type": "boolean",
"title": "Disable Cn Second Pass",
"default": false,
"x-order": 54,
"description": "Disable controlnet second pass"
},
"third_pass_guidance_scale": {
"type": "number",
"title": "Third Pass Guidance Scale",
"default": 3,
"x-order": 26,
"description": "Second pass guidance scale"
},
"second_pass_guidance_scale": {
"type": "number",
"title": "Second Pass Guidance Scale",
"default": 7.5,
"x-order": 23,
"description": "Second pass guidance scale"
},
"upscale_background_enhance": {
"type": "boolean",
"title": "Upscale Background Enhance",
"default": true,
"x-order": 19,
"description": "Upscale background enhance"
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
{
"title": "Output"
}