dsingal0
/
fooocus-api
fooocus-api without async queue length limit
- Public
- 13 runs
Run dsingal0/fooocus-api 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
|
|
Prompt for image generation
|
negative_prompt |
string
|
|
Negtive prompt for image generation
|
style_selections |
string
|
Fooocus V2,Fooocus Enhance,Fooocus Sharp
|
Fooocus styles applied for image generation, seperated by comma
|
performance_selection |
string
(enum)
|
Speed
Options: Speed, Quality, Extreme Speed |
Performance selection
|
aspect_ratios_selection |
string
(enum)
|
1152*896
Options: 704*1408, 704*1344, 768*1344, 768*1280, 832*1216, 832*1152, 896*1152, 896*1088, 960*1088, 960*1024, 1024*1024, 1024*960, 1088*960, 1088*896, 1152*896, 1152*832, 1216*832, 1280*768, 1344*768, 1344*704, 1408*704, 1472*704, 1536*640, 1600*640, 1664*576, 1728*576 |
The generated image's size
|
image_number |
integer
|
1
Min: 1 Max: 8 |
How many image to generate
|
image_seed |
integer
|
-1
|
Seed to generate image, -1 for random
|
sharpness |
number
|
2
Max: 30 |
None
|
guidance_scale |
number
|
4
Min: 1 Max: 30 |
None
|
refiner_switch |
number
|
0.5
Min: 0.1 Max: 1 |
None
|
uov_input_image |
string
|
Input image for upscale or variation, keep None for not upscale or variation
|
|
uov_method |
string
(enum)
|
Disabled
Options: Disabled, Vary (Subtle), Vary (Strong), Upscale (1.5x), Upscale (2x), Upscale (Fast 2x), Upscale (Custom) |
An enumeration.
|
uov_upscale_value |
number
|
0
|
Only when Upscale (Custom)
|
inpaint_additional_prompt |
string
|
|
Prompt for image generation
|
inpaint_input_image |
string
|
Input image for inpaint or outpaint, keep None for not inpaint or outpaint. Please noticed, `uov_input_image` has bigger priority is not None.
|
|
inpaint_input_mask |
string
|
Input mask for inpaint
|
|
outpaint_selections |
string
|
|
Outpaint expansion selections, literal 'Left', 'Right', 'Top', 'Bottom' seperated by comma
|
outpaint_distance_left |
integer
|
0
|
Outpaint expansion distance from Left of the image
|
outpaint_distance_top |
integer
|
0
|
Outpaint expansion distance from Top of the image
|
outpaint_distance_right |
integer
|
0
|
Outpaint expansion distance from Right of the image
|
outpaint_distance_bottom |
integer
|
0
|
Outpaint expansion distance from Bottom of the image
|
cn_img1 |
string
|
Input image for image prompt. If all cn_img[n] are None, image prompt will not applied.
|
|
cn_stop1 |
number
|
Max: 1 |
Stop at for image prompt, None for default value
|
cn_weight1 |
number
|
Max: 2 |
Weight for image prompt, None for default value
|
cn_type1 |
string
(enum)
|
ImagePrompt
Options: ImagePrompt, FaceSwap, PyraCanny, CPDS |
ControlNet type for image prompt
|
cn_img2 |
string
|
Input image for image prompt. If all cn_img[n] are None, image prompt will not applied.
|
|
cn_stop2 |
number
|
Max: 1 |
Stop at for image prompt, None for default value
|
cn_weight2 |
number
|
Max: 2 |
Weight for image prompt, None for default value
|
cn_type2 |
string
(enum)
|
ImagePrompt
Options: ImagePrompt, FaceSwap, PyraCanny, CPDS |
ControlNet type for image prompt
|
cn_img3 |
string
|
Input image for image prompt. If all cn_img[n] are None, image prompt will not applied.
|
|
cn_stop3 |
number
|
Max: 1 |
Stop at for image prompt, None for default value
|
cn_weight3 |
number
|
Max: 2 |
Weight for image prompt, None for default value
|
cn_type3 |
string
(enum)
|
ImagePrompt
Options: ImagePrompt, FaceSwap, PyraCanny, CPDS |
ControlNet type for image prompt
|
cn_img4 |
string
|
Input image for image prompt. If all cn_img[n] are None, image prompt will not applied.
|
|
cn_stop4 |
number
|
Max: 1 |
Stop at for image prompt, None for default value
|
cn_weight4 |
number
|
Max: 2 |
Weight for image prompt, None for default value
|
cn_type4 |
string
(enum)
|
ImagePrompt
Options: ImagePrompt, FaceSwap, PyraCanny, CPDS |
ControlNet type for image prompt
|
{
"type": "object",
"title": "Input",
"properties": {
"prompt": {
"type": "string",
"title": "Prompt",
"default": "",
"x-order": 0,
"description": "Prompt for image generation"
},
"cn_img1": {
"type": "string",
"title": "Cn Img1",
"format": "uri",
"x-order": 21,
"description": "Input image for image prompt. If all cn_img[n] are None, image prompt will not applied."
},
"cn_img2": {
"type": "string",
"title": "Cn Img2",
"format": "uri",
"x-order": 25,
"description": "Input image for image prompt. If all cn_img[n] are None, image prompt will not applied."
},
"cn_img3": {
"type": "string",
"title": "Cn Img3",
"format": "uri",
"x-order": 29,
"description": "Input image for image prompt. If all cn_img[n] are None, image prompt will not applied."
},
"cn_img4": {
"type": "string",
"title": "Cn Img4",
"format": "uri",
"x-order": 33,
"description": "Input image for image prompt. If all cn_img[n] are None, image prompt will not applied."
},
"cn_stop1": {
"type": "number",
"title": "Cn Stop1",
"maximum": 1,
"minimum": 0,
"x-order": 22,
"description": "Stop at for image prompt, None for default value"
},
"cn_stop2": {
"type": "number",
"title": "Cn Stop2",
"maximum": 1,
"minimum": 0,
"x-order": 26,
"description": "Stop at for image prompt, None for default value"
},
"cn_stop3": {
"type": "number",
"title": "Cn Stop3",
"maximum": 1,
"minimum": 0,
"x-order": 30,
"description": "Stop at for image prompt, None for default value"
},
"cn_stop4": {
"type": "number",
"title": "Cn Stop4",
"maximum": 1,
"minimum": 0,
"x-order": 34,
"description": "Stop at for image prompt, None for default value"
},
"cn_type1": {
"enum": [
"ImagePrompt",
"FaceSwap",
"PyraCanny",
"CPDS"
],
"type": "string",
"title": "cn_type1",
"description": "ControlNet type for image prompt",
"default": "ImagePrompt",
"x-order": 24
},
"cn_type2": {
"enum": [
"ImagePrompt",
"FaceSwap",
"PyraCanny",
"CPDS"
],
"type": "string",
"title": "cn_type2",
"description": "ControlNet type for image prompt",
"default": "ImagePrompt",
"x-order": 28
},
"cn_type3": {
"enum": [
"ImagePrompt",
"FaceSwap",
"PyraCanny",
"CPDS"
],
"type": "string",
"title": "cn_type3",
"description": "ControlNet type for image prompt",
"default": "ImagePrompt",
"x-order": 32
},
"cn_type4": {
"enum": [
"ImagePrompt",
"FaceSwap",
"PyraCanny",
"CPDS"
],
"type": "string",
"title": "cn_type4",
"description": "ControlNet type for image prompt",
"default": "ImagePrompt",
"x-order": 36
},
"sharpness": {
"type": "number",
"title": "Sharpness",
"default": 2,
"maximum": 30,
"minimum": 0,
"x-order": 7
},
"cn_weight1": {
"type": "number",
"title": "Cn Weight1",
"maximum": 2,
"minimum": 0,
"x-order": 23,
"description": "Weight for image prompt, None for default value"
},
"cn_weight2": {
"type": "number",
"title": "Cn Weight2",
"maximum": 2,
"minimum": 0,
"x-order": 27,
"description": "Weight for image prompt, None for default value"
},
"cn_weight3": {
"type": "number",
"title": "Cn Weight3",
"maximum": 2,
"minimum": 0,
"x-order": 31,
"description": "Weight for image prompt, None for default value"
},
"cn_weight4": {
"type": "number",
"title": "Cn Weight4",
"maximum": 2,
"minimum": 0,
"x-order": 35,
"description": "Weight for image prompt, None for default value"
},
"image_seed": {
"type": "integer",
"title": "Image Seed",
"default": -1,
"x-order": 6,
"description": "Seed to generate image, -1 for random"
},
"uov_method": {
"enum": [
"Disabled",
"Vary (Subtle)",
"Vary (Strong)",
"Upscale (1.5x)",
"Upscale (2x)",
"Upscale (Fast 2x)",
"Upscale (Custom)"
],
"type": "string",
"title": "uov_method",
"description": "An enumeration.",
"default": "Disabled",
"x-order": 11
},
"image_number": {
"type": "integer",
"title": "Image Number",
"default": 1,
"maximum": 8,
"minimum": 1,
"x-order": 5,
"description": "How many image to generate"
},
"guidance_scale": {
"type": "number",
"title": "Guidance Scale",
"default": 4,
"maximum": 30,
"minimum": 1,
"x-order": 8
},
"refiner_switch": {
"type": "number",
"title": "Refiner Switch",
"default": 0.5,
"maximum": 1,
"minimum": 0.1,
"x-order": 9
},
"negative_prompt": {
"type": "string",
"title": "Negative Prompt",
"default": "",
"x-order": 1,
"description": "Negtive prompt for image generation"
},
"uov_input_image": {
"type": "string",
"title": "Uov Input Image",
"format": "uri",
"x-order": 10,
"description": "Input image for upscale or variation, keep None for not upscale or variation"
},
"style_selections": {
"type": "string",
"title": "Style Selections",
"default": "Fooocus V2,Fooocus Enhance,Fooocus Sharp",
"x-order": 2,
"description": "Fooocus styles applied for image generation, seperated by comma"
},
"uov_upscale_value": {
"type": "number",
"title": "Uov Upscale Value",
"default": 0,
"x-order": 12,
"description": "Only when Upscale (Custom)"
},
"inpaint_input_mask": {
"type": "string",
"title": "Inpaint Input Mask",
"format": "uri",
"x-order": 15,
"description": "Input mask for inpaint"
},
"inpaint_input_image": {
"type": "string",
"title": "Inpaint Input Image",
"format": "uri",
"x-order": 14,
"description": "Input image for inpaint or outpaint, keep None for not inpaint or outpaint. Please noticed, `uov_input_image` has bigger priority is not None."
},
"outpaint_selections": {
"type": "string",
"title": "Outpaint Selections",
"default": "",
"x-order": 16,
"description": "Outpaint expansion selections, literal 'Left', 'Right', 'Top', 'Bottom' seperated by comma"
},
"outpaint_distance_top": {
"type": "integer",
"title": "Outpaint Distance Top",
"default": 0,
"x-order": 18,
"description": "Outpaint expansion distance from Top of the image"
},
"performance_selection": {
"enum": [
"Speed",
"Quality",
"Extreme Speed"
],
"type": "string",
"title": "performance_selection",
"description": "Performance selection",
"default": "Speed",
"x-order": 3
},
"outpaint_distance_left": {
"type": "integer",
"title": "Outpaint Distance Left",
"default": 0,
"x-order": 17,
"description": "Outpaint expansion distance from Left of the image"
},
"aspect_ratios_selection": {
"enum": [
"704*1408",
"704*1344",
"768*1344",
"768*1280",
"832*1216",
"832*1152",
"896*1152",
"896*1088",
"960*1088",
"960*1024",
"1024*1024",
"1024*960",
"1088*960",
"1088*896",
"1152*896",
"1152*832",
"1216*832",
"1280*768",
"1344*768",
"1344*704",
"1408*704",
"1472*704",
"1536*640",
"1600*640",
"1664*576",
"1728*576"
],
"type": "string",
"title": "aspect_ratios_selection",
"description": "The generated image's size",
"default": "1152*896",
"x-order": 4
},
"outpaint_distance_right": {
"type": "integer",
"title": "Outpaint Distance Right",
"default": 0,
"x-order": 19,
"description": "Outpaint expansion distance from Right of the image"
},
"outpaint_distance_bottom": {
"type": "integer",
"title": "Outpaint Distance Bottom",
"default": 0,
"x-order": 20,
"description": "Outpaint expansion distance from Bottom of the image"
},
"inpaint_additional_prompt": {
"type": "string",
"title": "Inpaint Additional Prompt",
"default": "",
"x-order": 13,
"description": "Prompt for image generation"
}
}
}
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"
}