From ad2de651e466235c1593ce36e7ef3f3a5530b2a2 Mon Sep 17 00:00:00 2001 From: mrhan1993 <50648276+mrhan1993@users.noreply.github.com> Date: Mon, 15 Apr 2024 15:36:32 +0800 Subject: [PATCH] Format and update openapi.json Change .gitignore Format some code --- .gitignore | 57 +- cog.yaml | 2 +- docs/openapi.json | 4019 +++++++++++++++++++++++++++++- examples/examples_v1.py | 2 - fooocusapi/models/common/base.py | 15 +- fooocusapi/utils/file_utils.py | 7 +- main.py | 8 +- 7 files changed, 4060 insertions(+), 50 deletions(-) diff --git a/.gitignore b/.gitignore index 9783fda..fd4bdb5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,11 @@ +#ide config +.idea +.vscode + +#runtime __pycache__ .DS_Store + # models *.ckpt *.safetensors @@ -22,46 +28,21 @@ conda logs log -sorted_styles.json -/language/default.json -lena.png -lena_result.png -lena_test.py +# config files +.cog config.txt config_modification_tutorial.txt user_path_config.txt user_path_config-deprecated.txt -build_chb.py -experiment.py -/modules/*.png -/tmp -/ui-config.json -/outputs -/config.json -/webui.settings.bat -/embeddings -/styles.csv -/params.txt -/styles.csv.bak -/webui-user.bat -/webui-user.sh -/interrogate -/user.css -/.idea -/notification.ogg -/notification.mp3 -/SwinIR -/textual_inversion -.vscode -/extensions -/test/stdout.txt -/test/stderr.txt -/cache.json* -/config_states/ -/node_modules -/package-lock.json -/.coverage* -/auth.json -.cog/ + +sorted_styles.json /presets -*.db \ No newline at end of file + +# db +*.db + +# cache +outputs + +#other +*.http \ No newline at end of file diff --git a/cog.yaml b/cog.yaml index 7d40152..ef269c2 100644 --- a/cog.yaml +++ b/cog.yaml @@ -37,7 +37,7 @@ build: - "colorlog==6.8.2" - "rich==13.7.1" - # commands run after the environment is setup + # commands run after the environment is set up # run: # - "echo env is ready!" # - "echo another command if needed" diff --git a/docs/openapi.json b/docs/openapi.json index 45862fb..d27b8cd 100755 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -1 +1,4018 @@ -{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/":{"get":{"summary":"Home","operationId":"home__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ping":{"get":{"summary":"Ping","description":"Returns a simple 'pong' response","operationId":"ping_ping_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/generation/text-to-image":{"post":{"summary":"Text2Img Generation","operationId":"text2img_generation_v1_generation_text_to_image_post","parameters":[{"name":"accept","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parameter to overvide 'Accept' header, 'image/png' for output bytes","title":"Accept"},"description":"Parameter to overvide 'Accept' header, 'image/png' for output bytes"},{"name":"accept","in":"header","required":false,"schema":{"type":"string","title":"Accept"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Text2ImgRequest"}}}},"responses":{"200":{"description":"PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/GeneratedImageResult"}},{"$ref":"#/components/schemas/AsyncJobResponse"}],"title":"Response Text2Img Generation V1 Generation Text To Image Post"},"example":[{"base64":"...very long string...","seed":"1050625087","finish_reason":"SUCCESS"}]},"application/json async":{"example":{"job_id":1,"job_type":"Text to Image"}},"image/png":{"example":"PNG bytes, what did you expect?"}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/generation/text-to-image-with-ip":{"post":{"summary":"Text To Img With Ip","operationId":"text_to_img_with_ip_v2_generation_text_to_image_with_ip_post","parameters":[{"name":"accept","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parameter to overvide 'Accept' header, 'image/png' for output bytes","title":"Accept"},"description":"Parameter to overvide 'Accept' header, 'image/png' for output bytes"},{"name":"accept","in":"header","required":false,"schema":{"type":"string","title":"Accept"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Text2ImgRequestWithPrompt"}}}},"responses":{"200":{"description":"PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/GeneratedImageResult"}},{"$ref":"#/components/schemas/AsyncJobResponse"}],"title":"Response Text To Img With Ip V2 Generation Text To Image With Ip Post"},"example":[{"base64":"...very long string...","seed":"1050625087","finish_reason":"SUCCESS"}]},"application/json async":{"example":{"job_id":1,"job_type":"Text to Image"}},"image/png":{"example":"PNG bytes, what did you expect?"}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generation/image-upscale-vary":{"post":{"summary":"Img Upscale Or Vary","operationId":"img_upscale_or_vary_v1_generation_image_upscale_vary_post","parameters":[{"name":"accept","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parameter to overvide 'Accept' header, 'image/png' for output bytes","title":"Accept"},"description":"Parameter to overvide 'Accept' header, 'image/png' for output bytes"},{"name":"accept","in":"header","required":false,"schema":{"type":"string","title":"Accept"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_img_upscale_or_vary_v1_generation_image_upscale_vary_post"}}}},"responses":{"200":{"description":"PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/GeneratedImageResult"}},{"$ref":"#/components/schemas/AsyncJobResponse"}],"title":"Response Img Upscale Or Vary V1 Generation Image Upscale Vary Post"},"example":[{"base64":"...very long string...","seed":"1050625087","finish_reason":"SUCCESS"}]},"application/json async":{"example":{"job_id":1,"job_type":"Text to Image"}},"image/png":{"example":"PNG bytes, what did you expect?"}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/generation/image-upscale-vary":{"post":{"summary":"Img Upscale Or Vary V2","operationId":"img_upscale_or_vary_v2_v2_generation_image_upscale_vary_post","parameters":[{"name":"accept","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parameter to overvide 'Accept' header, 'image/png' for output bytes","title":"Accept"},"description":"Parameter to overvide 'Accept' header, 'image/png' for output bytes"},{"name":"accept","in":"header","required":false,"schema":{"type":"string","title":"Accept"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImgUpscaleOrVaryRequestJson"}}}},"responses":{"200":{"description":"PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/GeneratedImageResult"}},{"$ref":"#/components/schemas/AsyncJobResponse"}],"title":"Response Img Upscale Or Vary V2 V2 Generation Image Upscale Vary Post"},"example":[{"base64":"...very long string...","seed":"1050625087","finish_reason":"SUCCESS"}]},"application/json async":{"example":{"job_id":1,"job_type":"Text to Image"}},"image/png":{"example":"PNG bytes, what did you expect?"}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generation/image-inpaint-outpaint":{"post":{"summary":"Img Inpaint Or Outpaint","operationId":"img_inpaint_or_outpaint_v1_generation_image_inpaint_outpaint_post","parameters":[{"name":"accept","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parameter to overvide 'Accept' header, 'image/png' for output bytes","title":"Accept"},"description":"Parameter to overvide 'Accept' header, 'image/png' for output bytes"},{"name":"accept","in":"header","required":false,"schema":{"type":"string","title":"Accept"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_img_inpaint_or_outpaint_v1_generation_image_inpaint_outpaint_post"}}}},"responses":{"200":{"description":"PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/GeneratedImageResult"}},{"$ref":"#/components/schemas/AsyncJobResponse"}],"title":"Response Img Inpaint Or Outpaint V1 Generation Image Inpaint Outpaint Post"},"example":[{"base64":"...very long string...","seed":"1050625087","finish_reason":"SUCCESS"}]},"application/json async":{"example":{"job_id":1,"job_type":"Text to Image"}},"image/png":{"example":"PNG bytes, what did you expect?"}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/generation/image-inpaint-outpaint":{"post":{"summary":"Img Inpaint Or Outpaint V2","operationId":"img_inpaint_or_outpaint_v2_v2_generation_image_inpaint_outpaint_post","parameters":[{"name":"accept","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parameter to overvide 'Accept' header, 'image/png' for output bytes","title":"Accept"},"description":"Parameter to overvide 'Accept' header, 'image/png' for output bytes"},{"name":"accept","in":"header","required":false,"schema":{"type":"string","title":"Accept"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImgInpaintOrOutpaintRequestJson"}}}},"responses":{"200":{"description":"PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/GeneratedImageResult"}},{"$ref":"#/components/schemas/AsyncJobResponse"}],"title":"Response Img Inpaint Or Outpaint V2 V2 Generation Image Inpaint Outpaint Post"},"example":[{"base64":"...very long string...","seed":"1050625087","finish_reason":"SUCCESS"}]},"application/json async":{"example":{"job_id":1,"job_type":"Text to Image"}},"image/png":{"example":"PNG bytes, what did you expect?"}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generation/image-prompt":{"post":{"summary":"Img Prompt","operationId":"img_prompt_v1_generation_image_prompt_post","parameters":[{"name":"accept","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parameter to overvide 'Accept' header, 'image/png' for output bytes","title":"Accept"},"description":"Parameter to overvide 'Accept' header, 'image/png' for output bytes"},{"name":"accept","in":"header","required":false,"schema":{"type":"string","title":"Accept"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"allOf":[{"$ref":"#/components/schemas/Body_img_prompt_v1_generation_image_prompt_post"}],"title":"Body"}}}},"responses":{"200":{"description":"PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/GeneratedImageResult"}},{"$ref":"#/components/schemas/AsyncJobResponse"}],"title":"Response Img Prompt V1 Generation Image Prompt Post"},"example":[{"base64":"...very long string...","seed":"1050625087","finish_reason":"SUCCESS"}]},"application/json async":{"example":{"job_id":1,"job_type":"Text to Image"}},"image/png":{"example":"PNG bytes, what did you expect?"}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/generation/image-prompt":{"post":{"summary":"Img Prompt","operationId":"img_prompt_v2_generation_image_prompt_post","parameters":[{"name":"accept","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Parameter to overvide 'Accept' header, 'image/png' for output bytes","title":"Accept"},"description":"Parameter to overvide 'Accept' header, 'image/png' for output bytes"},{"name":"accept","in":"header","required":false,"schema":{"type":"string","title":"Accept"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImgPromptRequestJson"}}}},"responses":{"200":{"description":"PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/GeneratedImageResult"}},{"$ref":"#/components/schemas/AsyncJobResponse"}],"title":"Response Img Prompt V2 Generation Image Prompt Post"},"example":[{"base64":"...very long string...","seed":"1050625087","finish_reason":"SUCCESS"}]},"application/json async":{"example":{"job_id":1,"job_type":"Text to Image"}},"image/png":{"example":"PNG bytes, what did you expect?"}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generation/query-job":{"get":{"summary":"Query Job","description":"Query async generation job","operationId":"query_job_v1_generation_query_job_get","parameters":[{"name":"job_id","in":"query","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"require_step_preview","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Require Step Preview"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsyncJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generation/job-queue":{"get":{"summary":"Job Queue","description":"Query job queue info","operationId":"job_queue_v1_generation_job_queue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobQueueInfo"}}}}}}},"/v1/generation/job-history":{"get":{"summary":"Get History","description":"Query historical job data","operationId":"get_history_v1_generation_job_history_get","parameters":[{"name":"job_id","in":"query","required":false,"schema":{"type":"string","title":"Job Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/JobHistoryResponse"},{"type":"object"}],"title":"Response Get History V1 Generation Job History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/generation/stop":{"post":{"summary":"Stop","description":"Job stoping","operationId":"stop_v1_generation_stop_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopResponse"}}}}}}},"/v1/tools/describe-image":{"post":{"summary":"Describe Image","operationId":"describe_image_v1_tools_describe_image_post","parameters":[{"name":"type","in":"query","required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/DescribeImageType"}],"description":"Image type, 'Photo' or 'Anime'","default":"Photo","title":"Type"},"description":"Image type, 'Photo' or 'Anime'"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_describe_image_v1_tools_describe_image_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DescribeImageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/engines/all-models":{"get":{"summary":"All Models","description":"Get all filenames of base model and lora","operationId":"all_models_v1_engines_all_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllModelNamesResponse"}}}}}}},"/v1/engines/refresh-models":{"post":{"summary":"Refresh Models","description":"Refresh local files and get all filenames of base model and lora","operationId":"refresh_models_v1_engines_refresh_models_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllModelNamesResponse"}}}}}}},"/v1/engines/styles":{"get":{"summary":"All Styles","description":"Get all legal Fooocus styles","operationId":"all_styles_v1_engines_styles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Response All Styles V1 Engines Styles Get"}}}}}}}},"components":{"schemas":{"AdvancedParams":{"properties":{"disable_preview":{"type":"boolean","title":"Disable Preview","description":"Disable preview during generation","default":false},"adm_scaler_positive":{"type":"number","maximum":3.0,"minimum":0.1,"title":"Adm Scaler Positive","description":"Positive ADM Guidance Scaler","default":1.5},"adm_scaler_negative":{"type":"number","maximum":3.0,"minimum":0.1,"title":"Adm Scaler Negative","description":"Negative ADM Guidance Scaler","default":0.8},"adm_scaler_end":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Adm Scaler End","description":"ADM Guidance End At Step","default":0.3},"refiner_swap_method":{"type":"string","title":"Refiner Swap Method","description":"Refiner swap method","default":"joint"},"adaptive_cfg":{"type":"number","maximum":30.0,"minimum":1.0,"title":"Adaptive Cfg","description":"CFG Mimicking from TSNR","default":7.0},"sampler_name":{"type":"string","title":"Sampler Name","description":"Sampler","default":"dpmpp_2m_sde_gpu"},"scheduler_name":{"type":"string","title":"Scheduler Name","description":"Scheduler","default":"karras"},"overwrite_step":{"type":"integer","maximum":200.0,"minimum":-1.0,"title":"Overwrite Step","description":"Forced Overwrite of Sampling Step","default":-1},"overwrite_switch":{"type":"integer","maximum":200.0,"minimum":-1.0,"title":"Overwrite Switch","description":"Forced Overwrite of Refiner Switch Step","default":-1},"overwrite_width":{"type":"integer","maximum":2048.0,"minimum":-1.0,"title":"Overwrite Width","description":"Forced Overwrite of Generating Width","default":-1},"overwrite_height":{"type":"integer","maximum":2048.0,"minimum":-1.0,"title":"Overwrite Height","description":"Forced Overwrite of Generating Height","default":-1},"overwrite_vary_strength":{"type":"number","maximum":1.0,"minimum":-1.0,"title":"Overwrite Vary Strength","description":"Forced Overwrite of Denoising Strength of \"Vary\"","default":-1},"overwrite_upscale_strength":{"type":"number","maximum":1.0,"minimum":-1.0,"title":"Overwrite Upscale Strength","description":"Forced Overwrite of Denoising Strength of \"Upscale\"","default":-1},"mixing_image_prompt_and_vary_upscale":{"type":"boolean","title":"Mixing Image Prompt And Vary Upscale","description":"Mixing Image Prompt and Vary/Upscale","default":false},"mixing_image_prompt_and_inpaint":{"type":"boolean","title":"Mixing Image Prompt And Inpaint","description":"Mixing Image Prompt and Inpaint","default":false},"debugging_cn_preprocessor":{"type":"boolean","title":"Debugging Cn Preprocessor","description":"Debug Preprocessors","default":false},"skipping_cn_preprocessor":{"type":"boolean","title":"Skipping Cn Preprocessor","description":"Skip Preprocessors","default":false},"controlnet_softness":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Controlnet Softness","description":"Softness of ControlNet","default":0.25},"canny_low_threshold":{"type":"integer","maximum":255.0,"minimum":1.0,"title":"Canny Low Threshold","description":"Canny Low Threshold","default":64},"canny_high_threshold":{"type":"integer","maximum":255.0,"minimum":1.0,"title":"Canny High Threshold","description":"Canny High Threshold","default":128},"freeu_enabled":{"type":"boolean","title":"Freeu Enabled","description":"FreeU enabled","default":false},"freeu_b1":{"type":"number","title":"Freeu B1","description":"FreeU B1","default":1.01},"freeu_b2":{"type":"number","title":"Freeu B2","description":"FreeU B2","default":1.02},"freeu_s1":{"type":"number","title":"Freeu S1","description":"FreeU B3","default":0.99},"freeu_s2":{"type":"number","title":"Freeu S2","description":"FreeU B4","default":0.95},"debugging_inpaint_preprocessor":{"type":"boolean","title":"Debugging Inpaint Preprocessor","description":"Debug Inpaint Preprocessing","default":false},"inpaint_disable_initial_latent":{"type":"boolean","title":"Inpaint Disable Initial Latent","description":"Disable initial latent in inpaint","default":false},"inpaint_engine":{"type":"string","title":"Inpaint Engine","description":"Inpaint Engine","default":"v1"},"inpaint_strength":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Inpaint Strength","description":"Inpaint Denoising Strength","default":1.0},"inpaint_respective_field":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Inpaint Respective Field","description":"Inpaint Respective Field","default":1.0},"invert_mask_checkbox":{"type":"boolean","title":"Invert Mask Checkbox","description":"Invert Mask","default":false},"inpaint_erode_or_dilate":{"type":"integer","maximum":64.0,"minimum":-64.0,"title":"Inpaint Erode Or Dilate","description":"Mask Erode or Dilate","default":0}},"type":"object","title":"AdvancedParams"},"AllModelNamesResponse":{"properties":{"model_filenames":{"items":{"type":"string"},"type":"array","title":"Model Filenames","description":"All available model filenames"},"lora_filenames":{"items":{"type":"string"},"type":"array","title":"Lora Filenames","description":"All available lora filenames"}},"type":"object","required":["model_filenames","lora_filenames"],"title":"AllModelNamesResponse"},"AsyncJobResponse":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"Job ID"},"job_type":{"allOf":[{"$ref":"#/components/schemas/TaskType"}],"description":"Job type"},"job_stage":{"allOf":[{"$ref":"#/components/schemas/AsyncJobStage"}],"description":"Job running stage"},"job_progress":{"type":"integer","title":"Job Progress","description":"Job running progress, 100 is for finished."},"job_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Status","description":"Job running status in text"},"job_step_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Step Preview","description":"Preview image of generation steps at current time, as base64 image"},"job_result":{"anyOf":[{"items":{"$ref":"#/components/schemas/GeneratedImageResult"},"type":"array"},{"type":"null"}],"title":"Job Result","description":"Job generation result"}},"type":"object","required":["job_id","job_type","job_stage","job_progress"],"title":"AsyncJobResponse"},"AsyncJobStage":{"type":"string","enum":["WAITING","RUNNING","SUCCESS","ERROR"],"title":"AsyncJobStage"},"Body_describe_image_v1_tools_describe_image_post":{"properties":{"image":{"type":"string","format":"binary","title":"Image"}},"type":"object","required":["image"],"title":"Body_describe_image_v1_tools_describe_image_post"},"Body_img_inpaint_or_outpaint_v1_generation_image_inpaint_outpaint_post":{"properties":{"input_image":{"type":"string","format":"binary","title":"Input Image","description":"Init image for inpaint or outpaint"},"input_mask":{"type":"string","format":"binary","title":"Input Mask","description":"Inpaint or outpaint mask"},"inpaint_additional_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inpaint Additional Prompt","description":"Describe what you want to inpaint"},"outpaint_selections":{"items":{"type":"string"},"type":"array","title":"Outpaint Selections","description":"Outpaint expansion selections, literal 'Left', 'Right', 'Top', 'Bottom' seperated by comma","default":[]},"outpaint_distance_left":{"type":"integer","title":"Outpaint Distance Left","description":"Set outpaint left distance, -1 for default","default":0},"outpaint_distance_right":{"type":"integer","title":"Outpaint Distance Right","description":"Set outpaint right distance, -1 for default","default":0},"outpaint_distance_top":{"type":"integer","title":"Outpaint Distance Top","description":"Set outpaint top distance, -1 for default","default":0},"outpaint_distance_bottom":{"type":"integer","title":"Outpaint Distance Bottom","description":"Set outpaint bottom distance, -1 for default","default":0},"prompt":{"type":"string","title":"Prompt","default":""},"negative_prompt":{"type":"string","title":"Negative Prompt","default":""},"style_selections":{"items":{"type":"string"},"type":"array","title":"Style Selections","description":"Fooocus style selections, seperated by comma","default":["Fooocus V2","Fooocus Enhance","Fooocus Sharp"]},"performance_selection":{"allOf":[{"$ref":"#/components/schemas/PerfomanceSelection"}],"description":"Performance Selection, one of 'Speed','Quality','Extreme Speed'","default":"Speed"},"aspect_ratios_selection":{"type":"string","title":"Aspect Ratios Selection","description":"Aspect Ratios Selection, default 1152*896","default":"1152*896"},"image_number":{"type":"integer","maximum":32.0,"minimum":1.0,"title":"Image Number","description":"Image number","default":1},"image_seed":{"type":"integer","title":"Image Seed","description":"Seed to generate image, -1 for random","default":-1},"sharpness":{"type":"number","maximum":30.0,"minimum":0.0,"title":"Sharpness","default":2.0},"guidance_scale":{"type":"number","maximum":30.0,"minimum":1.0,"title":"Guidance Scale","default":4.0},"base_model_name":{"type":"string","title":"Base Model Name","default":"juggernautXL_version6Rundiffusion.safetensors"},"refiner_model_name":{"type":"string","title":"Refiner Model Name","default":"None"},"refiner_switch":{"type":"number","maximum":1.0,"minimum":0.1,"title":"Refiner Switch","description":"Refiner Switch At","default":0.5},"loras":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loras","description":"Lora config in JSON. Format as [{\"model_name\": \"sd_xl_offset_example-lora_1.0.safetensors\", \"weight\": 0.5}]","default":"[{\"model_name\":\"sd_xl_offset_example-lora_1.0.safetensors\",\"weight\":0.1}]"},"advanced_params":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Advanced Params","description":"Advanced parameters in JSON"},"require_base64":{"type":"boolean","title":"Require Base64","description":"Return base64 data of generated image","default":false},"async_process":{"type":"boolean","title":"Async Process","description":"Set to true will run async and return job info for retrieve generataion result later","default":false}},"type":"object","required":["input_image"],"title":"Body_img_inpaint_or_outpaint_v1_generation_image_inpaint_outpaint_post"},"Body_img_prompt_v1_generation_image_prompt_post":{"properties":{"cn_img1":{"type":"string","format":"binary","title":"Cn Img1","description":"Input image for image prompt"},"input_image":{"type":"string","format":"binary","title":"Input Image","description":"Init image for inpaint or outpaint"},"input_mask":{"type":"string","format":"binary","title":"Input Mask","description":"Inpaint or outpaint mask"},"inpaint_additional_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inpaint Additional Prompt","description":"Describe what you want to inpaint"},"outpaint_selections":{"items":{"type":"string"},"type":"array","title":"Outpaint Selections","description":"Outpaint expansion selections, literal 'Left', 'Right', 'Top', 'Bottom' seperated by comma","default":[]},"outpaint_distance_left":{"type":"integer","title":"Outpaint Distance Left","description":"Set outpaint left distance, 0 for default","default":0},"outpaint_distance_right":{"type":"integer","title":"Outpaint Distance Right","description":"Set outpaint right distance, 0 for default","default":0},"outpaint_distance_top":{"type":"integer","title":"Outpaint Distance Top","description":"Set outpaint top distance, 0 for default","default":0},"outpaint_distance_bottom":{"type":"integer","title":"Outpaint Distance Bottom","description":"Set outpaint bottom distance, 0 for default","default":0},"cn_stop1":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Cn Stop1","description":"Stop at for image prompt, None for default value"},"cn_weight1":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Cn Weight1","description":"Weight for image prompt, None for default value"},"cn_type1":{"allOf":[{"$ref":"#/components/schemas/ControlNetType"}],"description":"ControlNet type for image prompt","default":"ImagePrompt"},"cn_img2":{"type":"string","format":"binary","title":"Cn Img2","description":"Input image for image prompt"},"cn_stop2":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Cn Stop2","description":"Stop at for image prompt, None for default value"},"cn_weight2":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Cn Weight2","description":"Weight for image prompt, None for default value"},"cn_type2":{"allOf":[{"$ref":"#/components/schemas/ControlNetType"}],"description":"ControlNet type for image prompt","default":"ImagePrompt"},"cn_img3":{"type":"string","format":"binary","title":"Cn Img3","description":"Input image for image prompt"},"cn_stop3":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Cn Stop3","description":"Stop at for image prompt, None for default value"},"cn_weight3":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Cn Weight3","description":"Weight for image prompt, None for default value"},"cn_type3":{"allOf":[{"$ref":"#/components/schemas/ControlNetType"}],"description":"ControlNet type for image prompt","default":"ImagePrompt"},"cn_img4":{"type":"string","format":"binary","title":"Cn Img4","description":"Input image for image prompt"},"cn_stop4":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Cn Stop4","description":"Stop at for image prompt, None for default value"},"cn_weight4":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Cn Weight4","description":"Weight for image prompt, None for default value"},"cn_type4":{"allOf":[{"$ref":"#/components/schemas/ControlNetType"}],"description":"ControlNet type for image prompt","default":"ImagePrompt"},"prompt":{"type":"string","title":"Prompt","default":""},"negative_prompt":{"type":"string","title":"Negative Prompt","default":""},"style_selections":{"items":{"type":"string"},"type":"array","title":"Style Selections","description":"Fooocus style selections, seperated by comma","default":["Fooocus V2","Fooocus Enhance","Fooocus Sharp"]},"performance_selection":{"allOf":[{"$ref":"#/components/schemas/PerfomanceSelection"}],"default":"Speed"},"aspect_ratios_selection":{"type":"string","title":"Aspect Ratios Selection","default":"1152*896"},"image_number":{"type":"integer","maximum":32.0,"minimum":1.0,"title":"Image Number","description":"Image number","default":1},"image_seed":{"type":"integer","title":"Image Seed","description":"Seed to generate image, -1 for random","default":-1},"sharpness":{"type":"number","maximum":30.0,"minimum":0.0,"title":"Sharpness","default":2.0},"guidance_scale":{"type":"number","maximum":30.0,"minimum":1.0,"title":"Guidance Scale","default":4.0},"base_model_name":{"type":"string","title":"Base Model Name","default":"juggernautXL_version6Rundiffusion.safetensors"},"refiner_model_name":{"type":"string","title":"Refiner Model Name","default":"None"},"refiner_switch":{"type":"number","maximum":1.0,"minimum":0.1,"title":"Refiner Switch","description":"Refiner Switch At","default":0.5},"loras":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loras","description":"Lora config in JSON. Format as [{\"model_name\": \"sd_xl_offset_example-lora_1.0.safetensors\", \"weight\": 0.5}]","default":"[{\"model_name\":\"sd_xl_offset_example-lora_1.0.safetensors\",\"weight\":0.1}]"},"advanced_params":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Advanced Params","description":"Advanced parameters in JSON"},"require_base64":{"type":"boolean","title":"Require Base64","description":"Return base64 data of generated image","default":false},"async_process":{"type":"boolean","title":"Async Process","description":"Set to true will run async and return job info for retrieve generataion result later","default":false}},"type":"object","title":"Body_img_prompt_v1_generation_image_prompt_post"},"Body_img_upscale_or_vary_v1_generation_image_upscale_vary_post":{"properties":{"input_image":{"type":"string","format":"binary","title":"Input Image","description":"Init image for upsacale or outpaint"},"uov_method":{"$ref":"#/components/schemas/UpscaleOrVaryMethod"},"upscale_value":{"anyOf":[{"type":"number","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Upscale Value","description":"Upscale custom value, None for default value"},"prompt":{"type":"string","title":"Prompt","default":""},"negative_prompt":{"type":"string","title":"Negative Prompt","default":""},"style_selections":{"items":{"type":"string"},"type":"array","title":"Style Selections","description":"Fooocus style selections, seperated by comma","default":["Fooocus V2","Fooocus Enhance","Fooocus Sharp"]},"performance_selection":{"allOf":[{"$ref":"#/components/schemas/PerfomanceSelection"}],"description":"Performance Selection, one of 'Speed','Quality','Extreme Speed'","default":"Speed"},"aspect_ratios_selection":{"type":"string","title":"Aspect Ratios Selection","description":"Aspect Ratios Selection, default 1152*896","default":"1152*896"},"image_number":{"type":"integer","maximum":32.0,"minimum":1.0,"title":"Image Number","description":"Image number","default":1},"image_seed":{"type":"integer","title":"Image Seed","description":"Seed to generate image, -1 for random","default":-1},"sharpness":{"type":"number","maximum":30.0,"minimum":0.0,"title":"Sharpness","default":2.0},"guidance_scale":{"type":"number","maximum":30.0,"minimum":1.0,"title":"Guidance Scale","default":4.0},"base_model_name":{"type":"string","title":"Base Model Name","description":"checkpoint file name","default":"juggernautXL_version6Rundiffusion.safetensors"},"refiner_model_name":{"type":"string","title":"Refiner Model Name","description":"refiner file name","default":"None"},"refiner_switch":{"type":"number","maximum":1.0,"minimum":0.1,"title":"Refiner Switch","description":"Refiner Switch At","default":0.5},"loras":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Loras","description":"Lora config in JSON. Format as [{\"model_name\": \"sd_xl_offset_example-lora_1.0.safetensors\", \"weight\": 0.5}]","default":"[{\"model_name\":\"sd_xl_offset_example-lora_1.0.safetensors\",\"weight\":0.1}]"},"advanced_params":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Advanced Params","description":"Advanced parameters in JSON"},"require_base64":{"type":"boolean","title":"Require Base64","description":"Return base64 data of generated image","default":false},"async_process":{"type":"boolean","title":"Async Process","description":"Set to true will run async and return job info for retrieve generataion result later","default":false}},"type":"object","required":["input_image","uov_method"],"title":"Body_img_upscale_or_vary_v1_generation_image_upscale_vary_post"},"ControlNetType":{"type":"string","enum":["ImagePrompt","FaceSwap","PyraCanny","CPDS"],"title":"ControlNetType"},"DescribeImageResponse":{"properties":{"describe":{"type":"string","title":"Describe"}},"type":"object","required":["describe"],"title":"DescribeImageResponse"},"DescribeImageType":{"type":"string","enum":["Photo","Anime"],"title":"DescribeImageType"},"GeneratedImageResult":{"properties":{"base64":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base64","description":"Image encoded in base64, or null if finishReasen is not 'SUCCESS', only return when request require base64"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Image file static serve url, or null if finishReasen is not 'SUCCESS'"},"seed":{"type":"string","title":"Seed","description":"The seed associated with this image"},"finish_reason":{"$ref":"#/components/schemas/GenerationFinishReason"}},"type":"object","required":["base64","url","seed","finish_reason"],"title":"GeneratedImageResult"},"GenerationFinishReason":{"type":"string","enum":["SUCCESS","QUEUE_IS_FULL","USER_CANCEL","ERROR"],"title":"GenerationFinishReason"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImagePrompt":{"properties":{"cn_img":{"anyOf":[{"type":"string","format":"binary"},{"type":"null"}],"title":"Cn Img"},"cn_stop":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Cn Stop"},"cn_weight":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Cn Weight","description":"None for default value"},"cn_type":{"allOf":[{"$ref":"#/components/schemas/ControlNetType"}],"default":"ImagePrompt"}},"type":"object","title":"ImagePrompt"},"ImagePromptJson":{"properties":{"cn_img":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cn Img","description":"Input image for image prompt as base64"},"cn_stop":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Cn Stop","description":"Stop at for image prompt, 0 for default value","default":0},"cn_weight":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Cn Weight","description":"Weight for image prompt, 0 for default value","default":0},"cn_type":{"allOf":[{"$ref":"#/components/schemas/ControlNetType"}],"description":"ControlNet type for image prompt","default":"ImagePrompt"}},"type":"object","title":"ImagePromptJson"},"ImgInpaintOrOutpaintRequestJson":{"properties":{"prompt":{"type":"string","title":"Prompt","default":""},"negative_prompt":{"type":"string","title":"Negative Prompt","default":""},"style_selections":{"items":{"type":"string"},"type":"array","title":"Style Selections","default":["Fooocus V2","Fooocus Enhance","Fooocus Sharp"]},"performance_selection":{"allOf":[{"$ref":"#/components/schemas/PerfomanceSelection"}],"default":"Speed"},"aspect_ratios_selection":{"type":"string","title":"Aspect Ratios Selection","default":"1152*896"},"image_number":{"type":"integer","maximum":32.0,"minimum":1.0,"title":"Image Number","description":"Image number","default":1},"image_seed":{"type":"integer","title":"Image Seed","description":"Seed to generate image, -1 for random","default":-1},"sharpness":{"type":"number","maximum":30.0,"minimum":0.0,"title":"Sharpness","default":2.0},"guidance_scale":{"type":"number","maximum":30.0,"minimum":1.0,"title":"Guidance Scale","default":4.0},"base_model_name":{"type":"string","title":"Base Model Name","default":"juggernautXL_version6Rundiffusion.safetensors"},"refiner_model_name":{"type":"string","title":"Refiner Model Name","default":"None"},"refiner_switch":{"type":"number","maximum":1.0,"minimum":0.1,"title":"Refiner Switch","description":"Refiner Switch At","default":0.5},"loras":{"items":{"$ref":"#/components/schemas/Lora"},"type":"array","title":"Loras","default":[{"model_name":"sd_xl_offset_example-lora_1.0.safetensors","weight":0.1}]},"advanced_params":{"anyOf":[{"$ref":"#/components/schemas/AdvancedParams"},{"type":"null"}],"default":{"adaptive_cfg":7.0,"adm_scaler_end":0.3,"adm_scaler_negative":0.8,"adm_scaler_positive":1.5,"canny_high_threshold":128,"canny_low_threshold":64,"controlnet_softness":0.25,"debugging_cn_preprocessor":false,"debugging_inpaint_preprocessor":false,"disable_preview":false,"freeu_b1":1.01,"freeu_b2":1.02,"freeu_enabled":false,"freeu_s1":0.99,"freeu_s2":0.95,"inpaint_disable_initial_latent":false,"inpaint_engine":"v1","inpaint_erode_or_dilate":0,"inpaint_respective_field":1.0,"inpaint_strength":1.0,"invert_mask_checkbox":false,"mixing_image_prompt_and_inpaint":false,"mixing_image_prompt_and_vary_upscale":false,"overwrite_height":-1,"overwrite_step":-1,"overwrite_switch":-1,"overwrite_upscale_strength":-1.0,"overwrite_vary_strength":-1.0,"overwrite_width":-1,"refiner_swap_method":"joint","sampler_name":"dpmpp_2m_sde_gpu","scheduler_name":"karras","skipping_cn_preprocessor":false}},"require_base64":{"type":"boolean","title":"Require Base64","description":"Return base64 data of generated image","default":false},"async_process":{"type":"boolean","title":"Async Process","description":"Set to true will run async and return job info for retrieve generataion result later","default":false},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Optional URL for a webhook callback. If provided, the system will send a POST request to this URL upon task completion or failure. This allows for asynchronous notification of task status.","default":""},"input_image":{"type":"string","title":"Input Image","description":"Init image for inpaint or outpaint as base64"},"input_mask":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Mask","description":"Inpaint or outpaint mask as base64","default":""},"inpaint_additional_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inpaint Additional Prompt","description":"Describe what you want to inpaint","default":""},"outpaint_selections":{"items":{"$ref":"#/components/schemas/OutpaintExpansion"},"type":"array","title":"Outpaint Selections","default":[]},"outpaint_distance_left":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Outpaint Distance Left","description":"Set outpaint left distance","default":-1},"outpaint_distance_right":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Outpaint Distance Right","description":"Set outpaint right distance","default":-1},"outpaint_distance_top":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Outpaint Distance Top","description":"Set outpaint top distance","default":-1},"outpaint_distance_bottom":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Outpaint Distance Bottom","description":"Set outpaint bottom distance","default":-1},"image_prompts":{"items":{"anyOf":[{"$ref":"#/components/schemas/ImagePromptJson"},{"$ref":"#/components/schemas/ImagePrompt"}]},"type":"array","title":"Image Prompts","default":[]}},"type":"object","required":["input_image"],"title":"ImgInpaintOrOutpaintRequestJson"},"ImgPromptRequestJson":{"properties":{"prompt":{"type":"string","title":"Prompt","default":""},"negative_prompt":{"type":"string","title":"Negative Prompt","default":""},"style_selections":{"items":{"type":"string"},"type":"array","title":"Style Selections","default":["Fooocus V2","Fooocus Enhance","Fooocus Sharp"]},"performance_selection":{"allOf":[{"$ref":"#/components/schemas/PerfomanceSelection"}],"default":"Speed"},"aspect_ratios_selection":{"type":"string","title":"Aspect Ratios Selection","default":"1152*896"},"image_number":{"type":"integer","maximum":32.0,"minimum":1.0,"title":"Image Number","description":"Image number","default":1},"image_seed":{"type":"integer","title":"Image Seed","description":"Seed to generate image, -1 for random","default":-1},"sharpness":{"type":"number","maximum":30.0,"minimum":0.0,"title":"Sharpness","default":2.0},"guidance_scale":{"type":"number","maximum":30.0,"minimum":1.0,"title":"Guidance Scale","default":4.0},"base_model_name":{"type":"string","title":"Base Model Name","default":"juggernautXL_version6Rundiffusion.safetensors"},"refiner_model_name":{"type":"string","title":"Refiner Model Name","default":"None"},"refiner_switch":{"type":"number","maximum":1.0,"minimum":0.1,"title":"Refiner Switch","description":"Refiner Switch At","default":0.5},"loras":{"items":{"$ref":"#/components/schemas/Lora"},"type":"array","title":"Loras","default":[{"model_name":"sd_xl_offset_example-lora_1.0.safetensors","weight":0.1}]},"advanced_params":{"anyOf":[{"$ref":"#/components/schemas/AdvancedParams"},{"type":"null"}],"default":{"adaptive_cfg":7.0,"adm_scaler_end":0.3,"adm_scaler_negative":0.8,"adm_scaler_positive":1.5,"canny_high_threshold":128,"canny_low_threshold":64,"controlnet_softness":0.25,"debugging_cn_preprocessor":false,"debugging_inpaint_preprocessor":false,"disable_preview":false,"freeu_b1":1.01,"freeu_b2":1.02,"freeu_enabled":false,"freeu_s1":0.99,"freeu_s2":0.95,"inpaint_disable_initial_latent":false,"inpaint_engine":"v1","inpaint_erode_or_dilate":0,"inpaint_respective_field":1.0,"inpaint_strength":1.0,"invert_mask_checkbox":false,"mixing_image_prompt_and_inpaint":false,"mixing_image_prompt_and_vary_upscale":false,"overwrite_height":-1,"overwrite_step":-1,"overwrite_switch":-1,"overwrite_upscale_strength":-1.0,"overwrite_vary_strength":-1.0,"overwrite_width":-1,"refiner_swap_method":"joint","sampler_name":"dpmpp_2m_sde_gpu","scheduler_name":"karras","skipping_cn_preprocessor":false}},"require_base64":{"type":"boolean","title":"Require Base64","description":"Return base64 data of generated image","default":false},"async_process":{"type":"boolean","title":"Async Process","description":"Set to true will run async and return job info for retrieve generataion result later","default":false},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Optional URL for a webhook callback. If provided, the system will send a POST request to this URL upon task completion or failure. This allows for asynchronous notification of task status.","default":""},"input_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Image","description":"Init image for inpaint or outpaint as base64"},"input_mask":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Mask","description":"Inpaint or outpaint mask as base64","default":""},"inpaint_additional_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inpaint Additional Prompt","description":"Describe what you want to inpaint","default":""},"outpaint_selections":{"items":{"$ref":"#/components/schemas/OutpaintExpansion"},"type":"array","title":"Outpaint Selections","default":[]},"outpaint_distance_left":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Outpaint Distance Left","description":"Set outpaint left distance","default":-1},"outpaint_distance_right":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Outpaint Distance Right","description":"Set outpaint right distance","default":-1},"outpaint_distance_top":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Outpaint Distance Top","description":"Set outpaint top distance","default":-1},"outpaint_distance_bottom":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Outpaint Distance Bottom","description":"Set outpaint bottom distance","default":-1},"image_prompts":{"items":{"anyOf":[{"$ref":"#/components/schemas/ImagePromptJson"},{"$ref":"#/components/schemas/ImagePrompt"}]},"type":"array","title":"Image Prompts"}},"type":"object","required":["image_prompts"],"title":"ImgPromptRequestJson"},"ImgUpscaleOrVaryRequestJson":{"properties":{"prompt":{"type":"string","title":"Prompt","default":""},"negative_prompt":{"type":"string","title":"Negative Prompt","default":""},"style_selections":{"items":{"type":"string"},"type":"array","title":"Style Selections","default":["Fooocus V2","Fooocus Enhance","Fooocus Sharp"]},"performance_selection":{"allOf":[{"$ref":"#/components/schemas/PerfomanceSelection"}],"default":"Speed"},"aspect_ratios_selection":{"type":"string","title":"Aspect Ratios Selection","default":"1152*896"},"image_number":{"type":"integer","maximum":32.0,"minimum":1.0,"title":"Image Number","description":"Image number","default":1},"image_seed":{"type":"integer","title":"Image Seed","description":"Seed to generate image, -1 for random","default":-1},"sharpness":{"type":"number","maximum":30.0,"minimum":0.0,"title":"Sharpness","default":2.0},"guidance_scale":{"type":"number","maximum":30.0,"minimum":1.0,"title":"Guidance Scale","default":4.0},"base_model_name":{"type":"string","title":"Base Model Name","default":"juggernautXL_version6Rundiffusion.safetensors"},"refiner_model_name":{"type":"string","title":"Refiner Model Name","default":"None"},"refiner_switch":{"type":"number","maximum":1.0,"minimum":0.1,"title":"Refiner Switch","description":"Refiner Switch At","default":0.5},"loras":{"items":{"$ref":"#/components/schemas/Lora"},"type":"array","title":"Loras","default":[{"model_name":"sd_xl_offset_example-lora_1.0.safetensors","weight":0.1}]},"advanced_params":{"anyOf":[{"$ref":"#/components/schemas/AdvancedParams"},{"type":"null"}],"default":{"adaptive_cfg":7.0,"adm_scaler_end":0.3,"adm_scaler_negative":0.8,"adm_scaler_positive":1.5,"canny_high_threshold":128,"canny_low_threshold":64,"controlnet_softness":0.25,"debugging_cn_preprocessor":false,"debugging_inpaint_preprocessor":false,"disable_preview":false,"freeu_b1":1.01,"freeu_b2":1.02,"freeu_enabled":false,"freeu_s1":0.99,"freeu_s2":0.95,"inpaint_disable_initial_latent":false,"inpaint_engine":"v1","inpaint_erode_or_dilate":0,"inpaint_respective_field":1.0,"inpaint_strength":1.0,"invert_mask_checkbox":false,"mixing_image_prompt_and_inpaint":false,"mixing_image_prompt_and_vary_upscale":false,"overwrite_height":-1,"overwrite_step":-1,"overwrite_switch":-1,"overwrite_upscale_strength":-1.0,"overwrite_vary_strength":-1.0,"overwrite_width":-1,"refiner_swap_method":"joint","sampler_name":"dpmpp_2m_sde_gpu","scheduler_name":"karras","skipping_cn_preprocessor":false}},"require_base64":{"type":"boolean","title":"Require Base64","description":"Return base64 data of generated image","default":false},"async_process":{"type":"boolean","title":"Async Process","description":"Set to true will run async and return job info for retrieve generataion result later","default":false},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Optional URL for a webhook callback. If provided, the system will send a POST request to this URL upon task completion or failure. This allows for asynchronous notification of task status.","default":""},"uov_method":{"allOf":[{"$ref":"#/components/schemas/UpscaleOrVaryMethod"}],"default":"Upscale (2x)"},"upscale_value":{"anyOf":[{"type":"number","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Upscale Value","description":"Upscale custom value, 1.0 for default value","default":1.0},"input_image":{"type":"string","title":"Input Image","description":"Init image for upsacale or outpaint as base64"},"image_prompts":{"items":{"anyOf":[{"$ref":"#/components/schemas/ImagePromptJson"},{"$ref":"#/components/schemas/ImagePrompt"}]},"type":"array","title":"Image Prompts","default":[]}},"type":"object","required":["input_image"],"title":"ImgUpscaleOrVaryRequestJson"},"JobHistoryInfo":{"properties":{"job_id":{"type":"string","title":"Job Id"},"is_finished":{"type":"boolean","title":"Is Finished","default":false}},"type":"object","required":["job_id"],"title":"JobHistoryInfo"},"JobHistoryResponse":{"properties":{"queue":{"items":{"$ref":"#/components/schemas/JobHistoryInfo"},"type":"array","title":"Queue","default":[]},"history":{"items":{"$ref":"#/components/schemas/JobHistoryInfo"},"type":"array","title":"History","default":[]}},"type":"object","title":"JobHistoryResponse"},"JobQueueInfo":{"properties":{"running_size":{"type":"integer","title":"Running Size","description":"The current running and waiting job count"},"finished_size":{"type":"integer","title":"Finished Size","description":"Finished job cound (after auto clean)"},"last_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Job Id","description":"Last submit generation job id"}},"type":"object","required":["running_size","finished_size","last_job_id"],"title":"JobQueueInfo"},"Lora":{"properties":{"model_name":{"type":"string","title":"Model Name"},"weight":{"type":"number","maximum":2.0,"minimum":-2.0,"title":"Weight","default":0.5}},"type":"object","required":["model_name"],"title":"Lora"},"OutpaintExpansion":{"type":"string","enum":["Left","Right","Top","Bottom"],"title":"OutpaintExpansion"},"PerfomanceSelection":{"type":"string","enum":["Speed","Quality","Extreme Speed"],"title":"PerfomanceSelection"},"StopResponse":{"properties":{"msg":{"type":"string","title":"Msg"}},"type":"object","required":["msg"],"title":"StopResponse"},"TaskType":{"type":"string","enum":["Text to Image","Image Upscale or Variation","Image Inpaint or Outpaint","Image Prompt","Not Found"],"title":"TaskType"},"Text2ImgRequest":{"properties":{"prompt":{"type":"string","title":"Prompt","default":""},"negative_prompt":{"type":"string","title":"Negative Prompt","default":""},"style_selections":{"items":{"type":"string"},"type":"array","title":"Style Selections","default":["Fooocus V2","Fooocus Enhance","Fooocus Sharp"]},"performance_selection":{"allOf":[{"$ref":"#/components/schemas/PerfomanceSelection"}],"default":"Speed"},"aspect_ratios_selection":{"type":"string","title":"Aspect Ratios Selection","default":"1152*896"},"image_number":{"type":"integer","maximum":32.0,"minimum":1.0,"title":"Image Number","description":"Image number","default":1},"image_seed":{"type":"integer","title":"Image Seed","description":"Seed to generate image, -1 for random","default":-1},"sharpness":{"type":"number","maximum":30.0,"minimum":0.0,"title":"Sharpness","default":2.0},"guidance_scale":{"type":"number","maximum":30.0,"minimum":1.0,"title":"Guidance Scale","default":4.0},"base_model_name":{"type":"string","title":"Base Model Name","default":"juggernautXL_version6Rundiffusion.safetensors"},"refiner_model_name":{"type":"string","title":"Refiner Model Name","default":"None"},"refiner_switch":{"type":"number","maximum":1.0,"minimum":0.1,"title":"Refiner Switch","description":"Refiner Switch At","default":0.5},"loras":{"items":{"$ref":"#/components/schemas/Lora"},"type":"array","title":"Loras","default":[{"model_name":"sd_xl_offset_example-lora_1.0.safetensors","weight":0.1}]},"advanced_params":{"anyOf":[{"$ref":"#/components/schemas/AdvancedParams"},{"type":"null"}],"default":{"adaptive_cfg":7.0,"adm_scaler_end":0.3,"adm_scaler_negative":0.8,"adm_scaler_positive":1.5,"canny_high_threshold":128,"canny_low_threshold":64,"controlnet_softness":0.25,"debugging_cn_preprocessor":false,"debugging_inpaint_preprocessor":false,"disable_preview":false,"freeu_b1":1.01,"freeu_b2":1.02,"freeu_enabled":false,"freeu_s1":0.99,"freeu_s2":0.95,"inpaint_disable_initial_latent":false,"inpaint_engine":"v1","inpaint_erode_or_dilate":0,"inpaint_respective_field":1.0,"inpaint_strength":1.0,"invert_mask_checkbox":false,"mixing_image_prompt_and_inpaint":false,"mixing_image_prompt_and_vary_upscale":false,"overwrite_height":-1,"overwrite_step":-1,"overwrite_switch":-1,"overwrite_upscale_strength":-1.0,"overwrite_vary_strength":-1.0,"overwrite_width":-1,"refiner_swap_method":"joint","sampler_name":"dpmpp_2m_sde_gpu","scheduler_name":"karras","skipping_cn_preprocessor":false}},"require_base64":{"type":"boolean","title":"Require Base64","description":"Return base64 data of generated image","default":false},"async_process":{"type":"boolean","title":"Async Process","description":"Set to true will run async and return job info for retrieve generataion result later","default":false},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Optional URL for a webhook callback. If provided, the system will send a POST request to this URL upon task completion or failure. This allows for asynchronous notification of task status.","default":""}},"type":"object","title":"Text2ImgRequest"},"Text2ImgRequestWithPrompt":{"properties":{"prompt":{"type":"string","title":"Prompt","default":""},"negative_prompt":{"type":"string","title":"Negative Prompt","default":""},"style_selections":{"items":{"type":"string"},"type":"array","title":"Style Selections","default":["Fooocus V2","Fooocus Enhance","Fooocus Sharp"]},"performance_selection":{"allOf":[{"$ref":"#/components/schemas/PerfomanceSelection"}],"default":"Speed"},"aspect_ratios_selection":{"type":"string","title":"Aspect Ratios Selection","default":"1152*896"},"image_number":{"type":"integer","maximum":32.0,"minimum":1.0,"title":"Image Number","description":"Image number","default":1},"image_seed":{"type":"integer","title":"Image Seed","description":"Seed to generate image, -1 for random","default":-1},"sharpness":{"type":"number","maximum":30.0,"minimum":0.0,"title":"Sharpness","default":2.0},"guidance_scale":{"type":"number","maximum":30.0,"minimum":1.0,"title":"Guidance Scale","default":4.0},"base_model_name":{"type":"string","title":"Base Model Name","default":"juggernautXL_version6Rundiffusion.safetensors"},"refiner_model_name":{"type":"string","title":"Refiner Model Name","default":"None"},"refiner_switch":{"type":"number","maximum":1.0,"minimum":0.1,"title":"Refiner Switch","description":"Refiner Switch At","default":0.5},"loras":{"items":{"$ref":"#/components/schemas/Lora"},"type":"array","title":"Loras","default":[{"model_name":"sd_xl_offset_example-lora_1.0.safetensors","weight":0.1}]},"advanced_params":{"anyOf":[{"$ref":"#/components/schemas/AdvancedParams"},{"type":"null"}],"default":{"adaptive_cfg":7.0,"adm_scaler_end":0.3,"adm_scaler_negative":0.8,"adm_scaler_positive":1.5,"canny_high_threshold":128,"canny_low_threshold":64,"controlnet_softness":0.25,"debugging_cn_preprocessor":false,"debugging_inpaint_preprocessor":false,"disable_preview":false,"freeu_b1":1.01,"freeu_b2":1.02,"freeu_enabled":false,"freeu_s1":0.99,"freeu_s2":0.95,"inpaint_disable_initial_latent":false,"inpaint_engine":"v1","inpaint_erode_or_dilate":0,"inpaint_respective_field":1.0,"inpaint_strength":1.0,"invert_mask_checkbox":false,"mixing_image_prompt_and_inpaint":false,"mixing_image_prompt_and_vary_upscale":false,"overwrite_height":-1,"overwrite_step":-1,"overwrite_switch":-1,"overwrite_upscale_strength":-1.0,"overwrite_vary_strength":-1.0,"overwrite_width":-1,"refiner_swap_method":"joint","sampler_name":"dpmpp_2m_sde_gpu","scheduler_name":"karras","skipping_cn_preprocessor":false}},"require_base64":{"type":"boolean","title":"Require Base64","description":"Return base64 data of generated image","default":false},"async_process":{"type":"boolean","title":"Async Process","description":"Set to true will run async and return job info for retrieve generataion result later","default":false},"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"Optional URL for a webhook callback. If provided, the system will send a POST request to this URL upon task completion or failure. This allows for asynchronous notification of task status.","default":""},"image_prompts":{"items":{"$ref":"#/components/schemas/ImagePromptJson"},"type":"array","title":"Image Prompts","default":[]}},"type":"object","title":"Text2ImgRequestWithPrompt"},"UpscaleOrVaryMethod":{"type":"string","enum":["Vary (Subtle)","Vary (Strong)","Upscale (1.5x)","Upscale (2x)","Upscale (Fast 2x)","Upscale (Custom)"],"title":"UpscaleOrVaryMethod"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}} \ No newline at end of file +{ + "openapi": "3.1.0", + "info": { + "title": "FastAPI", + "version": "0.1.0" + }, + "paths": { + "/": { + "get": { + "tags": [ + "Query" + ], + "summary": "Home", + "description": "Home page", + "operationId": "home__get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/ping": { + "get": { + "tags": [ + "Query" + ], + "summary": "Ping", + "description": "Returns a simple 'pong'", + "operationId": "ping_ping_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/v1/generation/query-job": { + "get": { + "tags": [ + "Query" + ], + "summary": "Query Job", + "description": "Query async generation job", + "operationId": "query_job_v1_generation_query_job_get", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "job_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Job Id" + } + }, + { + "name": "require_step_preview", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false, + "title": "Require Step Preview" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AsyncJobResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v1/generation/job-queue": { + "get": { + "tags": [ + "Query" + ], + "summary": "Job Queue", + "description": "Query job queue info", + "operationId": "job_queue_v1_generation_job_queue_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JobQueueInfo" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/v1/generation/job-history": { + "get": { + "tags": [ + "Query" + ], + "summary": "Get History", + "description": "Query historical job data", + "operationId": "get_history_v1_generation_job_history_get", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "job_id", + "in": "query", + "required": false, + "schema": { + "type": "string", + "title": "Job Id" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0, + "title": "Page" + } + }, + { + "name": "page_size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 20, + "title": "Page Size" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/JobHistoryResponse" + }, + { + "type": "object" + } + ], + "title": "Response Get History V1 Generation Job History Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v1/engines/all-models": { + "get": { + "tags": [ + "Query" + ], + "summary": "All Models", + "description": "Get all filenames of base model and lora", + "operationId": "all_models_v1_engines_all_models_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AllModelNamesResponse" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/v1/engines/styles": { + "get": { + "tags": [ + "Query" + ], + "summary": "All Styles", + "description": "Get all legal Fooocus styles", + "operationId": "all_styles_v1_engines_styles_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Response All Styles V1 Engines Styles Get" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/v1/generation/text-to-image": { + "post": { + "tags": [ + "GenerateV1" + ], + "summary": "Text2Img Generation", + "description": "Text to Image Generation\n\n A text to image generation endpoint\n Arguments:\n req {Text2ImgRequest} -- Text to image generation request\n accept {str} -- Accept header\n accept_query {str} -- Parameter to override 'Accept' header, 'image/png' for output bytes\n returns:\n Response -- img_generate_responses", + "operationId": "text2img_generation_v1_generation_text_to_image_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "accept", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Parameter to override 'Accept' header, 'image/png' for output bytes", + "title": "Accept" + }, + "description": "Parameter to override 'Accept' header, 'image/png' for output bytes" + }, + { + "name": "accept", + "in": "header", + "required": false, + "schema": { + "type": "string", + "title": "Accept" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommonRequest" + } + } + } + }, + "responses": { + "200": { + "description": "PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeneratedImageResult" + } + }, + { + "$ref": "#/components/schemas/AsyncJobResponse" + } + ], + "title": "Response Text2Img Generation V1 Generation Text To Image Post" + }, + "example": [ + { + "base64": "...very long string...", + "seed": "1050625087", + "finish_reason": "SUCCESS" + } + ] + }, + "application/json async": { + "example": { + "job_id": 1, + "job_type": "Text to Image" + } + }, + "image/png": { + "example": "PNG bytes, what did you expect?" + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v1/generation/image-upscale-vary": { + "post": { + "tags": [ + "GenerateV1" + ], + "summary": "Img Upscale Or Vary", + "description": "Image upscale or vary\n\n Image upscale or vary\n Arguments:\n input_image {UploadFile} -- Input image file\n req {ImgUpscaleOrVaryRequest} -- Request body\n accept {str} -- Accept header\n accept_query {str} -- Parameter to override 'Accept' header, 'image/png' for output bytes\n Returns:\n Response -- img_generate_responses", + "operationId": "img_upscale_or_vary_v1_generation_image_upscale_vary_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "accept", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Parameter to override 'Accept' header, 'image/png' for output bytes", + "title": "Accept" + }, + "description": "Parameter to override 'Accept' header, 'image/png' for output bytes" + }, + { + "name": "accept", + "in": "header", + "required": false, + "schema": { + "type": "string", + "title": "Accept" + } + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_img_upscale_or_vary_v1_generation_image_upscale_vary_post" + } + } + } + }, + "responses": { + "200": { + "description": "PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeneratedImageResult" + } + }, + { + "$ref": "#/components/schemas/AsyncJobResponse" + } + ], + "title": "Response Img Upscale Or Vary V1 Generation Image Upscale Vary Post" + }, + "example": [ + { + "base64": "...very long string...", + "seed": "1050625087", + "finish_reason": "SUCCESS" + } + ] + }, + "application/json async": { + "example": { + "job_id": 1, + "job_type": "Text to Image" + } + }, + "image/png": { + "example": "PNG bytes, what did you expect?" + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v1/generation/image-inpaint-outpaint": { + "post": { + "tags": [ + "GenerateV1" + ], + "summary": "Img Inpaint Or Outpaint", + "description": "Inpaint or outpaint\n\n Inpaint or outpaint\n Arguments:\n input_image {UploadFile} -- Input image file\n req {ImgInpaintOrOutpaintRequest} -- Request body\n accept {str} -- Accept header\n accept_query {str} -- Parameter to override 'Accept' header, 'image/png' for output bytes", + "operationId": "img_inpaint_or_outpaint_v1_generation_image_inpaint_outpaint_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "accept", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Parameter to override 'Accept' header, 'image/png' for output bytes", + "title": "Accept" + }, + "description": "Parameter to override 'Accept' header, 'image/png' for output bytes" + }, + { + "name": "accept", + "in": "header", + "required": false, + "schema": { + "type": "string", + "title": "Accept" + } + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_img_inpaint_or_outpaint_v1_generation_image_inpaint_outpaint_post" + } + } + } + }, + "responses": { + "200": { + "description": "PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeneratedImageResult" + } + }, + { + "$ref": "#/components/schemas/AsyncJobResponse" + } + ], + "title": "Response Img Inpaint Or Outpaint V1 Generation Image Inpaint Outpaint Post" + }, + "example": [ + { + "base64": "...very long string...", + "seed": "1050625087", + "finish_reason": "SUCCESS" + } + ] + }, + "application/json async": { + "example": { + "job_id": 1, + "job_type": "Text to Image" + } + }, + "image/png": { + "example": "PNG bytes, what did you expect?" + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v1/generation/image-prompt": { + "post": { + "tags": [ + "GenerateV1" + ], + "summary": "Img Prompt", + "description": "Image Prompt\n\n Image Prompt\n A prompt-based image generation.\n Arguments:\n cn_img1 {UploadFile} -- Input image file\n req {ImgPromptRequest} -- Request body\n accept {str} -- Accept header\n accept_query {str} -- Parameter to override 'Accept' header, 'image/png' for output bytes\n Returns:\n Response -- img_generate_responses", + "operationId": "img_prompt_v1_generation_image_prompt_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "accept", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Parameter to override 'Accept' header, 'image/png' for output bytes", + "title": "Accept" + }, + "description": "Parameter to override 'Accept' header, 'image/png' for output bytes" + }, + { + "name": "accept", + "in": "header", + "required": false, + "schema": { + "type": "string", + "title": "Accept" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Body_img_prompt_v1_generation_image_prompt_post" + } + ], + "title": "Body" + } + } + } + }, + "responses": { + "200": { + "description": "PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeneratedImageResult" + } + }, + { + "$ref": "#/components/schemas/AsyncJobResponse" + } + ], + "title": "Response Img Prompt V1 Generation Image Prompt Post" + }, + "example": [ + { + "base64": "...very long string...", + "seed": "1050625087", + "finish_reason": "SUCCESS" + } + ] + }, + "application/json async": { + "example": { + "job_id": 1, + "job_type": "Text to Image" + } + }, + "image/png": { + "example": "PNG bytes, what did you expect?" + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v1/tools/describe-image": { + "post": { + "tags": [ + "GenerateV1" + ], + "summary": "Describe Image", + "description": "Describe image\n\n Describe image, Get tags from an image\n Arguments:\n image {UploadFile} -- Image to get tags\n image_type {DescribeImageType} -- Image type, 'Photo' or 'Anime'\n Returns:\n DescribeImageResponse -- Describe image response, a string", + "operationId": "describe_image_v1_tools_describe_image_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "image_type", + "in": "query", + "required": false, + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/DescribeImageType" + } + ], + "description": "Image type, 'Photo' or 'Anime'", + "default": "Photo", + "title": "Image Type" + }, + "description": "Image type, 'Photo' or 'Anime'" + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_describe_image_v1_tools_describe_image_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DescribeImageResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v1/generation/stop": { + "post": { + "tags": [ + "Default" + ], + "summary": "Stop", + "description": "Job stopping", + "operationId": "stop_v1_generation_stop_post", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StopResponse" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/v2/generation/text-to-image-with-ip": { + "post": { + "tags": [ + "GenerateV2" + ], + "summary": "Text To Img With Ip", + "description": "Text to image with prompt\n\n Text to image with prompt\n Arguments:\n req {Text2ImgRequestWithPrompt} -- Text to image generation request\n accept {str} -- Accept header\n accept_query {str} -- Parameter to override 'Accept' header, 'image/png' for output bytes\n Returns:\n Response -- img_generate_responses", + "operationId": "text_to_img_with_ip_v2_generation_text_to_image_with_ip_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "accept", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Parameter to override 'Accept' header, 'image/png' for output bytes", + "title": "Accept" + }, + "description": "Parameter to override 'Accept' header, 'image/png' for output bytes" + }, + { + "name": "accept", + "in": "header", + "required": false, + "schema": { + "type": "string", + "title": "Accept" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Text2ImgRequestWithPrompt" + } + } + } + }, + "responses": { + "200": { + "description": "PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeneratedImageResult" + } + }, + { + "$ref": "#/components/schemas/AsyncJobResponse" + } + ], + "title": "Response Text To Img With Ip V2 Generation Text To Image With Ip Post" + }, + "example": [ + { + "base64": "...very long string...", + "seed": "1050625087", + "finish_reason": "SUCCESS" + } + ] + }, + "application/json async": { + "example": { + "job_id": 1, + "job_type": "Text to Image" + } + }, + "image/png": { + "example": "PNG bytes, what did you expect?" + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v2/generation/image-upscale-vary": { + "post": { + "tags": [ + "GenerateV2" + ], + "summary": "Img Upscale Or Vary", + "description": "Image upscale or vary\n\n Image upscale or vary\n Arguments:\n req {ImgUpscaleOrVaryRequestJson} -- Image upscale or vary request\n accept {str} -- Accept header\n accept_query {str} -- Parameter to override 'Accept' header, 'image/png' for output bytes\n Returns:\n Response -- img_generate_responses", + "operationId": "img_upscale_or_vary_v2_generation_image_upscale_vary_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "accept", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Parameter to override 'Accept' header, 'image/png' for output bytes", + "title": "Accept" + }, + "description": "Parameter to override 'Accept' header, 'image/png' for output bytes" + }, + { + "name": "accept", + "in": "header", + "required": false, + "schema": { + "type": "string", + "title": "Accept" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImgUpscaleOrVaryRequestJson" + } + } + } + }, + "responses": { + "200": { + "description": "PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeneratedImageResult" + } + }, + { + "$ref": "#/components/schemas/AsyncJobResponse" + } + ], + "title": "Response Img Upscale Or Vary V2 Generation Image Upscale Vary Post" + }, + "example": [ + { + "base64": "...very long string...", + "seed": "1050625087", + "finish_reason": "SUCCESS" + } + ] + }, + "application/json async": { + "example": { + "job_id": 1, + "job_type": "Text to Image" + } + }, + "image/png": { + "example": "PNG bytes, what did you expect?" + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v2/generation/image-inpaint-outpaint": { + "post": { + "tags": [ + "GenerateV2" + ], + "summary": "Img Inpaint Or Outpaint", + "description": "Inpaint or outpaint\n\n Inpaint or outpaint\n Arguments:\n req {ImgInpaintOrOutpaintRequestJson} -- Request body\n accept {str} -- Accept header\n accept_query {str} -- Parameter to override 'Accept' header, 'image/png' for output bytes\n Returns:\n Response -- img_generate_responses", + "operationId": "img_inpaint_or_outpaint_v2_generation_image_inpaint_outpaint_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "accept", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Parameter to override 'Accept' header, 'image/png' for output bytes", + "title": "Accept" + }, + "description": "Parameter to override 'Accept' header, 'image/png' for output bytes" + }, + { + "name": "accept", + "in": "header", + "required": false, + "schema": { + "type": "string", + "title": "Accept" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImgInpaintOrOutpaintRequestJson" + } + } + } + }, + "responses": { + "200": { + "description": "PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeneratedImageResult" + } + }, + { + "$ref": "#/components/schemas/AsyncJobResponse" + } + ], + "title": "Response Img Inpaint Or Outpaint V2 Generation Image Inpaint Outpaint Post" + }, + "example": [ + { + "base64": "...very long string...", + "seed": "1050625087", + "finish_reason": "SUCCESS" + } + ] + }, + "application/json async": { + "example": { + "job_id": 1, + "job_type": "Text to Image" + } + }, + "image/png": { + "example": "PNG bytes, what did you expect?" + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v2/generation/image-prompt": { + "post": { + "tags": [ + "GenerateV2" + ], + "summary": "Img Prompt", + "description": "Image prompt\n\n Image prompt generation\n Arguments:\n req {ImgPromptRequest} -- Request body\n accept {str} -- Accept header\n accept_query {str} -- Parameter to override 'Accept' header, 'image/png' for output bytes\n Returns:\n Response -- img_generate_responses", + "operationId": "img_prompt_v2_generation_image_prompt_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "accept", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Parameter to override 'Accept' header, 'image/png' for output bytes", + "title": "Accept" + }, + "description": "Parameter to override 'Accept' header, 'image/png' for output bytes" + }, + { + "name": "accept", + "in": "header", + "required": false, + "schema": { + "type": "string", + "title": "Accept" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImgPromptRequestJson" + } + } + } + }, + "responses": { + "200": { + "description": "PNG bytes if request's 'Accept' header is 'image/png', otherwise JSON", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeneratedImageResult" + } + }, + { + "$ref": "#/components/schemas/AsyncJobResponse" + } + ], + "title": "Response Img Prompt V2 Generation Image Prompt Post" + }, + "example": [ + { + "base64": "...very long string...", + "seed": "1050625087", + "finish_reason": "SUCCESS" + } + ] + }, + "application/json async": { + "example": { + "job_id": 1, + "job_type": "Text to Image" + } + }, + "image/png": { + "example": "PNG bytes, what did you expect?" + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "AdvancedParams": { + "properties": { + "disable_preview": { + "type": "boolean", + "title": "Disable Preview", + "description": "Disable preview during generation", + "default": false + }, + "disable_intermediate_results": { + "type": "boolean", + "title": "Disable Intermediate Results", + "description": "Disable intermediate results", + "default": false + }, + "disable_seed_increment": { + "type": "boolean", + "title": "Disable Seed Increment", + "description": "Disable Seed Increment", + "default": false + }, + "adm_scaler_positive": { + "type": "number", + "maximum": 3, + "minimum": 0.1, + "title": "Adm Scaler Positive", + "description": "Positive ADM Guidance Scaler", + "default": 1.5 + }, + "adm_scaler_negative": { + "type": "number", + "maximum": 3, + "minimum": 0.1, + "title": "Adm Scaler Negative", + "description": "Negative ADM Guidance Scaler", + "default": 0.8 + }, + "adm_scaler_end": { + "type": "number", + "maximum": 1, + "minimum": 0, + "title": "Adm Scaler End", + "description": "ADM Guidance End At Step", + "default": 0.3 + }, + "adaptive_cfg": { + "type": "number", + "maximum": 30, + "minimum": 1, + "title": "Adaptive Cfg", + "description": "CFG Mimicking from TSNR", + "default": 7 + }, + "sampler_name": { + "type": "string", + "title": "Sampler Name", + "description": "Sampler", + "default": "dpmpp_2m_sde_gpu" + }, + "scheduler_name": { + "type": "string", + "title": "Scheduler Name", + "description": "Scheduler", + "default": "karras" + }, + "overwrite_step": { + "type": "integer", + "maximum": 200, + "minimum": -1, + "title": "Overwrite Step", + "description": "Forced Overwrite of Sampling Step", + "default": -1 + }, + "overwrite_switch": { + "type": "number", + "maximum": 1, + "minimum": -1, + "title": "Overwrite Switch", + "description": "Forced Overwrite of Refiner Switch Step", + "default": -1 + }, + "overwrite_width": { + "type": "integer", + "maximum": 2048, + "minimum": -1, + "title": "Overwrite Width", + "description": "Forced Overwrite of Generating Width", + "default": -1 + }, + "overwrite_height": { + "type": "integer", + "maximum": 2048, + "minimum": -1, + "title": "Overwrite Height", + "description": "Forced Overwrite of Generating Height", + "default": -1 + }, + "overwrite_vary_strength": { + "type": "number", + "maximum": 1, + "minimum": -1, + "title": "Overwrite Vary Strength", + "description": "Forced Overwrite of Denoising Strength of \"Vary\"", + "default": -1 + }, + "overwrite_upscale_strength": { + "type": "number", + "maximum": 1, + "minimum": -1, + "title": "Overwrite Upscale Strength", + "description": "Forced Overwrite of Denoising Strength of \"Upscale\"", + "default": -1 + }, + "mixing_image_prompt_and_vary_upscale": { + "type": "boolean", + "title": "Mixing Image Prompt And Vary Upscale", + "description": "Mixing Image Prompt and Vary/Upscale", + "default": false + }, + "mixing_image_prompt_and_inpaint": { + "type": "boolean", + "title": "Mixing Image Prompt And Inpaint", + "description": "Mixing Image Prompt and Inpaint", + "default": false + }, + "debugging_cn_preprocessor": { + "type": "boolean", + "title": "Debugging Cn Preprocessor", + "description": "Debug Preprocessors", + "default": false + }, + "skipping_cn_preprocessor": { + "type": "boolean", + "title": "Skipping Cn Preprocessor", + "description": "Skip Preprocessors", + "default": false + }, + "canny_low_threshold": { + "type": "integer", + "maximum": 255, + "minimum": 1, + "title": "Canny Low Threshold", + "description": "Canny Low Threshold", + "default": 64 + }, + "canny_high_threshold": { + "type": "integer", + "maximum": 255, + "minimum": 1, + "title": "Canny High Threshold", + "description": "Canny High Threshold", + "default": 128 + }, + "refiner_swap_method": { + "type": "string", + "title": "Refiner Swap Method", + "description": "Refiner swap method", + "default": "joint" + }, + "controlnet_softness": { + "type": "number", + "maximum": 1, + "minimum": 0, + "title": "Controlnet Softness", + "description": "Softness of ControlNet", + "default": 0.25 + }, + "freeu_enabled": { + "type": "boolean", + "title": "Freeu Enabled", + "description": "FreeU enabled", + "default": false + }, + "freeu_b1": { + "type": "number", + "title": "Freeu B1", + "description": "FreeU B1", + "default": 1.01 + }, + "freeu_b2": { + "type": "number", + "title": "Freeu B2", + "description": "FreeU B2", + "default": 1.02 + }, + "freeu_s1": { + "type": "number", + "title": "Freeu S1", + "description": "FreeU B3", + "default": 0.99 + }, + "freeu_s2": { + "type": "number", + "title": "Freeu S2", + "description": "FreeU B4", + "default": 0.95 + }, + "debugging_inpaint_preprocessor": { + "type": "boolean", + "title": "Debugging Inpaint Preprocessor", + "description": "Debug Inpaint Preprocessing", + "default": false + }, + "inpaint_disable_initial_latent": { + "type": "boolean", + "title": "Inpaint Disable Initial Latent", + "description": "Disable initial latent in inpaint", + "default": false + }, + "inpaint_engine": { + "type": "string", + "title": "Inpaint Engine", + "description": "Inpaint Engine", + "default": "v2.6" + }, + "inpaint_strength": { + "type": "number", + "maximum": 1, + "minimum": 0, + "title": "Inpaint Strength", + "description": "Inpaint Denoising Strength", + "default": 1 + }, + "inpaint_respective_field": { + "type": "number", + "maximum": 1, + "minimum": 0, + "title": "Inpaint Respective Field", + "description": "Inpaint Respective Field", + "default": 1 + }, + "inpaint_mask_upload_checkbox": { + "type": "boolean", + "title": "Inpaint Mask Upload Checkbox", + "description": "Upload Mask", + "default": false + }, + "invert_mask_checkbox": { + "type": "boolean", + "title": "Invert Mask Checkbox", + "description": "Invert Mask", + "default": false + }, + "inpaint_erode_or_dilate": { + "type": "integer", + "maximum": 64, + "minimum": -64, + "title": "Inpaint Erode Or Dilate", + "description": "Mask Erode or Dilate", + "default": 0 + } + }, + "type": "object", + "title": "AdvancedParams", + "description": "Common params object AdvancedParams" + }, + "AllModelNamesResponse": { + "properties": { + "model_filenames": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Model Filenames", + "description": "All available model filenames" + }, + "lora_filenames": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Lora Filenames", + "description": "All available lora filenames" + } + }, + "type": "object", + "required": [ + "model_filenames", + "lora_filenames" + ], + "title": "AllModelNamesResponse", + "description": "all model list response" + }, + "AsyncJobResponse": { + "properties": { + "job_id": { + "type": "string", + "title": "Job Id", + "description": "Job ID" + }, + "job_type": { + "allOf": [ + { + "$ref": "#/components/schemas/TaskType" + } + ], + "description": "Job type" + }, + "job_stage": { + "allOf": [ + { + "$ref": "#/components/schemas/AsyncJobStage" + } + ], + "description": "Job running stage" + }, + "job_progress": { + "type": "integer", + "title": "Job Progress", + "description": "Job running progress, 100 is for finished." + }, + "job_status": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Job Status", + "description": "Job running status in text" + }, + "job_step_preview": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Job Step Preview", + "description": "Preview image of generation steps at current time, as base64 image" + }, + "job_result": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/GeneratedImageResult" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Job Result", + "description": "Job generation result" + } + }, + "type": "object", + "required": [ + "job_id", + "job_type", + "job_stage", + "job_progress" + ], + "title": "AsyncJobResponse", + "description": "Async job response\nAttributes:\n job_id: Job ID\n job_type: Job type\n job_stage: Job stage\n job_progress: Job progress, 0-100\n job_status: Job status\n job_step_preview: Job step preview\n job_result: Job result" + }, + "AsyncJobStage": { + "type": "string", + "enum": [ + "WAITING", + "RUNNING", + "SUCCESS", + "ERROR" + ], + "title": "AsyncJobStage", + "description": "Async job stage" + }, + "Body_describe_image_v1_tools_describe_image_post": { + "properties": { + "image": { + "type": "string", + "format": "binary", + "title": "Image" + } + }, + "type": "object", + "required": [ + "image" + ], + "title": "Body_describe_image_v1_tools_describe_image_post" + }, + "Body_img_inpaint_or_outpaint_v1_generation_image_inpaint_outpaint_post": { + "properties": { + "input_image": { + "type": "string", + "format": "binary", + "title": "Input Image", + "description": "Init image for inpaint or outpaint" + }, + "input_mask": { + "type": "string", + "format": "binary", + "title": "Input Mask", + "description": "Inpaint or outpaint mask" + }, + "inpaint_additional_prompt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Inpaint Additional Prompt", + "description": "Describe what you want to inpaint" + }, + "outpaint_selections": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Outpaint Selections", + "description": "Outpaint expansion selections, literal 'Left', 'Right', 'Top', 'Bottom' separated by comma", + "default": [] + }, + "outpaint_distance_left": { + "type": "integer", + "title": "Outpaint Distance Left", + "description": "Set outpaint left distance, -1 for default", + "default": 0 + }, + "outpaint_distance_right": { + "type": "integer", + "title": "Outpaint Distance Right", + "description": "Set outpaint right distance, -1 for default", + "default": 0 + }, + "outpaint_distance_top": { + "type": "integer", + "title": "Outpaint Distance Top", + "description": "Set outpaint top distance, -1 for default", + "default": 0 + }, + "outpaint_distance_bottom": { + "type": "integer", + "title": "Outpaint Distance Bottom", + "description": "Set outpaint bottom distance, -1 for default", + "default": 0 + }, + "prompt": { + "type": "string", + "title": "Prompt", + "default": "" + }, + "negative_prompt": { + "type": "string", + "title": "Negative Prompt", + "default": "" + }, + "style_selections": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Style Selections", + "description": "Fooocus style selections, separated by comma", + "default": [ + "Fooocus V2", + "Fooocus Enhance", + "Fooocus Sharp" + ] + }, + "performance_selection": { + "allOf": [ + { + "$ref": "#/components/schemas/PerformanceSelection" + } + ], + "description": "Performance Selection, one of 'Speed','Quality','Extreme Speed'", + "default": "Speed" + }, + "aspect_ratios_selection": { + "type": "string", + "title": "Aspect Ratios Selection", + "description": "Aspect Ratios Selection, default 1152*896", + "default": "1152*896" + }, + "image_number": { + "type": "integer", + "maximum": 32, + "minimum": 1, + "title": "Image Number", + "description": "Image number", + "default": 1 + }, + "image_seed": { + "type": "integer", + "title": "Image Seed", + "description": "Seed to generate image, -1 for random", + "default": -1 + }, + "sharpness": { + "type": "number", + "maximum": 30, + "minimum": 0, + "title": "Sharpness", + "default": 2 + }, + "guidance_scale": { + "type": "number", + "maximum": 30, + "minimum": 1, + "title": "Guidance Scale", + "default": 4 + }, + "base_model_name": { + "type": "string", + "title": "Base Model Name", + "default": "juggernautXL_v8Rundiffusion.safetensors" + }, + "refiner_model_name": { + "type": "string", + "title": "Refiner Model Name", + "default": "None" + }, + "refiner_switch": { + "type": "number", + "maximum": 1, + "minimum": 0.1, + "title": "Refiner Switch", + "description": "Refiner Switch At", + "default": 0.5 + }, + "loras": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Loras", + "description": "Lora config in JSON. Format as [{\"model_name\": \"sd_xl_offset_example-lora_1.0.safetensors\", \"weight\": 0.5}]", + "default": "[{\"enabled\":true,\"model_name\":\"sd_xl_offset_example-lora_1.0.safetensors\",\"weight\":0.1},{\"enabled\":true,\"model_name\":\"None\",\"weight\":1.0},{\"enabled\":true,\"model_name\":\"None\",\"weight\":1.0},{\"enabled\":true,\"model_name\":\"None\",\"weight\":1.0},{\"enabled\":true,\"model_name\":\"None\",\"weight\":1.0}]" + }, + "advanced_params": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Advanced Params", + "description": "Advanced parameters in JSON" + }, + "save_extension": { + "type": "string", + "title": "Save Extension", + "description": "Save extension, png, jpg or webp", + "default": "png" + }, + "require_base64": { + "type": "boolean", + "title": "Require Base64", + "description": "Return base64 data of generated image", + "default": false + }, + "async_process": { + "type": "boolean", + "title": "Async Process", + "description": "Set to true will run async and return job info for retrieve generation result later", + "default": false + } + }, + "type": "object", + "required": [ + "input_image" + ], + "title": "Body_img_inpaint_or_outpaint_v1_generation_image_inpaint_outpaint_post" + }, + "Body_img_prompt_v1_generation_image_prompt_post": { + "properties": { + "cn_img1": { + "type": "string", + "format": "binary", + "title": "Cn Img1", + "description": "Input image for image prompt" + }, + "input_image": { + "type": "string", + "format": "binary", + "title": "Input Image", + "description": "Init image for inpaint or outpaint" + }, + "input_mask": { + "type": "string", + "format": "binary", + "title": "Input Mask", + "description": "Inpaint or outpaint mask" + }, + "inpaint_additional_prompt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Inpaint Additional Prompt", + "description": "Describe what you want to inpaint" + }, + "outpaint_selections": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Outpaint Selections", + "description": "Outpaint expansion selections, literal 'Left', 'Right', 'Top', 'Bottom' separated by comma", + "default": [] + }, + "outpaint_distance_left": { + "type": "integer", + "title": "Outpaint Distance Left", + "description": "Set outpaint left distance, 0 for default", + "default": 0 + }, + "outpaint_distance_right": { + "type": "integer", + "title": "Outpaint Distance Right", + "description": "Set outpaint right distance, 0 for default", + "default": 0 + }, + "outpaint_distance_top": { + "type": "integer", + "title": "Outpaint Distance Top", + "description": "Set outpaint top distance, 0 for default", + "default": 0 + }, + "outpaint_distance_bottom": { + "type": "integer", + "title": "Outpaint Distance Bottom", + "description": "Set outpaint bottom distance, 0 for default", + "default": 0 + }, + "cn_stop1": { + "anyOf": [ + { + "type": "number", + "maximum": 1, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Cn Stop1", + "description": "Stop at for image prompt, None for default value" + }, + "cn_weight1": { + "anyOf": [ + { + "type": "number", + "maximum": 2, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Cn Weight1", + "description": "Weight for image prompt, None for default value" + }, + "cn_type1": { + "allOf": [ + { + "$ref": "#/components/schemas/ControlNetType" + } + ], + "description": "ControlNet type for image prompt", + "default": "ImagePrompt" + }, + "cn_img2": { + "type": "string", + "format": "binary", + "title": "Cn Img2", + "description": "Input image for image prompt" + }, + "cn_stop2": { + "anyOf": [ + { + "type": "number", + "maximum": 1, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Cn Stop2", + "description": "Stop at for image prompt, None for default value" + }, + "cn_weight2": { + "anyOf": [ + { + "type": "number", + "maximum": 2, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Cn Weight2", + "description": "Weight for image prompt, None for default value" + }, + "cn_type2": { + "allOf": [ + { + "$ref": "#/components/schemas/ControlNetType" + } + ], + "description": "ControlNet type for image prompt", + "default": "ImagePrompt" + }, + "cn_img3": { + "type": "string", + "format": "binary", + "title": "Cn Img3", + "description": "Input image for image prompt" + }, + "cn_stop3": { + "anyOf": [ + { + "type": "number", + "maximum": 1, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Cn Stop3", + "description": "Stop at for image prompt, None for default value" + }, + "cn_weight3": { + "anyOf": [ + { + "type": "number", + "maximum": 2, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Cn Weight3", + "description": "Weight for image prompt, None for default value" + }, + "cn_type3": { + "allOf": [ + { + "$ref": "#/components/schemas/ControlNetType" + } + ], + "description": "ControlNet type for image prompt", + "default": "ImagePrompt" + }, + "cn_img4": { + "type": "string", + "format": "binary", + "title": "Cn Img4", + "description": "Input image for image prompt" + }, + "cn_stop4": { + "anyOf": [ + { + "type": "number", + "maximum": 1, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Cn Stop4", + "description": "Stop at for image prompt, None for default value" + }, + "cn_weight4": { + "anyOf": [ + { + "type": "number", + "maximum": 2, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Cn Weight4", + "description": "Weight for image prompt, None for default value" + }, + "cn_type4": { + "allOf": [ + { + "$ref": "#/components/schemas/ControlNetType" + } + ], + "description": "ControlNet type for image prompt", + "default": "ImagePrompt" + }, + "prompt": { + "type": "string", + "title": "Prompt", + "default": "" + }, + "negative_prompt": { + "type": "string", + "title": "Negative Prompt", + "default": "" + }, + "style_selections": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Style Selections", + "description": "Fooocus style selections, separated by comma", + "default": [ + "Fooocus V2", + "Fooocus Enhance", + "Fooocus Sharp" + ] + }, + "performance_selection": { + "allOf": [ + { + "$ref": "#/components/schemas/PerformanceSelection" + } + ], + "default": "Speed" + }, + "aspect_ratios_selection": { + "type": "string", + "title": "Aspect Ratios Selection", + "default": "1152*896" + }, + "image_number": { + "type": "integer", + "maximum": 32, + "minimum": 1, + "title": "Image Number", + "description": "Image number", + "default": 1 + }, + "image_seed": { + "type": "integer", + "title": "Image Seed", + "description": "Seed to generate image, -1 for random", + "default": -1 + }, + "sharpness": { + "type": "number", + "maximum": 30, + "minimum": 0, + "title": "Sharpness", + "default": 2 + }, + "guidance_scale": { + "type": "number", + "maximum": 30, + "minimum": 1, + "title": "Guidance Scale", + "default": 4 + }, + "base_model_name": { + "type": "string", + "title": "Base Model Name", + "default": "juggernautXL_v8Rundiffusion.safetensors" + }, + "refiner_model_name": { + "type": "string", + "title": "Refiner Model Name", + "default": "None" + }, + "refiner_switch": { + "type": "number", + "maximum": 1, + "minimum": 0.1, + "title": "Refiner Switch", + "description": "Refiner Switch At", + "default": 0.5 + }, + "loras": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Loras", + "description": "Lora config in JSON. Format as [{\"model_name\": \"sd_xl_offset_example-lora_1.0.safetensors\", \"weight\": 0.5}]", + "default": "[{\"enabled\":true,\"model_name\":\"sd_xl_offset_example-lora_1.0.safetensors\",\"weight\":0.1},{\"enabled\":true,\"model_name\":\"None\",\"weight\":1.0},{\"enabled\":true,\"model_name\":\"None\",\"weight\":1.0},{\"enabled\":true,\"model_name\":\"None\",\"weight\":1.0},{\"enabled\":true,\"model_name\":\"None\",\"weight\":1.0}]" + }, + "advanced_params": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Advanced Params", + "description": "Advanced parameters in JSON" + }, + "save_extension": { + "type": "string", + "title": "Save Extension", + "description": "Save extension, png, jpg or webp", + "default": "png" + }, + "require_base64": { + "type": "boolean", + "title": "Require Base64", + "description": "Return base64 data of generated image", + "default": false + }, + "async_process": { + "type": "boolean", + "title": "Async Process", + "description": "Set to true will run async and return job info for retrieve generation result later", + "default": false + } + }, + "type": "object", + "title": "Body_img_prompt_v1_generation_image_prompt_post" + }, + "Body_img_upscale_or_vary_v1_generation_image_upscale_vary_post": { + "properties": { + "input_image": { + "type": "string", + "format": "binary", + "title": "Input Image", + "description": "Init image for upscale or outpaint" + }, + "uov_method": { + "$ref": "#/components/schemas/UpscaleOrVaryMethod" + }, + "upscale_value": { + "anyOf": [ + { + "type": "number", + "maximum": 5, + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Upscale Value", + "description": "Upscale custom value, None for default value" + }, + "prompt": { + "type": "string", + "title": "Prompt", + "default": "" + }, + "negative_prompt": { + "type": "string", + "title": "Negative Prompt", + "default": "" + }, + "style_selections": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Style Selections", + "description": "Fooocus style selections, separated by comma", + "default": [ + "Fooocus V2", + "Fooocus Enhance", + "Fooocus Sharp" + ] + }, + "performance_selection": { + "allOf": [ + { + "$ref": "#/components/schemas/PerformanceSelection" + } + ], + "description": "Performance Selection, one of 'Speed','Quality','Extreme Speed'", + "default": "Speed" + }, + "aspect_ratios_selection": { + "type": "string", + "title": "Aspect Ratios Selection", + "description": "Aspect Ratios Selection, default 1152*896", + "default": "1152*896" + }, + "image_number": { + "type": "integer", + "maximum": 32, + "minimum": 1, + "title": "Image Number", + "description": "Image number", + "default": 1 + }, + "image_seed": { + "type": "integer", + "title": "Image Seed", + "description": "Seed to generate image, -1 for random", + "default": -1 + }, + "sharpness": { + "type": "number", + "maximum": 30, + "minimum": 0, + "title": "Sharpness", + "default": 2 + }, + "guidance_scale": { + "type": "number", + "maximum": 30, + "minimum": 1, + "title": "Guidance Scale", + "default": 4 + }, + "base_model_name": { + "type": "string", + "title": "Base Model Name", + "description": "checkpoint file name", + "default": "juggernautXL_v8Rundiffusion.safetensors" + }, + "refiner_model_name": { + "type": "string", + "title": "Refiner Model Name", + "description": "refiner file name", + "default": "None" + }, + "refiner_switch": { + "type": "number", + "maximum": 1, + "minimum": 0.1, + "title": "Refiner Switch", + "description": "Refiner Switch At", + "default": 0.5 + }, + "loras": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Loras", + "description": "Lora config in JSON. Format as [{\"model_name\": \"sd_xl_offset_example-lora_1.0.safetensors\", \"weight\": 0.5}]", + "default": "[{\"enabled\":true,\"model_name\":\"sd_xl_offset_example-lora_1.0.safetensors\",\"weight\":0.1},{\"enabled\":true,\"model_name\":\"None\",\"weight\":1.0},{\"enabled\":true,\"model_name\":\"None\",\"weight\":1.0},{\"enabled\":true,\"model_name\":\"None\",\"weight\":1.0},{\"enabled\":true,\"model_name\":\"None\",\"weight\":1.0}]" + }, + "advanced_params": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Advanced Params", + "description": "Advanced parameters in JSON" + }, + "save_extension": { + "type": "string", + "title": "Save Extension", + "description": "Save extension, png, jpg or webp", + "default": "png" + }, + "require_base64": { + "type": "boolean", + "title": "Require Base64", + "description": "Return base64 data of generated image", + "default": false + }, + "async_process": { + "type": "boolean", + "title": "Async Process", + "description": "Set to true will run async and return job info for retrieve generation result later", + "default": false + } + }, + "type": "object", + "required": [ + "input_image", + "uov_method" + ], + "title": "Body_img_upscale_or_vary_v1_generation_image_upscale_vary_post" + }, + "CommonRequest": { + "properties": { + "prompt": { + "type": "string", + "title": "Prompt", + "default": "" + }, + "negative_prompt": { + "type": "string", + "title": "Negative Prompt", + "default": "" + }, + "style_selections": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Style Selections", + "default": [ + "Fooocus V2", + "Fooocus Enhance", + "Fooocus Sharp" + ] + }, + "performance_selection": { + "allOf": [ + { + "$ref": "#/components/schemas/PerformanceSelection" + } + ], + "default": "Speed" + }, + "aspect_ratios_selection": { + "type": "string", + "title": "Aspect Ratios Selection", + "default": "1152*896" + }, + "image_number": { + "type": "integer", + "maximum": 32, + "minimum": 1, + "title": "Image Number", + "description": "Image number", + "default": 1 + }, + "image_seed": { + "type": "integer", + "title": "Image Seed", + "description": "Seed to generate image, -1 for random", + "default": -1 + }, + "sharpness": { + "type": "number", + "maximum": 30, + "minimum": 0, + "title": "Sharpness", + "default": 2 + }, + "guidance_scale": { + "type": "number", + "maximum": 30, + "minimum": 1, + "title": "Guidance Scale", + "default": 4 + }, + "base_model_name": { + "type": "string", + "title": "Base Model Name", + "default": "juggernautXL_v8Rundiffusion.safetensors" + }, + "refiner_model_name": { + "type": "string", + "title": "Refiner Model Name", + "default": "None" + }, + "refiner_switch": { + "type": "number", + "maximum": 1, + "minimum": 0.1, + "title": "Refiner Switch", + "description": "Refiner Switch At", + "default": 0.5 + }, + "loras": { + "items": { + "$ref": "#/components/schemas/Lora" + }, + "type": "array", + "title": "Loras", + "default": [ + { + "enabled": true, + "model_name": "sd_xl_offset_example-lora_1.0.safetensors", + "weight": 0.1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + } + ] + }, + "advanced_params": { + "allOf": [ + { + "$ref": "#/components/schemas/AdvancedParams" + } + ], + "default": { + "adaptive_cfg": 7, + "adm_scaler_end": 0.3, + "adm_scaler_negative": 0.8, + "adm_scaler_positive": 1.5, + "canny_high_threshold": 128, + "canny_low_threshold": 64, + "controlnet_softness": 0.25, + "debugging_cn_preprocessor": false, + "debugging_inpaint_preprocessor": false, + "disable_intermediate_results": false, + "disable_preview": false, + "disable_seed_increment": false, + "freeu_b1": 1.01, + "freeu_b2": 1.02, + "freeu_enabled": false, + "freeu_s1": 0.99, + "freeu_s2": 0.95, + "inpaint_disable_initial_latent": false, + "inpaint_engine": "v2.6", + "inpaint_erode_or_dilate": 0, + "inpaint_mask_upload_checkbox": false, + "inpaint_respective_field": 1, + "inpaint_strength": 1, + "invert_mask_checkbox": false, + "mixing_image_prompt_and_inpaint": false, + "mixing_image_prompt_and_vary_upscale": false, + "overwrite_height": -1, + "overwrite_step": -1, + "overwrite_switch": -1, + "overwrite_upscale_strength": -1, + "overwrite_vary_strength": -1, + "overwrite_width": -1, + "refiner_swap_method": "joint", + "sampler_name": "dpmpp_2m_sde_gpu", + "scheduler_name": "karras", + "skipping_cn_preprocessor": false + } + }, + "save_extension": { + "type": "string", + "title": "Save Extension", + "description": "Save extension, one of [png, jpg, webp]", + "default": "png" + }, + "read_wildcards_in_order": { + "type": "boolean", + "title": "Read Wildcards In Order", + "description": "Read wildcards in order", + "default": false + }, + "require_base64": { + "type": "boolean", + "title": "Require Base64", + "description": "Return base64 data of generated image", + "default": false + }, + "async_process": { + "type": "boolean", + "title": "Async Process", + "description": "Set to true will run async and return job info for retrieve generation result later", + "default": false + }, + "webhook_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Webhook Url", + "description": "Optional URL for a webhook callback. If provided, the system will send a POST request to this URL upon task completion or failure. This allows for asynchronous notification of task status.", + "default": "" + } + }, + "type": "object", + "title": "CommonRequest", + "description": "All generate request based on this model" + }, + "ControlNetType": { + "type": "string", + "enum": [ + "ImagePrompt", + "FaceSwap", + "PyraCanny", + "CPDS" + ], + "title": "ControlNetType", + "description": "ControlNet Type" + }, + "DescribeImageResponse": { + "properties": { + "describe": { + "type": "string", + "title": "Describe" + } + }, + "type": "object", + "required": [ + "describe" + ], + "title": "DescribeImageResponse", + "description": "describe image response" + }, + "DescribeImageType": { + "type": "string", + "enum": [ + "Photo", + "Anime" + ], + "title": "DescribeImageType", + "description": "Image type for image to prompt" + }, + "GeneratedImageResult": { + "properties": { + "base64": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base64", + "description": "Image encoded in base64, or null if finishReason is not 'SUCCESS', only return when request require base64" + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url", + "description": "Image file static serve url, or null if finishReason is not 'SUCCESS'" + }, + "seed": { + "type": "string", + "title": "Seed", + "description": "The seed associated with this image" + }, + "finish_reason": { + "$ref": "#/components/schemas/GenerationFinishReason" + } + }, + "type": "object", + "required": [ + "base64", + "url", + "seed", + "finish_reason" + ], + "title": "GeneratedImageResult", + "description": "Generated images result" + }, + "GenerationFinishReason": { + "type": "string", + "enum": [ + "SUCCESS", + "QUEUE_IS_FULL", + "USER_CANCEL", + "ERROR" + ], + "title": "GenerationFinishReason", + "description": "Generation finish reason" + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "ImagePrompt": { + "properties": { + "cn_img": { + "anyOf": [ + { + "type": "string", + "format": "binary" + }, + { + "type": "null" + } + ], + "title": "Cn Img" + }, + "cn_stop": { + "anyOf": [ + { + "type": "number", + "maximum": 1, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Cn Stop" + }, + "cn_weight": { + "anyOf": [ + { + "type": "number", + "maximum": 2, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Cn Weight", + "description": "None for default value" + }, + "cn_type": { + "allOf": [ + { + "$ref": "#/components/schemas/ControlNetType" + } + ], + "default": "ImagePrompt" + } + }, + "type": "object", + "title": "ImagePrompt", + "description": "Common params object ImagePrompt" + }, + "ImagePromptJson": { + "properties": { + "cn_img": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Cn Img", + "description": "Input image for image prompt as base64" + }, + "cn_stop": { + "anyOf": [ + { + "type": "number", + "maximum": 1, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Cn Stop", + "description": "Stop at for image prompt, 0 for default value", + "default": 0 + }, + "cn_weight": { + "anyOf": [ + { + "type": "number", + "maximum": 2, + "minimum": 0 + }, + { + "type": "null" + } + ], + "title": "Cn Weight", + "description": "Weight for image prompt, 0 for default value", + "default": 0 + }, + "cn_type": { + "allOf": [ + { + "$ref": "#/components/schemas/ControlNetType" + } + ], + "description": "ControlNet type for image prompt", + "default": "ImagePrompt" + } + }, + "type": "object", + "title": "ImagePromptJson", + "description": "Image prompt for V2 API" + }, + "ImgInpaintOrOutpaintRequestJson": { + "properties": { + "prompt": { + "type": "string", + "title": "Prompt", + "default": "" + }, + "negative_prompt": { + "type": "string", + "title": "Negative Prompt", + "default": "" + }, + "style_selections": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Style Selections", + "default": [ + "Fooocus V2", + "Fooocus Enhance", + "Fooocus Sharp" + ] + }, + "performance_selection": { + "allOf": [ + { + "$ref": "#/components/schemas/PerformanceSelection" + } + ], + "default": "Speed" + }, + "aspect_ratios_selection": { + "type": "string", + "title": "Aspect Ratios Selection", + "default": "1152*896" + }, + "image_number": { + "type": "integer", + "maximum": 32, + "minimum": 1, + "title": "Image Number", + "description": "Image number", + "default": 1 + }, + "image_seed": { + "type": "integer", + "title": "Image Seed", + "description": "Seed to generate image, -1 for random", + "default": -1 + }, + "sharpness": { + "type": "number", + "maximum": 30, + "minimum": 0, + "title": "Sharpness", + "default": 2 + }, + "guidance_scale": { + "type": "number", + "maximum": 30, + "minimum": 1, + "title": "Guidance Scale", + "default": 4 + }, + "base_model_name": { + "type": "string", + "title": "Base Model Name", + "default": "juggernautXL_v8Rundiffusion.safetensors" + }, + "refiner_model_name": { + "type": "string", + "title": "Refiner Model Name", + "default": "None" + }, + "refiner_switch": { + "type": "number", + "maximum": 1, + "minimum": 0.1, + "title": "Refiner Switch", + "description": "Refiner Switch At", + "default": 0.5 + }, + "loras": { + "items": { + "$ref": "#/components/schemas/Lora" + }, + "type": "array", + "title": "Loras", + "default": [ + { + "enabled": true, + "model_name": "sd_xl_offset_example-lora_1.0.safetensors", + "weight": 0.1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + } + ] + }, + "advanced_params": { + "allOf": [ + { + "$ref": "#/components/schemas/AdvancedParams" + } + ], + "default": { + "adaptive_cfg": 7, + "adm_scaler_end": 0.3, + "adm_scaler_negative": 0.8, + "adm_scaler_positive": 1.5, + "canny_high_threshold": 128, + "canny_low_threshold": 64, + "controlnet_softness": 0.25, + "debugging_cn_preprocessor": false, + "debugging_inpaint_preprocessor": false, + "disable_intermediate_results": false, + "disable_preview": false, + "disable_seed_increment": false, + "freeu_b1": 1.01, + "freeu_b2": 1.02, + "freeu_enabled": false, + "freeu_s1": 0.99, + "freeu_s2": 0.95, + "inpaint_disable_initial_latent": false, + "inpaint_engine": "v2.6", + "inpaint_erode_or_dilate": 0, + "inpaint_mask_upload_checkbox": false, + "inpaint_respective_field": 1, + "inpaint_strength": 1, + "invert_mask_checkbox": false, + "mixing_image_prompt_and_inpaint": false, + "mixing_image_prompt_and_vary_upscale": false, + "overwrite_height": -1, + "overwrite_step": -1, + "overwrite_switch": -1, + "overwrite_upscale_strength": -1, + "overwrite_vary_strength": -1, + "overwrite_width": -1, + "refiner_swap_method": "joint", + "sampler_name": "dpmpp_2m_sde_gpu", + "scheduler_name": "karras", + "skipping_cn_preprocessor": false + } + }, + "save_extension": { + "type": "string", + "title": "Save Extension", + "description": "Save extension, one of [png, jpg, webp]", + "default": "png" + }, + "read_wildcards_in_order": { + "type": "boolean", + "title": "Read Wildcards In Order", + "description": "Read wildcards in order", + "default": false + }, + "require_base64": { + "type": "boolean", + "title": "Require Base64", + "description": "Return base64 data of generated image", + "default": false + }, + "async_process": { + "type": "boolean", + "title": "Async Process", + "description": "Set to true will run async and return job info for retrieve generation result later", + "default": false + }, + "webhook_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Webhook Url", + "description": "Optional URL for a webhook callback. If provided, the system will send a POST request to this URL upon task completion or failure. This allows for asynchronous notification of task status.", + "default": "" + }, + "input_image": { + "type": "string", + "title": "Input Image", + "description": "Init image for inpaint or outpaint as base64" + }, + "input_mask": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Input Mask", + "description": "Inpaint or outpaint mask as base64", + "default": "" + }, + "inpaint_additional_prompt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Inpaint Additional Prompt", + "description": "Describe what you want to inpaint", + "default": "" + }, + "outpaint_selections": { + "items": { + "$ref": "#/components/schemas/OutpaintExpansion" + }, + "type": "array", + "title": "Outpaint Selections", + "default": [] + }, + "outpaint_distance_left": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Outpaint Distance Left", + "description": "Set outpaint left distance", + "default": -1 + }, + "outpaint_distance_right": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Outpaint Distance Right", + "description": "Set outpaint right distance", + "default": -1 + }, + "outpaint_distance_top": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Outpaint Distance Top", + "description": "Set outpaint top distance", + "default": -1 + }, + "outpaint_distance_bottom": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Outpaint Distance Bottom", + "description": "Set outpaint bottom distance", + "default": -1 + }, + "image_prompts": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/ImagePromptJson" + }, + { + "$ref": "#/components/schemas/ImagePrompt" + } + ] + }, + "type": "array", + "title": "Image Prompts", + "default": [] + } + }, + "type": "object", + "required": [ + "input_image" + ], + "title": "ImgInpaintOrOutpaintRequestJson", + "description": "image inpaint or outpaint request" + }, + "ImgPromptRequestJson": { + "properties": { + "prompt": { + "type": "string", + "title": "Prompt", + "default": "" + }, + "negative_prompt": { + "type": "string", + "title": "Negative Prompt", + "default": "" + }, + "style_selections": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Style Selections", + "default": [ + "Fooocus V2", + "Fooocus Enhance", + "Fooocus Sharp" + ] + }, + "performance_selection": { + "allOf": [ + { + "$ref": "#/components/schemas/PerformanceSelection" + } + ], + "default": "Speed" + }, + "aspect_ratios_selection": { + "type": "string", + "title": "Aspect Ratios Selection", + "default": "1152*896" + }, + "image_number": { + "type": "integer", + "maximum": 32, + "minimum": 1, + "title": "Image Number", + "description": "Image number", + "default": 1 + }, + "image_seed": { + "type": "integer", + "title": "Image Seed", + "description": "Seed to generate image, -1 for random", + "default": -1 + }, + "sharpness": { + "type": "number", + "maximum": 30, + "minimum": 0, + "title": "Sharpness", + "default": 2 + }, + "guidance_scale": { + "type": "number", + "maximum": 30, + "minimum": 1, + "title": "Guidance Scale", + "default": 4 + }, + "base_model_name": { + "type": "string", + "title": "Base Model Name", + "default": "juggernautXL_v8Rundiffusion.safetensors" + }, + "refiner_model_name": { + "type": "string", + "title": "Refiner Model Name", + "default": "None" + }, + "refiner_switch": { + "type": "number", + "maximum": 1, + "minimum": 0.1, + "title": "Refiner Switch", + "description": "Refiner Switch At", + "default": 0.5 + }, + "loras": { + "items": { + "$ref": "#/components/schemas/Lora" + }, + "type": "array", + "title": "Loras", + "default": [ + { + "enabled": true, + "model_name": "sd_xl_offset_example-lora_1.0.safetensors", + "weight": 0.1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + } + ] + }, + "advanced_params": { + "allOf": [ + { + "$ref": "#/components/schemas/AdvancedParams" + } + ], + "default": { + "adaptive_cfg": 7, + "adm_scaler_end": 0.3, + "adm_scaler_negative": 0.8, + "adm_scaler_positive": 1.5, + "canny_high_threshold": 128, + "canny_low_threshold": 64, + "controlnet_softness": 0.25, + "debugging_cn_preprocessor": false, + "debugging_inpaint_preprocessor": false, + "disable_intermediate_results": false, + "disable_preview": false, + "disable_seed_increment": false, + "freeu_b1": 1.01, + "freeu_b2": 1.02, + "freeu_enabled": false, + "freeu_s1": 0.99, + "freeu_s2": 0.95, + "inpaint_disable_initial_latent": false, + "inpaint_engine": "v2.6", + "inpaint_erode_or_dilate": 0, + "inpaint_mask_upload_checkbox": false, + "inpaint_respective_field": 1, + "inpaint_strength": 1, + "invert_mask_checkbox": false, + "mixing_image_prompt_and_inpaint": false, + "mixing_image_prompt_and_vary_upscale": false, + "overwrite_height": -1, + "overwrite_step": -1, + "overwrite_switch": -1, + "overwrite_upscale_strength": -1, + "overwrite_vary_strength": -1, + "overwrite_width": -1, + "refiner_swap_method": "joint", + "sampler_name": "dpmpp_2m_sde_gpu", + "scheduler_name": "karras", + "skipping_cn_preprocessor": false + } + }, + "save_extension": { + "type": "string", + "title": "Save Extension", + "description": "Save extension, one of [png, jpg, webp]", + "default": "png" + }, + "read_wildcards_in_order": { + "type": "boolean", + "title": "Read Wildcards In Order", + "description": "Read wildcards in order", + "default": false + }, + "require_base64": { + "type": "boolean", + "title": "Require Base64", + "description": "Return base64 data of generated image", + "default": false + }, + "async_process": { + "type": "boolean", + "title": "Async Process", + "description": "Set to true will run async and return job info for retrieve generation result later", + "default": false + }, + "webhook_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Webhook Url", + "description": "Optional URL for a webhook callback. If provided, the system will send a POST request to this URL upon task completion or failure. This allows for asynchronous notification of task status.", + "default": "" + }, + "input_image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Input Image", + "description": "Init image for inpaint or outpaint as base64" + }, + "input_mask": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Input Mask", + "description": "Inpaint or outpaint mask as base64", + "default": "" + }, + "inpaint_additional_prompt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Inpaint Additional Prompt", + "description": "Describe what you want to inpaint", + "default": "" + }, + "outpaint_selections": { + "items": { + "$ref": "#/components/schemas/OutpaintExpansion" + }, + "type": "array", + "title": "Outpaint Selections", + "default": [] + }, + "outpaint_distance_left": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Outpaint Distance Left", + "description": "Set outpaint left distance", + "default": -1 + }, + "outpaint_distance_right": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Outpaint Distance Right", + "description": "Set outpaint right distance", + "default": -1 + }, + "outpaint_distance_top": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Outpaint Distance Top", + "description": "Set outpaint top distance", + "default": -1 + }, + "outpaint_distance_bottom": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Outpaint Distance Bottom", + "description": "Set outpaint bottom distance", + "default": -1 + }, + "image_prompts": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/ImagePromptJson" + }, + { + "$ref": "#/components/schemas/ImagePrompt" + } + ] + }, + "type": "array", + "title": "Image Prompts" + } + }, + "type": "object", + "required": [ + "image_prompts" + ], + "title": "ImgPromptRequestJson", + "description": "img prompt request json" + }, + "ImgUpscaleOrVaryRequestJson": { + "properties": { + "prompt": { + "type": "string", + "title": "Prompt", + "default": "" + }, + "negative_prompt": { + "type": "string", + "title": "Negative Prompt", + "default": "" + }, + "style_selections": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Style Selections", + "default": [ + "Fooocus V2", + "Fooocus Enhance", + "Fooocus Sharp" + ] + }, + "performance_selection": { + "allOf": [ + { + "$ref": "#/components/schemas/PerformanceSelection" + } + ], + "default": "Speed" + }, + "aspect_ratios_selection": { + "type": "string", + "title": "Aspect Ratios Selection", + "default": "1152*896" + }, + "image_number": { + "type": "integer", + "maximum": 32, + "minimum": 1, + "title": "Image Number", + "description": "Image number", + "default": 1 + }, + "image_seed": { + "type": "integer", + "title": "Image Seed", + "description": "Seed to generate image, -1 for random", + "default": -1 + }, + "sharpness": { + "type": "number", + "maximum": 30, + "minimum": 0, + "title": "Sharpness", + "default": 2 + }, + "guidance_scale": { + "type": "number", + "maximum": 30, + "minimum": 1, + "title": "Guidance Scale", + "default": 4 + }, + "base_model_name": { + "type": "string", + "title": "Base Model Name", + "default": "juggernautXL_v8Rundiffusion.safetensors" + }, + "refiner_model_name": { + "type": "string", + "title": "Refiner Model Name", + "default": "None" + }, + "refiner_switch": { + "type": "number", + "maximum": 1, + "minimum": 0.1, + "title": "Refiner Switch", + "description": "Refiner Switch At", + "default": 0.5 + }, + "loras": { + "items": { + "$ref": "#/components/schemas/Lora" + }, + "type": "array", + "title": "Loras", + "default": [ + { + "enabled": true, + "model_name": "sd_xl_offset_example-lora_1.0.safetensors", + "weight": 0.1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + } + ] + }, + "advanced_params": { + "allOf": [ + { + "$ref": "#/components/schemas/AdvancedParams" + } + ], + "default": { + "adaptive_cfg": 7, + "adm_scaler_end": 0.3, + "adm_scaler_negative": 0.8, + "adm_scaler_positive": 1.5, + "canny_high_threshold": 128, + "canny_low_threshold": 64, + "controlnet_softness": 0.25, + "debugging_cn_preprocessor": false, + "debugging_inpaint_preprocessor": false, + "disable_intermediate_results": false, + "disable_preview": false, + "disable_seed_increment": false, + "freeu_b1": 1.01, + "freeu_b2": 1.02, + "freeu_enabled": false, + "freeu_s1": 0.99, + "freeu_s2": 0.95, + "inpaint_disable_initial_latent": false, + "inpaint_engine": "v2.6", + "inpaint_erode_or_dilate": 0, + "inpaint_mask_upload_checkbox": false, + "inpaint_respective_field": 1, + "inpaint_strength": 1, + "invert_mask_checkbox": false, + "mixing_image_prompt_and_inpaint": false, + "mixing_image_prompt_and_vary_upscale": false, + "overwrite_height": -1, + "overwrite_step": -1, + "overwrite_switch": -1, + "overwrite_upscale_strength": -1, + "overwrite_vary_strength": -1, + "overwrite_width": -1, + "refiner_swap_method": "joint", + "sampler_name": "dpmpp_2m_sde_gpu", + "scheduler_name": "karras", + "skipping_cn_preprocessor": false + } + }, + "save_extension": { + "type": "string", + "title": "Save Extension", + "description": "Save extension, one of [png, jpg, webp]", + "default": "png" + }, + "read_wildcards_in_order": { + "type": "boolean", + "title": "Read Wildcards In Order", + "description": "Read wildcards in order", + "default": false + }, + "require_base64": { + "type": "boolean", + "title": "Require Base64", + "description": "Return base64 data of generated image", + "default": false + }, + "async_process": { + "type": "boolean", + "title": "Async Process", + "description": "Set to true will run async and return job info for retrieve generation result later", + "default": false + }, + "webhook_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Webhook Url", + "description": "Optional URL for a webhook callback. If provided, the system will send a POST request to this URL upon task completion or failure. This allows for asynchronous notification of task status.", + "default": "" + }, + "uov_method": { + "allOf": [ + { + "$ref": "#/components/schemas/UpscaleOrVaryMethod" + } + ], + "default": "Upscale (2x)" + }, + "upscale_value": { + "anyOf": [ + { + "type": "number", + "maximum": 5, + "minimum": 1 + }, + { + "type": "null" + } + ], + "title": "Upscale Value", + "description": "Upscale custom value, 1.0 for default value", + "default": 1 + }, + "input_image": { + "type": "string", + "title": "Input Image", + "description": "Init image for upscale or outpaint as base64" + }, + "image_prompts": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/ImagePromptJson" + }, + { + "$ref": "#/components/schemas/ImagePrompt" + } + ] + }, + "type": "array", + "title": "Image Prompts", + "default": [] + } + }, + "type": "object", + "required": [ + "input_image" + ], + "title": "ImgUpscaleOrVaryRequestJson", + "description": "img upscale or vary request json" + }, + "JobHistoryInfo": { + "properties": { + "job_id": { + "type": "string", + "title": "Job Id" + }, + "is_finished": { + "type": "boolean", + "title": "Is Finished", + "default": false + } + }, + "type": "object", + "required": [ + "job_id" + ], + "title": "JobHistoryInfo", + "description": "job history info" + }, + "JobHistoryResponse": { + "properties": { + "queue": { + "items": { + "$ref": "#/components/schemas/JobHistoryInfo" + }, + "type": "array", + "title": "Queue", + "default": [] + }, + "history": { + "items": { + "$ref": "#/components/schemas/JobHistoryInfo" + }, + "type": "array", + "title": "History", + "default": [] + } + }, + "type": "object", + "title": "JobHistoryResponse", + "description": "job history response" + }, + "JobQueueInfo": { + "properties": { + "running_size": { + "type": "integer", + "title": "Running Size", + "description": "The current running and waiting job count" + }, + "finished_size": { + "type": "integer", + "title": "Finished Size", + "description": "Finished job count (after auto clean)" + }, + "last_job_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last Job Id", + "description": "Last submit generation job id" + } + }, + "type": "object", + "required": [ + "running_size", + "finished_size", + "last_job_id" + ], + "title": "JobQueueInfo", + "description": "job queue info\nAttributes:\n running_size: int, The current running and waiting job count\n finished_size: int, The current finished job count\n last_job_id: str, Last submit generation job id" + }, + "Lora": { + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled" + }, + "model_name": { + "type": "string", + "title": "Model Name" + }, + "weight": { + "type": "number", + "maximum": 2, + "minimum": -2, + "title": "Weight", + "default": 0.5 + } + }, + "type": "object", + "required": [ + "enabled", + "model_name" + ], + "title": "Lora", + "description": "Common params lora model" + }, + "OutpaintExpansion": { + "type": "string", + "enum": [ + "Left", + "Right", + "Top", + "Bottom" + ], + "title": "OutpaintExpansion", + "description": "Outpaint expansion" + }, + "PerformanceSelection": { + "type": "string", + "enum": [ + "Speed", + "Quality", + "Extreme Speed", + "Lightning" + ], + "title": "PerformanceSelection", + "description": "Performance selection" + }, + "StopResponse": { + "properties": { + "msg": { + "type": "string", + "title": "Msg" + } + }, + "type": "object", + "required": [ + "msg" + ], + "title": "StopResponse", + "description": "stop task response" + }, + "TaskType": { + "type": "string", + "enum": [ + "Text to Image", + "Image Upscale or Variation", + "Image Inpaint or Outpaint", + "Image Prompt", + "Not Found" + ], + "title": "TaskType", + "description": "Task type object" + }, + "Text2ImgRequestWithPrompt": { + "properties": { + "prompt": { + "type": "string", + "title": "Prompt", + "default": "" + }, + "negative_prompt": { + "type": "string", + "title": "Negative Prompt", + "default": "" + }, + "style_selections": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Style Selections", + "default": [ + "Fooocus V2", + "Fooocus Enhance", + "Fooocus Sharp" + ] + }, + "performance_selection": { + "allOf": [ + { + "$ref": "#/components/schemas/PerformanceSelection" + } + ], + "default": "Speed" + }, + "aspect_ratios_selection": { + "type": "string", + "title": "Aspect Ratios Selection", + "default": "1152*896" + }, + "image_number": { + "type": "integer", + "maximum": 32, + "minimum": 1, + "title": "Image Number", + "description": "Image number", + "default": 1 + }, + "image_seed": { + "type": "integer", + "title": "Image Seed", + "description": "Seed to generate image, -1 for random", + "default": -1 + }, + "sharpness": { + "type": "number", + "maximum": 30, + "minimum": 0, + "title": "Sharpness", + "default": 2 + }, + "guidance_scale": { + "type": "number", + "maximum": 30, + "minimum": 1, + "title": "Guidance Scale", + "default": 4 + }, + "base_model_name": { + "type": "string", + "title": "Base Model Name", + "default": "juggernautXL_v8Rundiffusion.safetensors" + }, + "refiner_model_name": { + "type": "string", + "title": "Refiner Model Name", + "default": "None" + }, + "refiner_switch": { + "type": "number", + "maximum": 1, + "minimum": 0.1, + "title": "Refiner Switch", + "description": "Refiner Switch At", + "default": 0.5 + }, + "loras": { + "items": { + "$ref": "#/components/schemas/Lora" + }, + "type": "array", + "title": "Loras", + "default": [ + { + "enabled": true, + "model_name": "sd_xl_offset_example-lora_1.0.safetensors", + "weight": 0.1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + }, + { + "enabled": true, + "model_name": "None", + "weight": 1 + } + ] + }, + "advanced_params": { + "allOf": [ + { + "$ref": "#/components/schemas/AdvancedParams" + } + ], + "default": { + "adaptive_cfg": 7, + "adm_scaler_end": 0.3, + "adm_scaler_negative": 0.8, + "adm_scaler_positive": 1.5, + "canny_high_threshold": 128, + "canny_low_threshold": 64, + "controlnet_softness": 0.25, + "debugging_cn_preprocessor": false, + "debugging_inpaint_preprocessor": false, + "disable_intermediate_results": false, + "disable_preview": false, + "disable_seed_increment": false, + "freeu_b1": 1.01, + "freeu_b2": 1.02, + "freeu_enabled": false, + "freeu_s1": 0.99, + "freeu_s2": 0.95, + "inpaint_disable_initial_latent": false, + "inpaint_engine": "v2.6", + "inpaint_erode_or_dilate": 0, + "inpaint_mask_upload_checkbox": false, + "inpaint_respective_field": 1, + "inpaint_strength": 1, + "invert_mask_checkbox": false, + "mixing_image_prompt_and_inpaint": false, + "mixing_image_prompt_and_vary_upscale": false, + "overwrite_height": -1, + "overwrite_step": -1, + "overwrite_switch": -1, + "overwrite_upscale_strength": -1, + "overwrite_vary_strength": -1, + "overwrite_width": -1, + "refiner_swap_method": "joint", + "sampler_name": "dpmpp_2m_sde_gpu", + "scheduler_name": "karras", + "skipping_cn_preprocessor": false + } + }, + "save_extension": { + "type": "string", + "title": "Save Extension", + "description": "Save extension, one of [png, jpg, webp]", + "default": "png" + }, + "read_wildcards_in_order": { + "type": "boolean", + "title": "Read Wildcards In Order", + "description": "Read wildcards in order", + "default": false + }, + "require_base64": { + "type": "boolean", + "title": "Require Base64", + "description": "Return base64 data of generated image", + "default": false + }, + "async_process": { + "type": "boolean", + "title": "Async Process", + "description": "Set to true will run async and return job info for retrieve generation result later", + "default": false + }, + "webhook_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Webhook Url", + "description": "Optional URL for a webhook callback. If provided, the system will send a POST request to this URL upon task completion or failure. This allows for asynchronous notification of task status.", + "default": "" + }, + "image_prompts": { + "items": { + "$ref": "#/components/schemas/ImagePromptJson" + }, + "type": "array", + "title": "Image Prompts", + "default": [] + } + }, + "type": "object", + "title": "Text2ImgRequestWithPrompt", + "description": "text to image request with prompt" + }, + "UpscaleOrVaryMethod": { + "type": "string", + "enum": [ + "Vary (Subtle)", + "Vary (Strong)", + "Upscale (1.5x)", + "Upscale (2x)", + "Upscale (Fast 2x)", + "Upscale (Custom)" + ], + "title": "UpscaleOrVaryMethod", + "description": "Upscale or Vary method" + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": "array", + "title": "Location" + }, + "msg": { + "type": "string", + "title": "Message" + }, + "type": { + "type": "string", + "title": "Error Type" + } + }, + "type": "object", + "required": [ + "loc", + "msg", + "type" + ], + "title": "ValidationError" + } + }, + "securitySchemes": { + "APIKeyHeader": { + "type": "apiKey", + "in": "header", + "name": "X-API-KEY" + } + } + } +} \ No newline at end of file diff --git a/examples/examples_v1.py b/examples/examples_v1.py index 03d07cc..864e5bd 100644 --- a/examples/examples_v1.py +++ b/examples/examples_v1.py @@ -3,7 +3,6 @@ """ import json import os -import base64 import requests @@ -12,7 +11,6 @@ class Config: Config Attributes: fooocus_host (str): Fooocus API host - text2img_ip (str): Text to Image with IP img_upscale (str): Upscale or Vary inpaint_outpaint (str): Inpaint or Outpaint img_prompt (str): Image Prompt diff --git a/fooocusapi/models/common/base.py b/fooocusapi/models/common/base.py index 7423e46..f276141 100644 --- a/fooocusapi/models/common/base.py +++ b/fooocusapi/models/common/base.py @@ -39,7 +39,10 @@ class Lora(BaseModel): for lora in default_loras: if lora[0] != 'None': default_loras_model.append( - Lora(enabled=lora[0], model_name=lora[1], weight=lora[2]) + Lora( + enabled=lora[0], + model_name=lora[1], + weight=lora[2]) ) default_loras_json = LoraList.dump_json(default_loras_model) @@ -143,7 +146,8 @@ def outpaint_selections_parser(outpaint_selections: str) -> List[OutpaintExpansi outpaint_selections_arr.append(expansion) except ValueError: errs = InitErrorDetails( - type='enum', loc=['outpaint_selections'], + type='enum', + loc=tuple('outpaint_selections'), input=outpaint_selections, ctx={ 'expected': "str, comma separated Left, Right, Top, Bottom" @@ -166,6 +170,9 @@ def image_prompt_parser(image_prompts_config: List[Tuple]) -> List[ImagePrompt]: return [] for config in image_prompts_config: cn_img, cn_stop, cn_weight, cn_type = config - image_prompts.append(ImagePrompt(cn_img=cn_img, cn_stop=cn_stop, - cn_weight=cn_weight, cn_type=cn_type)) + image_prompts.append(ImagePrompt( + cn_img=cn_img, + cn_stop=cn_stop, + cn_weight=cn_weight, + cn_type=cn_type)) return image_prompts diff --git a/fooocusapi/utils/file_utils.py b/fooocusapi/utils/file_utils.py index 77a51ff..7ba7cf4 100644 --- a/fooocusapi/utils/file_utils.py +++ b/fooocusapi/utils/file_utils.py @@ -29,8 +29,11 @@ STATIC_SERVER_BASE = 'http://127.0.0.1:8888/files/' -def save_output_file(img: np.ndarray, image_meta: dict = None, - image_name: str = '', extension: str = 'png') -> str: +def save_output_file( + img: np.ndarray, + image_meta: dict = None, + image_name: str = '', + extension: str = 'png') -> str: """ Save np image to file Args: diff --git a/main.py b/main.py index dc16519..360c4a9 100644 --- a/main.py +++ b/main.py @@ -137,7 +137,13 @@ def prepare_environments(args) -> bool: def pre_setup(): + """ + Pre setup, for replicate + """ class Args(object): + """ + Arguments object + """ host = "127.0.0.1" port = 8888 base_url = None @@ -163,8 +169,6 @@ class Args(object): install_dependents(arguments.skip_pip) - import fooocusapi.args as _ - prepare_environments(arguments) # Start task schedule thread