pratos
/
sd-2-1-img2img
Stable Diffusion 2.1 img2img model: 512x512
- Public
- 780 runs
Run pratos/sd-2-1-img2img 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 |
---|---|---|---|
prompt |
string
|
A gentleman otter
|
Prompt for the model
|
negative_prompt |
string
|
((((ugly)))), (((duplicate))), ((morbid)), ((mutilated)), out of frame, extra fingers, mutated hands, ((poorly drawn hands)), ((poorly drawn face)), (((mutation))), (((deformed))), ((ugly)), blurry, ((bad anatomy)), (((bad proportions))), ((extra limbs)), cloned face, (((disfigured))), out of frame, ugly, extra limbs, (bad anatomy), gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands, (fused fingers), (too many fingers), (((long neck)))
|
Negative prompt for the model. Add things that you'd want to avoid in the image.
|
image |
string
|
Image to use as a prompt. Upload image in following formats: jpg, jpeg, png, heic, webp, heif, avif.
|
|
scheduler |
string
(enum)
|
euler
Options: euler, ddim, ddpm, dpm-solver-single-step, dmp-solver-multi-step, heun, kdpm2, kdpm2-ancestral, lms, pndm, ipndm, euler-ancestral |
Sampler to use
|
cfg_scale |
number
|
7.5
Min: 1 Max: 30 |
Higher values mean the text prompt will be more important than the image prompt. Also results in higher saturated images. Ideally keep values between 6-13.
|
noise |
number
|
0.5
Max: 1 |
Percent of noise to add to the image. Higher values will result in image deviating away from original image.
|
num_inference_steps |
integer
|
50
Min: 1 Max: 500 |
Number of inference steps
|
num_output_images |
integer
|
1
Min: 1 Max: 5 |
Number of output images
|
seed |
integer
|
-1
|
Seed for the model
|
{
"type": "object",
"title": "Input",
"required": [
"image"
],
"properties": {
"seed": {
"type": "integer",
"title": "Seed",
"default": -1,
"x-order": 8,
"description": "Seed for the model"
},
"image": {
"type": "string",
"title": "Image",
"format": "uri",
"x-order": 2,
"description": "Image to use as a prompt. Upload image in following formats: jpg, jpeg, png, heic, webp, heif, avif."
},
"noise": {
"type": "number",
"title": "Noise",
"default": 0.5,
"maximum": 1,
"minimum": 0,
"x-order": 5,
"description": "Percent of noise to add to the image. Higher values will result in image deviating away from original image."
},
"prompt": {
"type": "string",
"title": "Prompt",
"default": "A gentleman otter",
"x-order": 0,
"description": "Prompt for the model"
},
"cfg_scale": {
"type": "number",
"title": "Cfg Scale",
"default": 7.5,
"maximum": 30,
"minimum": 1,
"x-order": 4,
"description": "Higher values mean the text prompt will be more important than the image prompt. Also results in higher saturated images. Ideally keep values between 6-13."
},
"scheduler": {
"enum": [
"euler",
"ddim",
"ddpm",
"dpm-solver-single-step",
"dmp-solver-multi-step",
"heun",
"kdpm2",
"kdpm2-ancestral",
"lms",
"pndm",
"ipndm",
"euler-ancestral"
],
"type": "string",
"title": "scheduler",
"description": "Sampler to use",
"default": "euler",
"x-order": 3
},
"negative_prompt": {
"type": "string",
"title": "Negative Prompt",
"default": "((((ugly)))), (((duplicate))), ((morbid)), ((mutilated)), out of frame, extra fingers, mutated hands, ((poorly drawn hands)), ((poorly drawn face)), (((mutation))), (((deformed))), ((ugly)), blurry, ((bad anatomy)), (((bad proportions))), ((extra limbs)), cloned face, (((disfigured))), out of frame, ugly, extra limbs, (bad anatomy), gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands, (fused fingers), (too many fingers), (((long neck)))",
"x-order": 1,
"description": "Negative prompt for the model. Add things that you'd want to avoid in the image."
},
"num_output_images": {
"type": "integer",
"title": "Num Output Images",
"default": 1,
"maximum": 5,
"minimum": 1,
"x-order": 7,
"description": "Number of output images"
},
"num_inference_steps": {
"type": "integer",
"title": "Num Inference Steps",
"default": 50,
"maximum": 500,
"minimum": 1,
"x-order": 6,
"description": "Number of inference 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"
}