prompthunt
/
base-inference-swap
- Public
- 4 runs
Run prompthunt/base-inference-swap 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
|
|
image |
string
|
Optional Image to use for img2img guidance
|
|
mask |
string
|
Optional Mask to use for legacy inpainting
|
|
prompt |
string
|
photo of cjw person
|
Input prompt
|
negative_prompt |
string
|
|
Specify things to not see in the output
|
width |
integer
|
512
|
Width of output image
|
height |
integer
|
512
|
Height of output image
|
num_outputs |
integer
|
1
Min: 1 Max: 4 |
Number of images to output.
|
num_inference_steps |
integer
|
50
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
|
scheduler |
string
(enum)
|
DPMSolverMultistep
Options: DDIM, DPMSolverMultistep, HeunDiscrete, K_EULER_ANCESTRAL, K_EULER, KLMS, PNDM, UniPCMultistep, KarrasDPM |
Choose a scheduler.
|
seed |
integer
|
Random seed. Leave blank to randomize the seed
|
|
should_swap_face |
boolean
|
False
|
Should swap face
|
source_image |
string
|
Source image for face swap
|
{
"type": "object",
"title": "Input",
"properties": {
"mask": {
"type": "string",
"title": "Mask",
"format": "uri",
"x-order": 2,
"description": "Optional Mask to use for legacy inpainting"
},
"seed": {
"type": "integer",
"title": "Seed",
"x-order": 12,
"description": "Random seed. Leave blank to randomize the seed"
},
"image": {
"type": "string",
"title": "Image",
"format": "uri",
"x-order": 1,
"description": "Optional Image to use for img2img guidance"
},
"width": {
"type": "integer",
"title": "Width",
"default": 512,
"x-order": 5,
"description": "Width of output image"
},
"height": {
"type": "integer",
"title": "Height",
"default": 512,
"x-order": 6,
"description": "Height of output image"
},
"prompt": {
"type": "string",
"title": "Prompt",
"default": "photo of cjw person",
"x-order": 3,
"description": "Input prompt"
},
"weights": {
"type": "string",
"title": "Weights",
"x-order": 0,
"description": "Weights url"
},
"scheduler": {
"enum": [
"DDIM",
"DPMSolverMultistep",
"HeunDiscrete",
"K_EULER_ANCESTRAL",
"K_EULER",
"KLMS",
"PNDM",
"UniPCMultistep",
"KarrasDPM"
],
"type": "string",
"title": "scheduler",
"description": "Choose a scheduler.",
"default": "DPMSolverMultistep",
"x-order": 11
},
"num_outputs": {
"type": "integer",
"title": "Num Outputs",
"default": 1,
"maximum": 4,
"minimum": 1,
"x-order": 7,
"description": "Number of images to output."
},
"source_image": {
"type": "string",
"title": "Source Image",
"format": "uri",
"x-order": 14,
"description": "Source image for face swap"
},
"guidance_scale": {
"type": "number",
"title": "Guidance Scale",
"default": 7.5,
"maximum": 50,
"minimum": 1,
"x-order": 9,
"description": "Scale for classifier-free guidance"
},
"negative_prompt": {
"type": "string",
"title": "Negative Prompt",
"default": "",
"x-order": 4,
"description": "Specify things to not see in the output"
},
"prompt_strength": {
"type": "number",
"title": "Prompt Strength",
"default": 0.8,
"maximum": 1,
"minimum": 0,
"x-order": 10,
"description": "Prompt strength when using init image. 1.0 corresponds to full destruction of information in init image"
},
"should_swap_face": {
"type": "boolean",
"title": "Should Swap Face",
"default": false,
"x-order": 13,
"description": "Should swap face"
},
"num_inference_steps": {
"type": "integer",
"title": "Num Inference Steps",
"default": 50,
"maximum": 500,
"minimum": 1,
"x-order": 8,
"description": "Number of denoising steps"
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
{
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"title": "Output"
}