@stable-canvas/sd-webui-a1111-client
Version:
API client for AUTOMATIC1111/stable-diffusion-webui for Node.js and Browser.
5,629 lines • 165 kB
TypeScript
type ApiRequestOptions = {
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
readonly url: string;
readonly path?: Record<string, any>;
readonly cookies?: Record<string, any>;
readonly headers?: Record<string, any>;
readonly query?: Record<string, any>;
readonly formData?: Record<string, any>;
readonly body?: any;
readonly mediaType?: string;
readonly responseHeader?: string;
readonly errors?: Record<number, string>;
};
declare class CancelError extends Error {
constructor(message: string);
get isCancelled(): boolean;
}
interface OnCancel {
readonly isResolved: boolean;
readonly isRejected: boolean;
readonly isCancelled: boolean;
(cancelHandler: () => void): void;
}
declare class CancelablePromise<T> implements Promise<T> {
#private;
constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: OnCancel) => void);
get [Symbol.toStringTag](): string;
then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
catch<TResult = never>(onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
finally(onFinally?: (() => void) | null): Promise<T>;
cancel(): void;
get isCancelled(): boolean;
}
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
type Headers = Record<string, string>;
type OpenAPIConfig = {
BASE: string;
VERSION: string;
WITH_CREDENTIALS: boolean;
CREDENTIALS: 'include' | 'omit' | 'same-origin';
TOKEN?: string | Resolver<string> | undefined;
USERNAME?: string | Resolver<string> | undefined;
PASSWORD?: string | Resolver<string> | undefined;
HEADERS?: Headers | Resolver<Headers> | undefined;
ENCODE_PATH?: ((path: string) => string) | undefined;
};
declare const OpenAPI: OpenAPIConfig;
declare abstract class BaseHttpRequest {
readonly config: OpenAPIConfig;
constructor(config: OpenAPIConfig);
abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
}
type Body_detect_controlnet_detect_post = {
controlnet_module?: string;
controlnet_input_images?: Array<string>;
controlnet_processor_res?: number;
controlnet_threshold_a?: number;
controlnet_threshold_b?: number;
controlnet_masks?: Array<string>;
low_vram?: boolean;
};
type Body_rembg_remove_rembg_post = {
input_image?: string;
model?: string;
return_mask?: boolean;
alpha_matting?: boolean;
alpha_matting_foreground_threshold?: number;
alpha_matting_background_threshold?: number;
alpha_matting_erode_size?: number;
};
type Body_upload_file_upload_post = {
files: Array<Blob>;
};
type CreateResponse = {
/**
* Response string from create embedding or hypernetwork task.
*/
info: string;
};
type EmbeddingItem = {
/**
* The number of steps that were used to train this embedding, if available
*/
step?: number;
/**
* The hash of the checkpoint this embedding was trained on, if available
*/
sd_checkpoint?: string;
/**
* The name of the checkpoint this embedding was trained on, if available. Note that this is the name that was used by the trainer; for a stable identifier, use `sd_checkpoint` instead
*/
sd_checkpoint_name?: string;
/**
* The length of each individual vector in the embedding
*/
shape: number;
/**
* The number of vectors in the embedding
*/
vectors: number;
};
type EmbeddingsResponse = {
/**
* Embeddings loaded for the current model
*/
loaded: Record<string, EmbeddingItem>;
/**
* Embeddings skipped for the current model (likely due to architecture incompatibility)
*/
skipped: Record<string, EmbeddingItem>;
};
type Estimation = {
msg?: string;
rank?: number;
queue_size: number;
avg_event_process_time?: number;
avg_event_concurrent_process_time?: number;
rank_eta?: number;
queue_eta: number;
};
type ExtensionItem = {
/**
* Extension name
*/
name: string;
/**
* Extension Repository URL
*/
remote: string;
/**
* Extension Repository Branch
*/
branch: string;
/**
* Extension Repository Commit Hash
*/
commit_hash: string;
/**
* Extension Version
*/
version: string;
/**
* Extension Repository Commit Date
*/
commit_date: string;
/**
* Flag specifying whether this extension is enabled
*/
enabled: boolean;
};
type FileData = {
/**
* Base64 representation of the file
*/
data: string;
name: string;
};
type ExtrasBatchImagesRequest = {
/**
* Sets the resize mode: 0 to upscale by upscaling_resize amount, 1 to upscale up to upscaling_resize_h x upscaling_resize_w.
*/
resize_mode?: 0 | 1;
/**
* Should the backend return the generated image?
*/
show_extras_results?: boolean;
/**
* Sets the visibility of GFPGAN, values should be between 0 and 1.
*/
gfpgan_visibility?: number;
/**
* Sets the visibility of CodeFormer, values should be between 0 and 1.
*/
codeformer_visibility?: number;
/**
* Sets the weight of CodeFormer, values should be between 0 and 1.
*/
codeformer_weight?: number;
/**
* By how much to upscale the image, only used when resize_mode=0.
*/
upscaling_resize?: number;
/**
* Target width for the upscaler to hit. Only used when resize_mode=1.
*/
upscaling_resize_w?: number;
/**
* Target height for the upscaler to hit. Only used when resize_mode=1.
*/
upscaling_resize_h?: number;
/**
* Should the upscaler crop the image to fit in the chosen size?
*/
upscaling_crop?: boolean;
/**
* The name of the main upscaler to use, it has to be one of this list:
*/
upscaler_1?: string;
/**
* The name of the secondary upscaler to use, it has to be one of this list:
*/
upscaler_2?: string;
/**
* Sets the visibility of secondary upscaler, values should be between 0 and 1.
*/
extras_upscaler_2_visibility?: number;
/**
* Should the upscaler run before restoring faces?
*/
upscale_first?: boolean;
/**
* List of images to work on. Must be Base64 strings
*/
imageList: Array<FileData>;
};
type ExtrasBatchImagesResponse = {
/**
* A series of HTML tags containing the process info.
*/
html_info: string;
/**
* The generated images in base64 format.
*/
images: Array<string>;
};
type ExtrasSingleImageRequest = {
/**
* Sets the resize mode: 0 to upscale by upscaling_resize amount, 1 to upscale up to upscaling_resize_h x upscaling_resize_w.
*/
resize_mode?: 0 | 1;
/**
* Should the backend return the generated image?
*/
show_extras_results?: boolean;
/**
* Sets the visibility of GFPGAN, values should be between 0 and 1.
*/
gfpgan_visibility?: number;
/**
* Sets the visibility of CodeFormer, values should be between 0 and 1.
*/
codeformer_visibility?: number;
/**
* Sets the weight of CodeFormer, values should be between 0 and 1.
*/
codeformer_weight?: number;
/**
* By how much to upscale the image, only used when resize_mode=0.
*/
upscaling_resize?: number;
/**
* Target width for the upscaler to hit. Only used when resize_mode=1.
*/
upscaling_resize_w?: number;
/**
* Target height for the upscaler to hit. Only used when resize_mode=1.
*/
upscaling_resize_h?: number;
/**
* Should the upscaler crop the image to fit in the chosen size?
*/
upscaling_crop?: boolean;
/**
* The name of the main upscaler to use, it has to be one of this list:
*/
upscaler_1?: string;
/**
* The name of the secondary upscaler to use, it has to be one of this list:
*/
upscaler_2?: string;
/**
* Sets the visibility of secondary upscaler, values should be between 0 and 1.
*/
extras_upscaler_2_visibility?: number;
/**
* Should the upscaler run before restoring faces?
*/
upscale_first?: boolean;
/**
* Image to work on, must be a Base64 string containing the image's data.
*/
image?: string;
};
type ExtrasSingleImageResponse = {
/**
* A series of HTML tags containing the process info.
*/
html_info: string;
/**
* The generated image in base64 format.
*/
image?: string;
};
type FaceRestorerItem = {
name: string;
cmd_dir?: string;
};
type Flags = {
/**
* ==SUPPRESS==
*/
'f'?: boolean;
/**
* launch.py argument: download updates for all extensions when starting the program
*/
update_all_extensions?: boolean;
/**
* launch.py argument: do not check python version
*/
skip_python_version_check?: boolean;
/**
* launch.py argument: do not check if CUDA is able to work properly
*/
skip_torch_cuda_test?: boolean;
/**
* launch.py argument: install the appropriate version of xformers even if you have some version already installed
*/
reinstall_xformers?: boolean;
/**
* launch.py argument: install the appropriate version of torch even if you have some version already installed
*/
reinstall_torch?: boolean;
/**
* launch.py argument: check for updates at startup
*/
update_check?: boolean;
/**
* launch.py argument: configure server for testing
*/
test_server?: boolean;
/**
* launch.py argument: print a detailed log of what's happening at startup
*/
log_startup?: boolean;
/**
* launch.py argument: skip all environment preparation
*/
skip_prepare_environment?: boolean;
/**
* launch.py argument: skip installation of packages
*/
skip_install?: boolean;
/**
* launch.py argument: dump limited sysinfo file (without information about extensions, options) to disk and quit
*/
dump_sysinfo?: boolean;
/**
* log level; one of: CRITICAL, ERROR, WARNING, INFO, DEBUG
*/
loglevel?: string;
/**
* do not download CLIP model even if it's not included in the checkpoint
*/
do_not_download_clip?: boolean;
/**
* base path where all user data is stored
*/
data_dir?: string;
/**
* base path where models are stored; overrides --data-dir
*/
models_dir?: string;
/**
* path to config which constructs model
*/
config?: string;
/**
* path to checkpoint of stable diffusion model; if specified, this checkpoint will be added to the list of checkpoints and loaded
*/
ckpt?: string;
/**
* Path to directory with stable diffusion checkpoints
*/
ckpt_dir?: string;
/**
* Path to directory with VAE files
*/
vae_dir?: string;
/**
* GFPGAN directory
*/
gfpgan_dir?: string;
/**
* GFPGAN model file name
*/
gfpgan_model?: string;
/**
* do not switch the model to 16-bit floats
*/
no_half?: boolean;
/**
* do not switch the VAE model to 16-bit floats
*/
no_half_vae?: boolean;
/**
* do not hide progressbar in gradio UI (we hide it because it slows down ML if you have hardware acceleration in browser)
*/
no_progressbar_hiding?: boolean;
/**
* does not do anything
*/
max_batch_count?: number;
/**
* embeddings directory for textual inversion (default: embeddings)
*/
embeddings_dir?: string;
/**
* directory with textual inversion templates
*/
textual_inversion_templates_dir?: string;
/**
* hypernetwork directory
*/
hypernetwork_dir?: string;
/**
* localizations directory
*/
localizations_dir?: string;
/**
* allow custom script execution from webui
*/
allow_code?: boolean;
/**
* enable stable diffusion model optimizations for sacrificing a little speed for low VRM usage
*/
medvram?: boolean;
/**
* enable --medvram optimization just for SDXL models
*/
medvram_sdxl?: boolean;
/**
* enable stable diffusion model optimizations for sacrificing a lot of speed for very low VRM usage
*/
lowvram?: boolean;
/**
* load stable diffusion checkpoint weights to VRAM instead of RAM
*/
lowram?: boolean;
/**
* does not do anything
*/
always_batch_cond_uncond?: boolean;
/**
* does not do anything.
*/
unload_gfpgan?: boolean;
/**
* evaluate at this precision
*/
precision?: string;
/**
* upcast sampling. No effect with --no-half. Usually produces similar results to --no-half with better performance while using less memory.
*/
upcast_sampling?: boolean;
/**
* use share=True for gradio and make the UI accessible through their site
*/
share?: boolean;
/**
* ngrok authtoken, alternative to gradio --share
*/
ngrok?: string;
/**
* does not do anything.
*/
ngrok_region?: string;
/**
* The options to pass to ngrok in JSON format, e.g.: '{"authtoken_from_env":true, "basic_auth":"user:password", "oauth_provider":"google", "oauth_allow_emails":"user@asdf.com"}'
*/
ngrok_options?: Record<string, any>;
/**
* enable extensions tab regardless of other options
*/
enable_insecure_extension_access?: boolean;
/**
* Path to directory with codeformer model file(s).
*/
codeformer_models_path?: string;
/**
* Path to directory with GFPGAN model file(s).
*/
gfpgan_models_path?: string;
/**
* Path to directory with ESRGAN model file(s).
*/
esrgan_models_path?: string;
/**
* Path to directory with BSRGAN model file(s).
*/
bsrgan_models_path?: string;
/**
* Path to directory with RealESRGAN model file(s).
*/
realesrgan_models_path?: string;
/**
* Path to directory with DAT model file(s).
*/
dat_models_path?: string;
/**
* Path to directory with CLIP model file(s).
*/
clip_models_path?: string;
/**
* enable xformers for cross attention layers
*/
xformers?: boolean;
/**
* enable xformers for cross attention layers regardless of whether the checking code thinks you can run it; do not make bug reports if this fails to work
*/
force_enable_xformers?: boolean;
/**
* enable xformers with Flash Attention to improve reproducibility (supported for SD2.x or variant only)
*/
xformers_flash_attention?: boolean;
/**
* does not do anything
*/
deepdanbooru?: boolean;
/**
* prefer Doggettx's cross-attention layer optimization for automatic choice of optimization
*/
opt_split_attention?: boolean;
/**
* prefer memory efficient sub-quadratic cross-attention layer optimization for automatic choice of optimization
*/
opt_sub_quad_attention?: boolean;
/**
* query chunk size for the sub-quadratic cross-attention layer optimization to use
*/
sub_quad_q_chunk_size?: number;
/**
* kv chunk size for the sub-quadratic cross-attention layer optimization to use
*/
sub_quad_kv_chunk_size?: string;
/**
* the percentage of VRAM threshold for the sub-quadratic cross-attention layer optimization to use chunking
*/
sub_quad_chunk_threshold?: string;
/**
* prefer InvokeAI's cross-attention layer optimization for automatic choice of optimization
*/
opt_split_attention_invokeai?: boolean;
/**
* prefer older version of split attention optimization for automatic choice of optimization
*/
opt_split_attention_v1?: boolean;
/**
* prefer scaled dot product cross-attention layer optimization for automatic choice of optimization; requires PyTorch 2.*
*/
opt_sdp_attention?: boolean;
/**
* prefer scaled dot product cross-attention layer optimization without memory efficient attention for automatic choice of optimization, makes image generation deterministic; requires PyTorch 2.*
*/
opt_sdp_no_mem_attention?: boolean;
/**
* prefer no cross-attention layer optimization for automatic choice of optimization
*/
disable_opt_split_attention?: boolean;
/**
* do not check if produced images/latent spaces have nans; useful for running without a checkpoint in CI
*/
disable_nan_check?: boolean;
/**
* use CPU as torch device for specified modules
*/
use_cpu?: Array<any>;
/**
* use Intel XPU as torch device
*/
use_ipex?: boolean;
/**
* disable an optimization that reduces RAM use when loading a model
*/
disable_model_loading_ram_optimization?: boolean;
/**
* launch gradio with 0.0.0.0 as server name, allowing to respond to network requests
*/
listen?: boolean;
/**
* launch gradio with given server port, you need root/admin rights for ports < 1024, defaults to 7860 if available
*/
port?: string;
/**
* does not do anything
*/
show_negative_prompt?: boolean;
/**
* filename to use for ui configuration
*/
ui_config_file?: string;
/**
* hide directory configuration from webui
*/
hide_ui_dir_config?: boolean;
/**
* disable editing of all settings globally
*/
freeze_settings?: boolean;
/**
* disable editing settings in specific sections of the settings page by specifying a comma-delimited list such like "saving-images,upscaling". The list of setting names can be found in the modules/shared_options.py file
*/
freeze_settings_in_sections?: string;
/**
* disable editing of individual settings by specifying a comma-delimited list like "samples_save,samples_format". The list of setting names can be found in the config.json file
*/
freeze_specific_settings?: string;
/**
* filename to use for ui settings
*/
ui_settings_file?: string;
/**
* launch gradio with --debug option
*/
gradio_debug?: boolean;
/**
* set gradio authentication like "username:password"; or comma-delimit multiple like "u1:p1,u2:p2,u3:p3"
*/
gradio_auth?: string;
/**
* set gradio authentication file path ex. "/path/to/auth/file" same auth format as --gradio-auth
*/
gradio_auth_path?: string;
/**
* does not do anything
*/
gradio_img2img_tool?: string;
/**
* does not do anything
*/
gradio_inpaint_tool?: string;
/**
* add path to gradio's allowed_paths, make it possible to serve files from it
*/
gradio_allowed_path?: Array<any>;
/**
* change memory type for stable diffusion to channels last
*/
opt_channelslast?: boolean;
/**
* path or wildcard path of styles files, allow multiple entries.
*/
styles_file?: Array<any>;
/**
* open the webui URL in the system's default browser upon launch
*/
autolaunch?: boolean;
/**
* launches the UI with light or dark theme
*/
theme?: string;
/**
* use textbox for seeds in UI (no up/down, but possible to input long seeds)
*/
use_textbox_seed?: boolean;
/**
* do not output progressbars to console
*/
disable_console_progressbars?: boolean;
/**
* does not do anything
*/
enable_console_prompts?: boolean;
/**
* Checkpoint to use as VAE; setting this argument disables all settings related to VAE
*/
vae_path?: string;
/**
* disable checking pytorch models for malicious code
*/
disable_safe_unpickle?: boolean;
/**
* use api=True to launch the API together with the webui (use --nowebui instead for only the API)
*/
api?: boolean;
/**
* Set authentication for API like "username:password"; or comma-delimit multiple like "u1:p1,u2:p2,u3:p3"
*/
api_auth?: string;
/**
* use api-log=True to enable logging of all API requests
*/
api_log?: boolean;
/**
* use api=True to launch the API instead of the webui
*/
nowebui?: boolean;
/**
* Don't load model to quickly launch UI
*/
ui_debug_mode?: boolean;
/**
* Select the default CUDA device to use (export CUDA_VISIBLE_DEVICES=0,1,etc might be needed before)
*/
device_id?: string;
/**
* Administrator rights
*/
administrator?: boolean;
/**
* Allowed CORS origin(s) in the form of a comma-separated list (no spaces)
*/
cors_allow_origins?: string;
/**
* Allowed CORS origin(s) in the form of a single regular expression
*/
cors_allow_origins_regex?: string;
/**
* Partially enables TLS, requires --tls-certfile to fully function
*/
tls_keyfile?: string;
/**
* Partially enables TLS, requires --tls-keyfile to fully function
*/
tls_certfile?: string;
/**
* When passed, enables the use of self-signed certificates.
*/
disable_tls_verify?: string;
/**
* Sets hostname of server
*/
server_name?: string;
/**
* does not do anything
*/
gradio_queue?: boolean;
/**
* Disables gradio queue; causes the webpage to use http requests instead of websockets; was the default in earlier versions
*/
no_gradio_queue?: boolean;
/**
* Do not check versions of torch and xformers
*/
skip_version_check?: boolean;
/**
* disable sha256 hashing of checkpoints to help loading performance
*/
no_hashing?: boolean;
/**
* don't download SD1.5 model even if no model is found in --ckpt-dir
*/
no_download_sd_model?: boolean;
/**
* customize the subpath for gradio, use with reverse proxy
*/
subpath?: string;
/**
* does not do anything
*/
add_stop_route?: boolean;
/**
* enable server stop/restart/kill via api
*/
api_server_stop?: boolean;
/**
* set timeout_keep_alive for uvicorn
*/
timeout_keep_alive?: number;
/**
* prevent all extensions from running regardless of any other settings
*/
disable_all_extensions?: boolean;
/**
* prevent all extensions except built-in from running regardless of any other settings
*/
disable_extra_extensions?: boolean;
/**
* if load a model at web start, only take effect when --nowebui
*/
skip_load_model_at_start?: boolean;
/**
* allow any symbols except '/' in filenames. May conflict with your browser and file system
*/
unix_filenames_sanitization?: boolean;
/**
* maximal length of filenames of saved images. If you override it, it can conflict with your file system
*/
filenames_max_length?: number;
/**
* disable read prompt from last generation feature; settings this argument will not create '--data_path/params.txt' file
*/
no_prompt_history?: boolean;
/**
* Don't use adetailer models from huggingface
*/
ad_no_huggingface?: boolean;
/**
* sqlite file to use for the database connection. It can be abs or relative path(from base path) default: task_scheduler.sqlite3
*/
agent_scheduler_sqlite_file?: string;
/**
* Path to directory with ControlNet models
*/
controlnet_dir?: string;
/**
* Path to directory with annotator model directories
*/
controlnet_annotator_models_path?: string;
/**
* do not switch the ControlNet models to 16-bit floats (only needed without --no-half)
*/
no_half_controlnet?: string;
/**
* Cache size for controlnet preprocessor results
*/
controlnet_preprocessor_cache_size?: number;
/**
* Set the log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
*/
controlnet_loglevel?: string;
/**
* Enable memory tracing.
*/
controlnet_tracemalloc?: string;
/**
* Disable auto-update of openpose editor
*/
disable_openpose_editor_auto_update?: string;
/**
* Path to directory with LDSR model file(s).
*/
ldsr_models_path?: string;
/**
* Path to directory with Lora networks.
*/
lora_dir?: string;
/**
* Path to directory with LyCORIS networks (for backawards compatibility; can also use --lyco-dir).
*/
lyco_dir_backcompat?: string;
/**
* Path to directory with ScuNET model file(s).
*/
scunet_models_path?: string;
/**
* Path to directory with SwinIR model file(s).
*/
swinir_models_path?: string;
};
type TaskModel = {
id: string;
api_task_id?: string;
api_task_callback?: string;
name?: string;
/**
* Either txt2img or img2img
*/
type: string;
/**
* Either pending, running, done or failed
*/
status?: string;
/**
* The parameters of the task in JSON format
*/
params: Record<string, any>;
priority?: number;
position?: number;
/**
* The result of the task in JSON format
*/
result?: string;
bookmarked?: boolean;
/**
* The time when the task was created
*/
created_at?: string;
/**
* The time when the task was updated
*/
updated_at?: string;
};
type HistoryResponse = {
tasks: Array<TaskModel>;
total: number;
};
type HypernetworkItem = {
name: string;
path?: string;
};
type ImageToImageResponse = {
/**
* The generated image in base64 format.
*/
images?: Array<string>;
parameters: Record<string, any>;
info: string;
};
type Img2ImgApiTaskArgs = {
prompt?: string;
negative_prompt?: string;
styles?: Array<string>;
seed?: number;
subseed?: number;
subseed_strength?: number;
seed_resize_from_h?: number;
seed_resize_from_w?: number;
sampler_name?: string;
scheduler?: string;
batch_size?: number;
n_iter?: number;
steps?: number;
cfg_scale?: number;
width?: number;
height?: number;
restore_faces?: boolean;
tiling?: boolean;
do_not_save_samples?: boolean;
do_not_save_grid?: boolean;
eta?: number;
denoising_strength?: number;
s_min_uncond?: number;
s_churn?: number;
s_tmax?: number;
s_tmin?: number;
s_noise?: number;
override_settings?: Record<string, any>;
override_settings_restore_afterwards?: boolean;
refiner_checkpoint?: string;
refiner_switch_at?: number;
disable_extra_networks?: boolean;
firstpass_image?: string;
comments?: Record<string, any>;
init_images?: Array<any>;
resize_mode?: number;
image_cfg_scale?: number;
mask?: string;
mask_blur_x?: number;
mask_blur_y?: number;
mask_blur?: number;
mask_round?: boolean;
inpainting_fill?: number;
inpaint_full_res?: boolean;
inpaint_full_res_padding?: number;
inpainting_mask_invert?: number;
initial_noise_multiplier?: number;
latent_mask?: string;
force_task_id?: string;
include_init_images?: boolean;
script_name?: string;
script_args?: Array<any>;
alwayson_scripts?: Record<string, any>;
infotext?: string;
/**
* Custom checkpoint hash. If not specified, the latest checkpoint will be used.
*/
checkpoint?: string;
/**
* Custom VAE. If not specified, the current VAE will be used.
*/
vae?: string;
/**
* The callback URL to send the result to.
*/
callback_url?: string;
};
type InterrogateRequest = {
/**
* Image to work on, must be a Base64 string containing the image's data.
*/
image?: string;
/**
* The interrogate model used.
*/
model?: string;
};
type LatentUpscalerModeItem = {
name: string;
};
type MemoryResponse = {
/**
* System memory stats
*/
ram: Record<string, any>;
/**
* nVidia CUDA memory stats
*/
cuda: Record<string, any>;
};
type modules__api__models__ProgressResponse = {
/**
* The progress with a range of 0 to 1
*/
progress: number;
eta_relative: number;
/**
* The current state snapshot
*/
state: Record<string, any>;
/**
* The current image in base64 format. opts.show_progress_every_n_steps is required for this to work.
*/
current_image?: string;
/**
* Info text used by WebUI.
*/
textinfo?: string;
};
type modules__progress__ProgressResponse = {
active: boolean;
queued: boolean;
completed: boolean;
/**
* The progress with a range of 0 to 1
*/
progress?: number;
eta?: number;
/**
* Current live preview; a data: uri
*/
live_preview?: string;
/**
* Send this together with next request to prevent receiving same image
*/
id_live_preview?: number;
/**
* Info text used by WebUI.
*/
textinfo?: string;
};
type Options = {
/**
* Always save all generated images
*/
samples_save?: boolean;
/**
* File format for images
*/
samples_format?: string;
/**
* Images filename pattern
*/
samples_filename_pattern?: any;
/**
* Add number to filename when saving
*/
save_images_add_number?: boolean;
/**
* Saving the image to an existing file
*/
save_images_replace_action?: string;
/**
* Always save all generated image grids
*/
grid_save?: boolean;
/**
* File format for grids
*/
grid_format?: string;
/**
* Add extended info (seed, prompt) to filename when saving grid
*/
grid_extended_filename?: any;
/**
* Do not save grids consisting of one picture
*/
grid_only_if_multiple?: boolean;
/**
* Prevent empty spots in grid (when set to autodetect)
*/
grid_prevent_empty_spots?: any;
/**
* Archive filename pattern
*/
grid_zip_filename_pattern?: any;
/**
* Grid row count; use -1 for autodetect and 0 for it to be same as batch size
*/
n_rows?: number;
/**
* Font for image grids that have text
*/
font?: any;
/**
* Text color for image grids
*/
grid_text_active_color?: string;
/**
* Inactive text color for image grids
*/
grid_text_inactive_color?: string;
/**
* Background color for image grids
*/
grid_background_color?: string;
/**
* Save a copy of image before doing face restoration.
*/
save_images_before_face_restoration?: any;
/**
* Save a copy of image before applying highres fix.
*/
save_images_before_highres_fix?: any;
/**
* Save a copy of image before applying color correction to img2img results
*/
save_images_before_color_correction?: any;
/**
* For inpainting, save a copy of the greyscale mask
*/
save_mask?: any;
/**
* For inpainting, save a masked composite
*/
save_mask_composite?: any;
/**
* Quality for saved jpeg and avif images
*/
jpeg_quality?: number;
/**
* Use lossless compression for webp images
*/
webp_lossless?: any;
/**
* Save copy of large images as JPG
*/
export_for_4chan?: boolean;
/**
* File size limit for the above option, MB
*/
img_downscale_threshold?: number;
/**
* Width/height limit for the above option, in pixels
*/
target_side_length?: number;
/**
* Maximum image size
*/
img_max_size_mp?: number;
/**
* Use original name for output filename during batch process in extras tab
*/
use_original_name_batch?: boolean;
/**
* Use upscaler name as filename suffix in the extras tab
*/
use_upscaler_name_as_suffix?: any;
/**
* When using 'Save' button, only save a single selected image
*/
save_selected_only?: boolean;
/**
* Write log.csv when saving images using 'Save' button
*/
save_write_log_csv?: boolean;
/**
* Save init images when using img2img
*/
save_init_img?: any;
/**
* Directory for temporary images; leave empty for default
*/
temp_dir?: any;
/**
* Cleanup non-default temporary directory when starting webui
*/
clean_temp_dir_at_start?: any;
/**
* Save incomplete images
*/
save_incomplete_images?: any;
/**
* Play notification sound after image generation
*/
notification_audio?: boolean;
/**
* Notification sound volume
*/
notification_volume?: number;
/**
* Output directory for images; if empty, defaults to three directories below
*/
outdir_samples?: any;
/**
* Output directory for txt2img images
*/
outdir_txt2img_samples?: string;
/**
* Output directory for img2img images
*/
outdir_img2img_samples?: string;
/**
* Output directory for images from extras tab
*/
outdir_extras_samples?: string;
/**
* Output directory for grids; if empty, defaults to two directories below
*/
outdir_grids?: any;
/**
* Output directory for txt2img grids
*/
outdir_txt2img_grids?: string;
/**
* Output directory for img2img grids
*/
outdir_img2img_grids?: string;
/**
* Directory for saving images using the Save button
*/
outdir_save?: string;
/**
* Directory for saving init images when using img2img
*/
outdir_init_images?: string;
/**
* Save images to a subdirectory
*/
save_to_dirs?: boolean;
/**
* Save grids to a subdirectory
*/
grid_save_to_dirs?: boolean;
/**
* When using "Save" button, save images to a subdirectory
*/
use_save_to_dirs_for_ui?: any;
/**
* Directory name pattern
*/
directories_filename_pattern?: string;
/**
* Max prompt words for [prompt_words] pattern
*/
directories_max_prompt_words?: number;
/**
* Tile size for ESRGAN upscalers.
*/
ESRGAN_tile?: number;
/**
* Tile overlap for ESRGAN upscalers.
*/
ESRGAN_tile_overlap?: number;
/**
* Select which Real-ESRGAN models to show in the web UI.
*/
realesrgan_enabled_models?: Array<any>;
/**
* Select which DAT models to show in the web UI.
*/
dat_enabled_models?: Array<any>;
/**
* Tile size for DAT upscalers.
*/
DAT_tile?: number;
/**
* Tile overlap for DAT upscalers.
*/
DAT_tile_overlap?: number;
/**
* Upscaler for img2img
*/
upscaler_for_img2img?: any;
/**
* Automatically set the Scale by factor based on the name of the selected Upscaler.
*/
set_scale_by_when_changing_upscaler?: any;
/**
* Restore faces
*/
face_restoration?: any;
/**
* Face restoration model
*/
face_restoration_model?: string;
/**
* CodeFormer weight
*/
code_former_weight?: number;
/**
* Move face restoration model from VRAM into RAM after processing
*/
face_restoration_unload?: any;
/**
* Automatically open webui in browser on startup
*/
auto_launch_browser?: string;
/**
* Print prompts to console when generating with txt2img and img2img.
*/
enable_console_prompts?: any;
/**
* Show warnings in console.
*/
show_warnings?: any;
/**
* Show gradio deprecation warnings in console.
*/
show_gradio_deprecation_warnings?: boolean;
/**
* VRAM usage polls per second during generation.
*/
memmon_poll_rate?: number;
/**
* Always print all generation info to standard output
*/
samples_log_stdout?: any;
/**
* Add a second progress bar to the console that shows progress for an entire job.
*/
multiple_tqdm?: boolean;
/**
* Show a progress bar in the console for tiled upscaling.
*/
enable_upscale_progressbar?: boolean;
/**
* Print extra hypernetwork information to console.
*/
print_hypernet_extra?: any;
/**
* Load models/files in hidden directories
*/
list_hidden_files?: boolean;
/**
* Disable memmapping for loading .safetensors files.
*/
disable_mmap_load_safetensors?: any;
/**
* Prevent Stability-AI's ldm/sgm modules from printing noise to console.
*/
hide_ldm_prints?: boolean;
/**
* Print stack traces before exiting the program with ctrl+c.
*/
dump_stacks_on_signal?: any;
profiling_explanation?: string;
/**
* Enable profiling
*/
profiling_enable?: any;
/**
* Activities
*/
profiling_activities?: Array<any>;
/**
* Record shapes
*/
profiling_record_shapes?: boolean;
/**
* Profile memory
*/
profiling_profile_memory?: boolean;
/**
* Include python stack
*/
profiling_with_stack?: boolean;
/**
* Profile filename
*/
profiling_filename?: string;
/**
* Allow http:// and https:// URLs for input images in API
*/
api_enable_requests?: boolean;
/**
* Forbid URLs to local resources
*/
api_forbid_local_requests?: boolean;
/**
* User agent for requests
*/
api_useragent?: any;
/**
* Move VAE and CLIP to RAM when training if possible. Saves VRAM.
*/
unload_models_when_training?: any;
/**
* Turn on pin_memory for DataLoader. Makes training slightly faster but can increase memory usage.
*/
pin_memory?: any;
/**
* Saves Optimizer state as separate *.optim file. Training of embedding or HN can be resumed with the matching optim file.
*/
save_optimizer_state?: any;
/**
* Save textual inversion and hypernet settings to a text file whenever training starts.
*/
save_training_settings_to_txt?: boolean;
/**
* Filename word regex
*/
dataset_filename_word_regex?: any;
/**
* Filename join string
*/
dataset_filename_join_string?: string;
/**
* Number of repeats for a single input image per epoch; used only for displaying epoch number
*/
training_image_repeats_per_epoch?: number;
/**
* Save an csv containing the loss to log directory every N steps, 0 to disable
*/
training_write_csv_every?: number;
/**
* Use cross attention optimizations while training
*/
training_xattention_optimizations?: any;
/**
* Enable tensorboard logging.
*/
training_enable_tensorboard?: any;
/**
* Save generated images within tensorboard.
*/
training_tensorboard_save_images?: any;
/**
* How often, in seconds, to flush the pending tensorboard events and summaries to disk.
*/
training_tensorboard_flush_every?: number;
/**
* Stable Diffusion checkpoint
*/
sd_model_checkpoint?: any;
/**
* Maximum number of checkpoints loaded at the same time
*/
sd_checkpoints_limit?: number;
/**
* Only keep one model on device
*/
sd_checkpoints_keep_in_cpu?: boolean;
/**
* Checkpoints to cache in RAM
*/
sd_checkpoint_cache?: any;
/**
* SD Unet
*/
sd_unet?: string;
/**
* Enable quantization in K samplers for sharper and cleaner results. This may change existing seeds
*/
enable_quantization?: any;
/**
* Emphasis mode
*/
emphasis?: string;
/**
* Make K-diffusion samplers produce same images in a batch as when making a single image
*/
enable_batch_seeds?: boolean;
/**
* Prompt word wrap length limit
*/
comma_padding_backtrack?: number;
/**
* Clip skip SDXL
*/
sdxl_clip_l_skip?: any;
/**
* Clip skip
*/
CLIP_stop_at_last_layers?: number;
/**
* Upcast cross attention layer to float32
*/
upcast_attn?: any;
/**
* Random number generator source.
*/
randn_source?: string;
/**
* Tiling
*/
tiling?: any;
/**
* Hires fix: which pass to enable refiner for
*/
hires_fix_refiner_pass?: string;
/**
* crop top coordinate
*/
sdxl_crop_top?: any;
/**
* crop left coordinate
*/
sdxl_crop_left?: any;
/**
* SDXL low aesthetic score
*/
sdxl_refiner_low_aesthetic_score?: number;
/**
* SDXL high aesthetic score
*/
sdxl_refiner_high_aesthetic_score?: number;
/**
* Enable T5
*/
sd3_enable_t5?: any;
sd_vae_explanation?: string;
/**
* VAE Checkpoints to cache in RAM
*/
sd_vae_checkpoint_cache?: any;
/**
* SD VAE
*/
sd_vae?: string;
/**
* Selected VAE overrides per-model preferences
*/
sd_vae_overrides_per_model_preferences?: boolean;
/**
* Automatically convert VAE to bfloat16
*/
auto_vae_precision_bfloat16?: any;
/**
* Automatically revert VAE to 32-bit floats
*/
auto_vae_precision?: boolean;
/**
* VAE type for encode
*/
sd_vae_encode_method?: string;
/**
* VAE type for decode
*/
sd_vae_decode_method?: string;
/**
* Inpainting conditioning mask strength
*/
inpainting_mask_weight?: number;
/**
* Noise multiplier for img2img
*/
initial_noise_multiplier?: number;
/**
* Extra noise multiplier for img2img and hires fix
*/
img2img_extra_noise?: any;
/**
* Apply color correction to img2img results to match original colors.
*/
img2img_color_correction?: any;
/**
* With img2img, do exactly the amount of steps the slider specifies.
*/
img2img_fix_steps?: any;
/**
* With img2img, fill transparent parts of the input image with this color.
*/
img2img_background_color?: string;
/**
* Height of the image editor
*/
img2img_editor_height?: number;
/**
* Sketch initial brush color
*/
img2img_sketch_default_brush_color?: string;
/**
* Inpaint mask brush color
*/
img2img_inpaint_mask_brush_color?: string;
/**
* Inpaint sketch initial brush color
*/
img2img_inpaint_sketch_default_brush_color?: string;
/**
* For inpainting, include the greyscale mask in results for web
*/
return_mask?: any;
/**
* For inpainting, include masked composite in results for web
*/
return_mask_composite?: any;
/**
* Show the first N batch img2img results in UI
*/
img2img_batch_show_results_limit?: number;
/**
* Overlay original for inpaint
*/
overlay_inpaint?: boolean;
/**
* Cross attention optimization
*/
cross_attention_optimization?: string;
/**
* Negative Guidance minimum sigma
*/
s_min_uncond?: any;
/**
* Negative Guidance minimum sigma all steps
*/
s_min_uncond_all?: any;
/**
* Token merging ratio
*/
token_merging_ratio?: any;
/**
* Token merging ratio for img2img
*/
token_merging_ratio_img2img?: any;
/**
* Token merging ratio for high-res pass
*/
token_merging_ratio_hr?: any;
/**
* Pad prompt/negative prompt
*/
pad_cond_uncond?: any;
/**
* Pad prompt/negative prompt (v0)
*/
pad_cond_uncond_v0?: any;
/**
* Persistent cond cache
*/
persistent_cond_cache?: boolean;
/**
* Batch cond/uncond
*/
batch_cond_uncond?: boolean;
/**
* FP8 weight
*/
fp8_storage?: string;
/**
* Cache FP16 weight for LoRA
*/
cache_fp16_weight?: any;
/**
* Automatic backward compatibility
*/
auto_backcompat?: boolean;
/**
* Use old emphasis implementation. Can be useful to reproduce old seeds.
*/
use_old_emphasis_implementation?: any;
/**
* Use old karras scheduler sigmas (0.1 to 10).
*/
use_old_karras_scheduler_sigmas?: any;
/**
* Do not make DPM++ SDE deterministic across different batch sizes.
*/
no_dpmpp_sde_batch_determinism?: any;
/**
* For hires fix, use width/height sliders to set final resolution rather than first pass (disables Upscale by, Resize width/height to).
*/
use_old_hires_fix_width_height?: any;
/**
* For hires fix, calculate conds of second pass using extra networks of first pass.
*/
hires_fix_use_firstpass_conds?: any;
/**
* Use old prompt editing timelines.
*/
use_old_scheduling?: any;
/**
* Downcast model alphas_cumprod to fp16 before sampling. For reproducing old seeds.
*/
use_downcasted_alpha_bar?: any;
/**
* Switch to refiner by sampling steps instead of model timesteps. Old behavior for refiner.
*/
refiner_switch_by_sample_steps?: any;
/**
* Keep models in VRAM
*/
interrogate_keep_models_in_memory?: any;
/**
* Include ranks of model tags matches in results.
*/
interrogate_return_ranks?: any;
/**
* BLIP: num_beams
*/
interrogate_clip_num_beams?: number;
/**
* BLIP: minimum description length
*/
interrogate_clip_min_length?: number;
/**
* BLIP: maximum description length
*/
interrogate_clip_max_length?: number;
/**
* CLIP: maximum number of lines in text file
*/
interrogate_clip_dict_limit?: number;
/**
* CLIP: skip inquire categories
*/
interrogate_clip_skip_categories?: any;
/**
* deepbooru: score threshold
*/
interrogate_deepbooru_score_threshold?: number;
/**
* deepbooru: sort tags alphabetically
*/
deepbooru_sort_alpha?: boolean;
/**
* deepbooru: use spaces in tags
*/
deepbooru_use_spaces?: boolean;
/**
* deepbooru: escape (\) brackets
*/
deepbooru_escape?: boolean;
/**
* deepbooru: filter out those tags
*/
deepbooru_filter_tags?: any;
/**
* Show hidden directories
*/
extra_networks_show_hidden_directories?: boolean;
/**
* Add a '/' to the beginning of directory buttons
*/
extra_networks_dir_button_function?: any;
/**
* Show cards for models in hidden directories
*/
extra_networks_hidden_models?: string;
/**
* Default multiplier for extra networks
*/
extra_networks_default_multiplier?: number;
/**
* Card width for Extra Networks
*/
extra_networks_card_width?: any;
/**
* Card height for Extra Networks
*/
extra_networks_card_height?: any;
/**
* Card text scale
*/
extra_networks_card_text_scale?: number;
/**
* Show description on card
*/
extra_networks_card_show_desc?: boolean;
/**
* Treat card description as HTML
*/
extra_networks_card_description_is_html?: any;
/**
* Default order field for Extra Networks cards
*/
extra_networks_card_order_field?: string;
/**
* Default order for Extra Networks cards
*/
extra_networks_card_order?: string;
/**
* Extra Networks directory view style
*/
extra_networks_tree_view_style?: string;
/**
* Show the Extra Networks directory view by default
*/
extra_networks_tree_view_default_enabled?: boolean;
/**
* Default width for the Extra Networks directory tree view
*/
extra_networks_tree_view_default_width?: number;
/**
* Extra networks separator
*/
extra_networks_add_text_separator?: string;
/**
* Extra networks tab order
*/
ui_extra_networks_tab_reorder?: any;
/**
* Print a list of Textual Inversion embeddings when loading model
*/
textual_inversion_print_at_load?: any;
/**
* Add Textual Inversion hashes to infotext
*/
textual_inversion_add_hashes_to_infotext?: boolean;
/**
* Add hypernetwork to prompt
*/
sd_hypernetwork?: string;
/**
* Precision for (attention:1.1) when editing the prompt with Ctrl+up/down
*/
keyedit_precision_attention?: number;
/**
* Precision for <extra networks:0.9> when editing the prompt with Ctrl+up/down
*/
keyedit_precision_extra?: number;
/**
* Word delimiters when editing the prompt with Ctrl+up/down
*/
keyedit_delimiters?: string;
/**
* Ctrl+up/down whitespace delimiters
*/
keyedit_delimiters_whitespace?: Array<any>;
/**
* Alt+left/right moves prompt elements
*/
keyedit_move?: boolean;
/**
* Disable prompt token counters
*/
disable_token_counters?: any;
/**
* Count tokens of enabled styles
*/
include_styles_into_token_counters?: boolean;
/**
* Show grid in gallery
*/
return_grid?: boolean;
/**
* Do not show any images in gallery
*/
do_not_show_images?: any;
/**
* Full page image viewer: enable
*/
js_modal_lightbox?: boolean;
/**
* Full page image viewer: show images zoomed in by default
*/
js_modal_lightbox_initially_zoomed?: boolean;
/**
* Full page image viewer: navigate with gamepad
*/
js_modal_lightbox_gamepad?: any;
/**
* Full page image viewer: gamepad repeat period
*/
js_modal_lightbox_gamepad_repeat?: number;
/**
* Full page image viewer: control icon unfocused opacity
*/
sd_webui_modal_lightbox_icon_opacity?: number;
/**
* Full page image viewer: tool bar opacity
*/
sd_webui_modal_lightbox_toolbar_opacity?: number;
/**
* Gallery height
*/
gallery_height?: any;
/**
* What directory the [📂] button opens
*/
open_dir_button_choice?: string;
/**
* Compact prompt layout
*/
compact_prompt_box?: any;
/**
* Use dropdown for sampler selection instead of radio group
*/
samplers_in_dropdown?: boolean;
/**
* Show Width/Height and Batch sliders in same row
*/
dimensions_and_batch_together?: boolean;
/**
* Checkpoint dropdown: use filenames without paths
*/
sd_checkpoint_dropdown_use_short?: any;
/**
* Hires fix: show hires checkpoint and sampler selection
*/
hires_fix_show_sampler?: any;
/**
* Hires fix: show hires prompt and negative prompt
*/
hires_fix_show_prompts?: any;
/**
* Settings in txt2img hidden under Accordion
*/
txt2img_settings_accordion?: any;
/**
* Settings in img2img hidden under Accordion
*/
img2img_settings_accordion?: any;
/**
* Don't Interrupt in the middle
*/
interrupt_after_current?: boolean;
/**
* Localization
*/
localization?: string;
/**
* Quicksettings list
*/
quicksettings_list?: Array<any>;
/**
* UI tab order
*/
ui_tab_order?: any;
/**
* Hidden UI tabs
*/
hidden_tabs?: any;
/**
* UI item order for txt2img/img2img tabs
*/
ui_reorder_list?: any;
/**
* Gradio theme
*/
gradio_theme?: string;
/**
* Cache gradio themes locally
*/
gradio_themes_cache?: boolean;
/**
* Show generation progress in window title.
*/
show_progress_in_title?: boolean;
/**
* Send seed when sending prompt or image to other interface
*/
send_seed?: boolean;
/**
* Send size when sending prompt or image to another interface
*/
send_size?: boolean;
/**
* Reload UI scripts when using Reload UI option
*/
enable_reloading_ui_scripts?: any;
infotext_explanation?: string;
/**
* Write infotext to metadata of the generated image
*/
enable_pnginfo?: boolean;
/**
* Create a text file with infotext next to every generated image
*/
save_txt?: any;
/**
* Add model name to infotext
*/
add_model_name_to_info?: boolean;
/**
* Add model hash to infotext
*/
add_model_hash_to_info?: boolean;
/**
* Add VAE name to infotext
*/
add_vae_name_to_info?: boolean;
/**
* Add VAE hash to infotext
*/
add_vae_hash_to_info?: boolean;
/**
* Add user name to infotext when authenticated
*/
add_user_name_to_info?: any;
/**
* Add program version to infotext
*/
add_version_to_infotext?: boolean;
/**
* Disregard checkpoint information from pasted infotext
*/
disable_weights_auto_swap?: boolean;
/**
* Disregard fields from pasted infotext
*/
infotext_skip_pasting?: any;
/**
* Infer styles from prompts of pasted infotext
*/
infotext_styles?: string;
/**
* Show progressbar
*/
show_progressbar?: boolean;
/**
* Show live previews of the created image
*/
live_previews_enable?: boolean;
/**
* Live preview file format
*/
live_previews_image_format?: string;
/**
* Show previews of all images generated in a batch as a grid
*/
show_progress_grid?: boolean;
/**
* Live preview display period
*/
show_progress_every_n_steps?: number;
/**
* Live preview method
*/
show_progress_type?: string;
/**
* Allow Full live preview method with lowvram/medvram
*/
live_preview_allow_lowvram_full?: any;
/**
* Live preview subject
*/
live_preview_content?: string;
/**
* Progressbar and preview update period
*/
live_preview_refresh_period?: number;
/**
* Return image with chosen live preview method on interrupt
*/
live_preview_fast_interrupt?: any;
/**
* Show Live preview in full page image viewer
*/
js_live_preview_in_modal_lightbox?: any;
/**
* Prevent screen sleep during generation
*/
prevent_screen_sleep_during_generation?: boolean;
/**
* Hide samplers in user interface
*/
hide_samplers?: any;
/**
* Eta for DDIM
*/
eta_ddim?: any;
/**
* Eta for k-diffusion samplers
*/
eta_ancestral?: number;
/**
* img2img DDIM discretize
*/
ddim_discretize?: string;
/**
* sigma churn
*/
s_churn?: any;
/**
* sigma tmin
*/
s_tmin?: any;
/**
* sigma tmax
*/
s_tmax?: any;
/**
* sigma noise
*/
s_noise?: number;
/**
* sigma min
*/
sigma_min?: any;
/**
* sigma max
*/
sigma_max?: any;
/**
* rho
*/
rho?: any;
/**
* Eta noise seed delta
*/
eta_noise_seed_delta?: any;
/**
* Always discard next-to-last sigma
*/
always_discard_next_to_last_sigma?: any;
/**
* SGM noise multiplier
*/
sgm_noise_multiplier?: any;
/**
* UniPC variant
*/
uni_pc_variant?: string;
/**
* UniPC skip type
*/
uni_pc_skip_type?: string;
/**
* UniPC order
*/
uni_pc_order?: number;
/**
* UniPC lower order final
*/
uni_pc_lower_order_final?: boolean;
/**
* Noise schedule for sampling
*/
sd_noise_schedule?: string;
/**
* Ignore negative prompt during early sampling
*/
skip_early_cond?: any;
/**
* Beta scheduler - alpha
*/
beta_dist_alpha?: number;
/**
* Beta scheduler - beta
*/
beta_dist_beta?: number;
/**
* Enable postprocessing operations in txt2img and img2img tabs
*/
postprocessing_enable_in_main_ui?: any;
/**
* Disable postprocessing operations in extras tab
*/
postprocessing_disable_in_extras?: any;
/**
* Postprocessing operation order
*/
postprocessing_operation_order?: any;
/**
* Maximum number of images in upscaling cache
*/
upscaling_max_images_in_cache?: number;
/**
* Action for existing captions
*/
postprocessing_existing_caption_action?: string;
/**
* Disable these extensions
*/
disabled_extensions?: any;
/**
* Disable all extensions (preserves the list of disabled extensions)
*/
disable_all_extensions?: string;
/**
* Config state file to restore from, under 'config-states/' folder
*/
restore_config_state_file?: any;
/**
* SHA256 hash of the current checkpoint
*/
sd_checkpoint_hash?: any;
/**
* Add network to prompt
*/
sd_lora?: string;
/**
* When adding to prompt, refer to Lora by
*/
lora_preferred_name?: string;
/**
* Add Lora hashes to infotext
*/
lora_add_hashes_to_infotext?: boolean;
/**
* Add Lora name as TI hashes for bundled Textual Inversion
*/
lora_bundled_ti_to_infotext?: boolean;
/**
* Always show all networks on the Lora page
*/
lora_show_all?: any;
/**
* Hide networks of unknown versions for model versions
*/
lora_hide_unknown_for_versions?: any;
/**
* Number of Lora networks to keep cached in memory
*/
lora_in_memory_limit?: any;
/**
* Lora not found warning in console
*/
lora_not_found_warning_console?: any;
/**
* Lora not found warning popup in webui
*/
lora_not_found_gradio_warning?: any;
/**
* Lora/Networks: use old method that takes longer when you have multiple Loras active and produces same results as kohya-ss/sd-webui-additional-networks extension
*/
lora_functional?: any;
/**
* Zoom canvas
*/
canvas_hotkey_zoom?: string;
/**
* Adjust brush size
*/
canvas_hotkey_adjust?: string;
/**
* Shrink the brush size
*/
canvas_hotkey_shrink_brush?: string;
/**
* Enlarge the brush size
*/
canvas_hotkey_grow_brush?: string;
/**
* Moving the canvas
*/
canvas_hotkey_move?: string;
/**
* Fullscreen Mode, maximizes the picture so that it fits into the screen and stretches it to its full width
*/
canvas_hotkey_fullscreen?: string;
/**
* Reset zoom and canvas position
*/
canvas_hotkey_reset?: string;
/**
* Toggle overlap
*/
canvas_hotkey_overlap?: string;
/**
* Enable tooltip on the canvas
*/
canvas_show_tooltip?: boolean;
/**
* Automatically expands an image that does not fit completely in the canvas area, similar to manually pressing the S and R buttons
*/
canvas_auto_expand?: boolean;
/**
* Take the focus off the prompt when working with a canvas
*/
canvas_blur_prompt?: any;
/**
* Disable function that you don't use
*/
canvas_disabled_functions?: Array<any>;
settings_in_ui?: string;
/**
* Settings for txt2img
*/
extra_options_txt2img?: any;
/**
* Settings for img2img
*/
extra_options_img2img?: any;
/**
* Number of columns for added settings
*/
extra_options_cols?: number;
/**
* Place added settings into an accordion
*/
extra_options_accordion?: any;
};
type PNGInfoRequest = {
/**
* The base64 encoded PNG image
*/
image: string;
};
type PNGInfoResponse = {
/**
* A string with the parameters used to generate the image
*/
info: string;
/**
* A dictionary containing all the other fields the image had
*/
items: Record<string, any>;
/**
* A dictionary with parsed generation info fields
*/
parameters: Record<string, any>;
};
type Person = {
pose_keypoints_2d: Array<number>;
hand_right_keypoints_2d?: Array<number>;
hand_left_keypoints_2d?: Array<number>;
face_keypoints_2d?: Array<number>;
};
type PoseData = {
people: Array<Person>;
canvas_width: number;
canvas_height: number;
};
type PredictBody = {
session_hash?: string;
event_id?: string;
data: Array<any>;
event_data?: any;
fn_index?: number;
batched?: boolean;
request?: Record<string, any>;
};
type ProgressRequest = {
/**
* id of the task to get progress for
*/
id_task?: string;
/**
* id of last received last preview image
*/
id_live_preview?: number;
/**
* boolean flag indicating whether to include the live preview image
*/
live_preview?: boolean;
};
type PromptStyleItem = {
name: string;
prompt?: string;
negative_prompt?: string;
};
type QueueStatusResponse = {
/**
* The on progress task id
*/
current_task_id?: string;
/**
* The pending tasks in the queue
*/
pending_tasks: Array<TaskModel>;
/**
* The total pending tasks in the queue
*/
total_pending_tasks: number;
/**
* Whether the queue is paused
*/
paused: boolean;
};
type QueueTaskResponse = {
task_id: string;
};
type QuicksettingsHint = {
name: string;
label: string;
};
type RealesrganItem = {
name: string;
path?: string;
scale?: number;
};
type ResetBody = {
session_hash: string;
fn_index: number;
};
type SamplerItem = {
name: string;
aliases: Array<string>;
options: Record<string, string>;
};
type SchedulerItem = {
name: string;
label: string;
aliases?: Array<string>;
default_rho?: number;
need_inner_model?: boolean;
};
type ScriptArg = {
/**
* Name of the argument in UI
*/
label?: string;
/**
* Default value of the argument
*/
value?: any;
/**
* Minimum allowed value for the argumentin UI
*/
minimum?: any;
/**
* Maximum allowed value for the argumentin UI
*/
maximum?: any;
/**
* Step for changing value of the argumentin UI
*/
step?: any;
/**
* Possible values for the argument
*/
choices?: Array<string>;
};
type ScriptInfo = {
/**
* Script name
*/
name?: string;
/**
* Flag specifying whether this script is an alwayson script
*/
is_alwayson?: boolean;
/**
* Flag specifying whether this script is an img2img script
*/
is_img2img?: boolean;
/**
* List of script's arguments
*/
args: Array<ScriptArg>;
};
type ScriptsList = {
/**
* Titles of scripts (txt2img)
*/
txt2img?: Array<any>;
/**
* Titles of scripts (img2img)
*/
img2img?: Array<any>;
};
type SDModelItem = {
title: string;
model_name: string;
hash?: string;
sha256?: string;
filename: string;
config?: string;
};
type SDVaeItem = {
model_name: string;
filename: string;
};
type StableDiffusionProcessingImg2Img = {
prompt?: string;
negative_prompt?: string;
styles?: Array<string>;
seed?: number;
subseed?: number;
subseed_strength?: number;
seed_resize_from_h?: number;
seed_resize_from_w?: number;
sampler_name?: string;
scheduler?: string;
batch_size?: number;
n_iter?: number;
steps?: number;
cfg_scale?: number;
width?: number;
height?: number;
restore_faces?: boolean;
tiling?: boolean;
do_not_save_samples?: boolean;
do_not_save_grid?: boolean;
eta?: number;
denoising_strength?: number;
s_min_uncond?: number;
s_churn?: number;
s_tmax?: number;
s_tmin?: number;
s_noise?: number;
override_settings?: Record<string, any>;
override_settings_restore_afterwards?: boolean;
refiner_checkpoint?: string;
refiner_switch_at?: number;
disable_extra_networks?: boolean;
firstpass_image?: string;
comments?: Record<string, any>;
init_images?: Array<any>;
resize_mode?: number;
image_cfg_scale?: number;
mask?: string;
mask_blur_x?: number;
mask_blur_y?: number;
mask_blur?: number;
mask_round?: boolean;
inpainting_fill?: number;
inpaint_full_res?: boolean;
inpaint_full_res_padding?: number;
inpainting_mask_invert?: number;
initial_noise_multiplier?: number;
latent_mask?: string;
force_task_id?: string;
sampler_index?: string;
include_init_images?: boolean;
script_name?: string;
script_args?: Array<any>;
send_images?: boolean;
save_images?: boolean;
alwayson_scripts?: Record<string, any>;
infotext?: string;
};
type StableDiffusionProcessingTxt2Img = {
prompt?: string;
negative_prompt?: string;
styles?: Array<string>;
seed?: number;
subseed?: number;
subseed_strength?: number;
seed_resize_from_h?: number;
seed_resize_from_w?: number;
sampler_name?: string;
scheduler?: string;
batch_size?: number;
n_iter?: number;
steps?: number;
cfg_scale?: number;
width?: number;
height?: number;
restore_faces?: boolean;
tiling?: boolean;
do_not_save_samples?: boolean;
do_not_save_grid?: boolean;
eta?: number;
denoising_strength?: number;
s_min_uncond?: number;
s_churn?: number;
s_tmax?: number;
s_tmin?: number;
s_noise?: number;
override_settings?: Record<string, any>;
override_settings_restore_afterwards?: boolean;
refiner_checkpoint?: string;
refiner_switch_at?: number;
disable_extra_networks?: boolean;
firstpass_image?: string;
comments?: Record<string, any>;
enable_hr?: boolean;
firstphase_width?: number;
firstphase_height?: number;
hr_scale?: number;
hr_upscaler?: string;
hr_second_pass_steps?: number;
hr_resize_x?: number;
hr_resize_y?: number;
hr_checkpoint_name?: string;
hr_sampler_name?: string;
hr_scheduler?: string;
hr_prompt?: string;
hr_negative_prompt?: string;
force_task_id?: string;
sampler_index?: string;
script_name?: string;
script_args?: Array<any>;
send_images?: boolean;
save_images?: boolean;
alwayson_scripts?: Record<string, any>;
infotext?: string;
};
type StringRequestBody = {
content: string;
};
type TextToImageResponse = {
/**
* The generated image in base64 format.
*/
images?: Array<string>;
parameters: Record<string, any>;
info: string;
};
type TrainResponse = {
/**
* Response string from train embedding or hypernetwork task.
*/
info: string;
};
type Txt2ImgApiTaskArgs = {
prompt?: string;
negative_prompt?: string;
styles?: Array<string>;
seed?: number;
subseed?: number;
subseed_strength?: number;
seed_resize_from_h?: number;
seed_resize_from_w?: number;
sampler_name?: string;
scheduler?: string;
batch_size?: number;
n_iter?: number;
steps?: number;
cfg_scale?: number;
width?: number;
height?: number;
restore_faces?: boolean;
tiling?: boolean;
do_not_save_samples?: boolean;
do_not_save_grid?: boolean;
eta?: number;
denoising_strength?: number;
s_min_uncond?: number;
s_churn?: number;
s_tmax?: number;
s_tmin?: number;
s_noise?: number;
override_settings?: Record<string, any>;
override_settings_restore_afterwards?: boolean;
refiner_checkpoint?: string;
refiner_switch_at?: number;
disable_extra_networks?: boolean;
firstpass_image?: string;
comments?: Record<string, any>;
enable_hr?: boolean;
firstphase_width?: number;
firstphase_height?: number;
hr_scale?: number;
hr_upscaler?: string;
hr_second_pass_steps?: number;
hr_resize_x?: number;
hr_resize_y?: number;
hr_checkpoint_name?: string;
hr_sampler_name?: string;
hr_scheduler?: string;
hr_prompt?: string;
hr_negative_prompt?: string;
force_task_id?: string;
script_name?: string;
script_args?: Array<any>;
alwayson_scripts?: Record<string, any>;
infotext?: string;
/**
* Custom checkpoint hash. If not specified, the latest checkpoint will be used.
*/
checkpoint?: string;
/**
* Custom VAE. If not specified, the current VAE will be used.
*/
vae?: string;
/**
* The callback URL to send the result to.
*/
callback_url?: string;
};
type UpdateTaskArgs = {
name?: string;
checkpoint?: string;
/**
* The parameters of the task in JSON format
*/
params?: Record<string, any>;
};
type UpscalerItem = {
name: string;
model_name?: string;
model_path?: string;
model_url?: string;
scale?: number;
};
type UseCountListRequest = {
tagNames: Array<string>;
tagTypes: Array<number>;
neg?: boolean;
};
declare class DefaultService {
readonly httpRequest: BaseHttpRequest;
constructor(httpRequest: BaseHttpRequest);
/**
* Get Current User
* @returns string Successful Response
* @throws ApiError
*/
getCurrentUserUserGet(): CancelablePromise<string>;
/**
* Get Current User
* @returns string Successful Response
* @throws ApiError
*/
getCurrentUserUserGet1(): CancelablePromise<string>;
/**
* App Id
* @returns any Successful Response
* @throws ApiError
*/
appIdAppIdGet(): CancelablePromise<Record<string, any>>;
/**
* App Id
* @returns any Successful Response
* @throws ApiError
*/
appIdAppIdGet1(): CancelablePromise<Record<string, any>>;
/**
* Api Info
* @returns any Successful Response
* @throws ApiError
*/
apiInfoInfoGet({ serialize, }: {
serialize?: boolean;
}): CancelablePromise<any>;
/**
* Build Resource
* @returns any Successful Response
* @throws ApiError
*/
buildResourceAssetsPathGet({ path, }: {
path: string;
}): CancelablePromise<any>;
/**
* Reverse Proxy
* @returns any Successful Response
* @throws ApiError
*/
reverseProxyProxyUrlPathGet({ urlPath, }: {
urlPath: string;
}): CancelablePromise<any>;
/**
* Reverse Proxy
* @returns any Successful Response
* @throws ApiError
*/
reverseProxyProxyUrlPathHead({ urlPath, }: {
urlPath: string;
}): CancelablePromise<any>;
/**
* Stream
* @returns any Successful Response
* @throws ApiError
*/
streamStreamSessionHashRunComponentIdGet({ sessionHash, run, componentId, }: {
sessionHash: string;
run: number;
componentId: number;
}): CancelablePromise<any>;
/**
* File Deprecated
* @returns any Successful Response
* @throws ApiError
*/
fileDeprecatedFilePathGet({ path, }: {
path: string;
}): CancelablePromise<any>;
/**
* Reset Iterator
* @returns any Successful Response
* @throws ApiError
*/
resetIteratorResetPost({ requestBody, }: {
requestBody: ResetBody;
}): CancelablePromise<any>;
/**
* Reset Iterator
* @returns any Successful Response
* @throws ApiError
*/
resetIteratorResetPost1({ requestBody, }: {
requestBody: ResetBody;
}): CancelablePromise<any>;
/**
* Predict
* @returns any Successful Response
* @throws ApiError
*/
predictApiApiNamePost({ apiName, requestBody, }: {
apiName: string;
requestBody: PredictBody;
}): CancelablePromise<any>;
/**
* Predict
* @returns any Successful Response
* @throws ApiError
*/
predictApiApiNamePost1({ apiName, requestBody, }: {
apiName: string;
requestBody: PredictBody;
}): CancelablePromise<any>;
/**
* Predict
* @returns any Successful Response
* @throws ApiError
*/
predictRunApiNamePost({ apiName, requestBody, }: {
apiName: string;
requestBody: PredictBody;
}): CancelablePromise<any>;
/**
* Predict
* @returns any Successful Response
* @throws ApiError
*/
predictRunApiNamePost1({ apiName, requestBody, }: {
apiName: string;
requestBody: PredictBody;
}): CancelablePromise<any>;
/**
* Get Queue Status
* @returns Estimation Successful Response
* @throws ApiError
*/
getQueueStatusQueueStatusGet(): CancelablePromise<Estimation>;
/**
* Upload File
* @returns any Successful Response
* @throws ApiError
*/
uploadFileUploadPost({ formData, }: {
formData: Body_upload_file_upload_post;
}): CancelablePromise<any>;
/**
* Get Pending Tasks
* @returns any Successful Response
* @throws ApiError
*/
getPendingTasksInternalPendingTasksGet(): CancelablePromise<any>;
/**
* Progressapi
* @returns modules__progress__ProgressResponse Successful Response
* @throws ApiError
*/
progressapiInternalProgressPost({ requestBody, }: {
requestBody: ProgressRequest;
}): CancelablePromise<modules__progress__ProgressResponse>;
/**
* Quicksettings Hint
* @returns QuicksettingsHint Successful Response
* @throws ApiError
*/
quicksettingsHintInternalQuicksettingsHintGet(): CancelablePromise<Array<QuicksettingsHint>>;
/**
* <Lambda>
* @returns any Successful Response
* @throws ApiError
*/
lambdaInternalPingGet(): CancelablePromise<any>;
/**
* <Lambda>
* @returns any Successful Response
* @throws ApiError
*/
lambdaInternalProfileStartupGet(): CancelablePromise<any>;
/**
* Download Sysinfo
* @returns any Successful Response
* @throws ApiError
*/
downloadSysinfoInternalSysinfoGet({ attachment, }: {
attachment?: any;
}): CancelablePromise<any>;
/**
* <Lambda>
* @returns any Successful Response
* @throws ApiError
*/
lambdaInternalSysinfoDownloadGet(): CancelablePromise<any>;
/**
* Text2Imgapi
* @returns TextToImageResponse Successful Response
* @throws ApiError
*/
text2ImgapiSdapiV1Txt2ImgPost({ requestBody, }: {
requestBody: StableDiffusionProcessingTxt2Img;
}): CancelablePromise<TextToImageResponse>;
/**
* Img2Imgapi
* @returns ImageToImageResponse Successful Response
* @throws ApiError
*/
img2ImgapiSdapiV1Img2ImgPost({ requestBody, }: {
requestBody: StableDiffusionProcessingImg2Img;
}): CancelablePromise<ImageToImageResponse>;
/**
* Extras Single Image Api
* @returns ExtrasSingleImageResponse Successful Response
* @throws ApiError
*/
extrasSingleImageApiSdapiV1ExtraSingleImagePost({ requestBody, }: {
requestBody: ExtrasSingleImageRequest;
}): CancelablePromise<ExtrasSingleImageResponse>;
/**
* Extras Batch Images Api
* @returns ExtrasBatchImagesResponse Successful Response
* @throws ApiError
*/
extrasBatchImagesApiSdapiV1ExtraBatchImagesPost({ requestBody, }: {
requestBody: ExtrasBatchImagesRequest;
}): CancelablePromise<ExtrasBatchImagesResponse>;
/**
* Pnginfoapi
* @returns PNGInfoResponse Successful Response
* @throws ApiError
*/
pnginfoapiSdapiV1PngInfoPost({ requestBody, }: {
requestBody: PNGInfoRequest;
}): CancelablePromise<PNGInfoResponse>;
/**
* Progressapi
* @returns modules__api__models__ProgressResponse Successful Response
* @throws ApiError
*/
progressapiSdapiV1ProgressGet({ skipCurrentImage, }: {
skipCurrentImage?: boolean;
}): CancelablePromise<modules__api__models__ProgressResponse>;
/**
* Interrogateapi
* @returns any Successful Response
* @throws ApiError
*/
interrogateapiSdapiV1InterrogatePost({ requestBody, }: {
requestBody: InterrogateRequest;
}): CancelablePromise<any>;
/**
* Interruptapi
* @returns any Successful Response
* @throws ApiError
*/
interruptapiSdapiV1InterruptPost(): CancelablePromise<any>;
/**
* Skip
* @returns any Successful Response
* @throws ApiError
*/
skipSdapiV1SkipPost(): CancelablePromise<any>;
/**
* Get Config
* @returns Options Successful Response
* @throws ApiError
*/
getConfigSdapiV1OptionsGet(): CancelablePromise<Options>;
/**
* Set Config
* @returns any Successful Response
* @throws ApiError
*/
setConfigSdapiV1OptionsPost({ requestBody, }: {
requestBody: Record<string, any>;
}): CancelablePromise<any>;
/**
* Get Cmd Flags
* @returns Flags Successful Response
* @throws ApiError
*/
getCmdFlagsSdapiV1CmdFlagsGet(): CancelablePromise<Flags>;
/**
* Get Samplers
* @returns SamplerItem Successful Response
* @throws ApiError
*/
getSamplersSdapiV1SamplersGet(): CancelablePromise<Array<SamplerItem>>;
/**
* Get Schedulers
* @returns SchedulerItem Successful Response
* @throws ApiError
*/
getSchedulersSdapiV1SchedulersGet(): CancelablePromise<Array<SchedulerItem>>;
/**
* Get Upscalers
* @returns UpscalerItem Successful Response
* @throws ApiError
*/
getUpscalersSdapiV1UpscalersGet(): CancelablePromise<Array<UpscalerItem>>;
/**
* Get Latent Upscale Modes
* @returns LatentUpscalerModeItem Successful Response
* @throws ApiError
*/
getLatentUpscaleModesSdapiV1LatentUpscaleModesGet(): CancelablePromise<Array<LatentUpscalerModeItem>>;
/**
* Get Sd Models
* @returns SDModelItem Successful Response
* @throws ApiError
*/
getSdModelsSdapiV1SdModelsGet(): CancelablePromise<Array<SDModelItem>>;
/**
* Get Sd Vaes
* @returns SDVaeItem Successful Response
* @throws ApiError
*/
getSdVaesSdapiV1SdVaeGet(): CancelablePromise<Array<SDVaeItem>>;
/**
* Get Hypernetworks
* @returns HypernetworkItem Successful Response
* @throws ApiError
*/
getHypernetworksSdapiV1HypernetworksGet(): CancelablePromise<Array<HypernetworkItem>>;
/**
* Get Face Restorers
* @returns FaceRestorerItem Successful Response
* @throws ApiError
*/
getFaceRestorersSdapiV1FaceRestorersGet(): CancelablePromise<Array<FaceRestorerItem>>;
/**
* Get Realesrgan Models
* @returns RealesrganItem Successful Response
* @throws ApiError
*/
getRealesrganModelsSdapiV1RealesrganModelsGet(): CancelablePromise<Array<RealesrganItem>>;
/**
* Get Prompt Styles
* @returns PromptStyleItem Successful Response
* @throws ApiError
*/
getPromptStylesSdapiV1PromptStylesGet(): CancelablePromise<Array<PromptStyleItem>>;
/**
* Get Embeddings
* @returns EmbeddingsResponse Successful Response
* @throws ApiError
*/
getEmbeddingsSdapiV1EmbeddingsGet(): CancelablePromise<EmbeddingsResponse>;
/**
* Refresh Embeddings
* @returns any Successful Response
* @throws ApiError
*/
refreshEmbeddingsSdapiV1RefreshEmbeddingsPost(): CancelablePromise<any>;
/**
* Refresh Checkpoints
* @returns any Successful Response
* @throws ApiError
*/
refreshCheckpointsSdapiV1RefreshCheckpointsPost(): CancelablePromise<any>;
/**
* Refresh Vae
* @returns any Successful Response
* @throws ApiError
*/
refreshVaeSdapiV1RefreshVaePost(): CancelablePromise<any>;
/**
* Create Embedding
* @returns CreateResponse Successful Response
* @throws ApiError
*/
createEmbeddingSdapiV1CreateEmbeddingPost({ requestBody, }: {
requestBody: Record<string, any>;
}): CancelablePromise<CreateResponse>;
/**
* Create Hypernetwork
* @returns CreateResponse Successful Response
* @throws ApiError
*/
createHypernetworkSdapiV1CreateHypernetworkPost({ requestBody, }: {
requestBody: Record<string, any>;
}): CancelablePromise<CreateResponse>;
/**
* Train Embedding
* @returns TrainResponse Successful Response
* @throws ApiError
*/
trainEmbeddingSdapiV1TrainEmbeddingPost({ requestBody, }: {
requestBody: Record<string, any>;
}): CancelablePromise<TrainResponse>;
/**
* Train Hypernetwork
* @returns TrainResponse Successful Response
* @throws ApiError
*/
trainHypernetworkSdapiV1TrainHypernetworkPost({ requestBody, }: {
requestBody: Record<string, any>;
}): CancelablePromise<TrainResponse>;
/**
* Get Memory
* @returns MemoryResponse Successful Response
* @throws ApiError
*/
getMemorySdapiV1MemoryGet(): CancelablePromise<MemoryResponse>;
/**
* Unloadapi
* @returns any Successful Response
* @throws ApiError
*/
unloadapiSdapiV1UnloadCheckpointPost(): CancelablePromise<any>;
/**
* Reloadapi
* @returns any Successful Response
* @throws ApiError
*/
reloadapiSdapiV1ReloadCheckpointPost(): CancelablePromise<any>;
/**
* Get Scripts List
* @returns ScriptsList Successful Response
* @throws ApiError
*/
getScriptsListSdapiV1ScriptsGet(): CancelablePromise<ScriptsList>;
/**
* Get Script Info
* @returns ScriptInfo Successful Response
* @throws ApiError
*/
getScriptInfoSdapiV1ScriptInfoGet(): CancelablePromise<Array<ScriptInfo>>;
/**
* Get Extensions List
* @returns ExtensionItem Successful Response
* @throws ApiError
*/
getExtensionsListSdapiV1ExtensionsGet(): CancelablePromise<Array<ExtensionItem>>;
/**
* Fetch File
* @returns any Successful Response
* @throws ApiError
*/
fetchFileSdExtraNetworksThumbGet({ filename, }: {
filename?: string;
}): CancelablePromise<any>;
/**
* Fetch Cover Images
* @returns any Successful Response
* @throws ApiError
*/
fetchCoverImagesSdExtraNetworksCoverImagesGet({ page, item, index, }: {
page?: string;
item?: string;
index?: number;
}): CancelablePromise<any>;
/**
* Get Metadata
* @returns any Successful Response
* @throws ApiError
*/
getMetadataSdExtraNetworksMetadataGet({ page, item, }: {
page?: string;
item?: string;
}): CancelablePromise<any>;
/**
* Get Single Card
* @returns any Successful Response
* @throws ApiError
*/
getSingleCardSdExtraNetworksGetSingleCardGet({ page, tabname, name, }: {
page?: string;
tabname?: string;
name?: string;
}): CancelablePromise<any>;
/**
* Get Loras
* @returns any Successful Response
* @throws ApiError
*/
getLorasSdapiV1LorasGet(): CancelablePromise<any>;
/**
* Refresh Loras
* @returns any Successful Response
* @throws ApiError
*/
refreshLorasSdapiV1RefreshLorasPost(): CancelablePromise<any>;
/**
* Api Refresh Temp Files
* @returns any Successful Response
* @throws ApiError
*/
apiRefreshTempFilesTacapiV1RefreshTempFilesPost(): CancelablePromise<any>;
/**
* Api Refresh Embeddings
* @returns any Successful Response
* @throws ApiError
*/
apiRefreshEmbeddingsTacapiV1RefreshEmbeddingsPost(): CancelablePromise<any>;
/**
* Get Lora Info
* @returns any Successful Response
* @throws ApiError
*/
getLoraInfoTacapiV1LoraInfoLoraNameGet({ loraName, }: {
loraName: any;
}): CancelablePromise<any>;
/**
* Get Lyco Info
* @returns any Successful Response
* @throws ApiError
*/
getLycoInfoTacapiV1LycoInfoLycoNameGet({ lycoName, }: {
lycoName: any;
}): CancelablePromise<any>;
/**
* Get Lora Cached Hash
* @returns any Successful Response
* @throws ApiError
*/
getLoraCachedHashTacapiV1LoraCachedHashLoraNameGet({ loraName, }: {
loraName: string;
}): CancelablePromise<any>;
/**
* Get Thumb Preview
* @returns any Successful Response
* @throws ApiError
*/
getThumbPreviewTacapiV1ThumbPreviewFilenameGet({ filename, type, }: {
filename: any;
type: any;
}): CancelablePromise<any>;
/**
* Get Thumb Preview Blob
* @returns any Successful Response
* @throws ApiError
*/
getThumbPreviewBlobTacapiV1ThumbPreviewBlobFilenameGet({ filename, type, }: {
filename: any;
type: any;
}): CancelablePromise<any>;
/**
* Get Wildcard Contents
* @returns any Successful Response
* @throws ApiError
*/
getWildcardContentsTacapiV1WildcardContentsGet({ basepath, filename, }: {
basepath: string;
filename: string;
}): CancelablePromise<any>;
/**
* Refresh Styles If Changed
* @returns any Successful Response
* @throws ApiError
*/
refreshStylesIfChangedTacapiV1RefreshStylesIfChangedGet(): CancelablePromise<any>;
/**
* Increase Use Count
* @returns any Successful Response
* @throws ApiError
*/
increaseUseCountTacapiV1IncreaseUseCountPost({ tagname, ttype, neg, }: {
tagname: string;
ttype: number;
neg: boolean;
}): CancelablePromise<any>;
/**
* Get Use Count
* @returns any Successful Response
* @throws ApiError
*/
getUseCountTacapiV1GetUseCountGet({ tagname, ttype, neg, }: {
tagname: string;
ttype: number;
neg: boolean;
}): CancelablePromise<any>;
/**
* Get Use Count List
* @returns any Successful Response
* @throws ApiError
*/
getUseCountListTacapiV1GetUseCountListPost({ requestBody, }: {
requestBody: UseCountListRequest;
}): CancelablePromise<any>;
/**
* Reset Use Count
* @returns any Successful Response
* @throws ApiError
*/
resetUseCountTacapiV1ResetUseCountPut({ tagname, ttype, pos, neg, }: {
tagname: string;
ttype: number;
pos: boolean;
neg: boolean;
}): CancelablePromise<any>;
/**
* Get All Tag Counts
* @returns any Successful Response
* @throws ApiError
*/
getAllTagCountsTacapiV1GetAllUseCountsGet(): CancelablePromise<any>;
/**
* Get Samplers
* @returns string Successful Response
* @throws ApiError
*/
getSamplersAgentSchedulerV1SamplersGet(): CancelablePromise<Array<string>>;
/**
* Get Sd Models
* @returns string Successful Response
* @throws ApiError
*/
getSdModelsAgentSchedulerV1SdModelsGet(): CancelablePromise<Array<string>>;
/**
* Queue Txt2Img
* @returns QueueTaskResponse Successful Response
* @throws ApiError
*/
queueTxt2ImgAgentSchedulerV1QueueTxt2ImgPost({ requestBody, }: {
requestBody: Txt2ImgApiTaskArgs;
}): CancelablePromise<QueueTaskResponse>;
/**
* Queue Img2Img
* @returns QueueTaskResponse Successful Response
* @throws ApiError
*/
queueImg2ImgAgentSchedulerV1QueueImg2ImgPost({ requestBody, }: {
requestBody: Img2ImgApiTaskArgs;
}): CancelablePromise<QueueTaskResponse>;
/**
* Queue Status Api
* @returns QueueStatusResponse Successful Response
* @throws ApiError
*/
queueStatusApiAgentSchedulerV1QueueGet({ limit, offset, }: {
limit?: number;
offset?: number;
}): CancelablePromise<QueueStatusResponse>;
/**
* Export Queue
* @returns any Successful Response
* @throws ApiError
*/
exportQueueAgentSchedulerV1ExportGet({ limit, offset, }: {
limit?: number;
offset?: number;
}): CancelablePromise<any>;
/**
* Import Queue
* @returns any Successful Response
* @throws ApiError
*/
importQueueAgentSchedulerV1ImportPost({ requestBody, }: {
requestBody: StringRequestBody;
}): CancelablePromise<any>;
/**
* History Api
* @returns HistoryResponse Successful Response
* @throws ApiError
*/
historyApiAgentSchedulerV1HistoryGet({ status, limit, offset, }: {
status?: string;
limit?: number;
offset?: number;
}): CancelablePromise<HistoryResponse>;
/**
* Get Task
* @returns any Successful Response
* @throws ApiError
*/
getTaskAgentSchedulerV1TaskIdGet({ id, }: {
id: string;
}): CancelablePromise<any>;
/**
* Update Task
* @returns any Successful Response
* @throws ApiError
*/
updateTaskAgentSchedulerV1TaskIdPut({ id, requestBody, }: {
id: string;
requestBody: UpdateTaskArgs;
}): CancelablePromise<any>;
/**
* Delete Task
* @returns any Successful Response
* @throws ApiError
*/
deleteTaskAgentSchedulerV1TaskIdDelete({ id, }: {
id: string;
}): CancelablePromise<any>;
/**
* Get Task Position
* @returns any Successful Response
* @throws ApiError
*/
getTaskPositionAgentSchedulerV1TaskIdPositionGet({ id, }: {
id: string;
}): CancelablePromise<any>;
/**
* Run Task
* @returns any Successful Response
* @throws ApiError
*/
runTaskAgentSchedulerV1TaskIdRunPost({ id, }: {
id: string;
}): CancelablePromise<any>;
/**
* @deprecated
* Run Task
* @returns any Successful Response
* @throws ApiError
*/
runTaskAgentSchedulerV1RunIdPost({ id, }: {
id: string;
}): CancelablePromise<any>;
/**
* Requeue Task
* @returns any Successful Response
* @throws ApiError
*/
requeueTaskAgentSchedulerV1TaskIdRequeuePost({ id, }: {
id: string;
}): CancelablePromise<any>;
/**
* @deprecated
* Requeue Task
* @returns any Successful Response
* @throws ApiError
*/
requeueTaskAgentSchedulerV1RequeueIdPost({ id, }: {
id: string;
}): CancelablePromise<any>;
/**
* Requeue Failed Tasks
* @returns any Successful Response
* @throws ApiError
*/
requeueFailedTasksAgentSchedulerV1TaskRequeueFailedPost(): CancelablePromise<any>;
/**
* @deprecated
* Delete Task
* @returns any Successful Response
* @throws ApiError
*/
deleteTaskAgentSchedulerV1DeleteIdPost({ id, }: {
id: string;
}): CancelablePromise<any>;
/**
* Move Task
* @returns any Successful Response
* @throws ApiError
*/
moveTaskAgentSchedulerV1TaskIdMoveOverIdPost({ id, overId, }: {
id: string;
overId: string;
}): CancelablePromise<any>;
/**
* @deprecated
* Move Task
* @returns any Successful Response
* @throws ApiError
*/
moveTaskAgentSchedulerV1MoveIdOverIdPost({ id, overId, }: {
id: string;
overId: string;
}): CancelablePromise<any>;
/**
* Pin Task
* @returns any Successful Response
* @throws ApiError
*/
pinTaskAgentSchedulerV1TaskIdBookmarkPost({ id, }: {
id: string;
}): CancelablePromise<any>;
/**
* @deprecated
* Pin Task
* @returns any Successful Response
* @throws ApiError
*/
pinTaskAgentSchedulerV1BookmarkIdPost({ id, }: {
id: string;
}): CancelablePromise<any>;
/**
* Unpin Task
* @returns any Successful Response
* @throws ApiError
*/
unpinTaskAgentSchedulerV1TaskIdUnbookmarkPost({ id, }: {
id: string;
}): CancelablePromise<any>;
/**
* @deprecated
* Unpin Task
* @returns any Successful Response
* @throws ApiError
*/
unpinTaskAgentSchedulerV1UnbookmarkIdPost({ id, }: {
id: string;
}): CancelablePromise<any>;
/**
* Rename Task
* @returns any Successful Response
* @throws ApiError
*/
renameTaskAgentSchedulerV1TaskIdRenamePost({ id, name, }: {
id: string;
name: string;
}): CancelablePromise<any>;
/**
* @deprecated
* Rename Task
* @returns any Successful Response
* @throws ApiError
*/
renameTaskAgentSchedulerV1RenameIdPost({ id, name, }: {
id: string;
name: string;
}): CancelablePromise<any>;
/**
* Get Task Results
* @returns any Successful Response
* @throws ApiError
*/
getTaskResultsAgentSchedulerV1TaskIdResultsGet({ id, zip, }: {
id: string;
zip?: boolean;
}): CancelablePromise<any>;
/**
* @deprecated
* Get Task Results
* @returns any Successful Response
* @throws ApiError
*/
getTaskResultsAgentSchedulerV1ResultsIdGet({ id, zip, }: {
id: string;
zip?: boolean;
}): CancelablePromise<any>;
/**
* Pause Queue
* @returns any Successful Response
* @throws ApiError
*/
pauseQueueAgentSchedulerV1QueuePausePost(): CancelablePromise<any>;
/**
* @deprecated
* Pause Queue
* @returns any Successful Response
* @throws ApiError
*/
pauseQueueAgentSchedulerV1PausePost(): CancelablePromise<any>;
/**
* Resume Queue
* @returns any Successful Response
* @throws ApiError
*/
resumeQueueAgentSchedulerV1QueueResumePost(): CancelablePromise<any>;
/**
* @deprecated
* Resume Queue
* @returns any Successful Response
* @throws ApiError
*/
resumeQueueAgentSchedulerV1ResumePost(): CancelablePromise<any>;
/**
* Clear Queue
* @returns any Successful Response
* @throws ApiError
*/
clearQueueAgentSchedulerV1QueueClearPost(): CancelablePromise<any>;
/**
* Clear History
* @returns any Successful Response
* @throws ApiError
*/
clearHistoryAgentSchedulerV1HistoryClearPost(): CancelablePromise<any>;
/**
* Version
* @returns any Successful Response
* @throws ApiError
*/
versionControlnetVersionGet(): CancelablePromise<any>;
/**
* Model List
* @returns any Successful Response
* @throws ApiError
*/
modelListControlnetModelListGet({ update, }: {
update?: boolean;
}): CancelablePromise<any>;
/**
* Module List
* @returns any Successful Response
* @throws ApiError
*/
moduleListControlnetModuleListGet({ aliasNames, }: {
aliasNames?: boolean;
}): CancelablePromise<any>;
/**
* Control Types
* @returns any Successful Response
* @throws ApiError
*/
controlTypesControlnetControlTypesGet(): CancelablePromise<any>;
/**
* Settings
* @returns any Successful Response
* @throws ApiError
*/
settingsControlnetSettingsGet(): CancelablePromise<any>;
/**
* Detect
* @returns any Successful Response
* @throws ApiError
*/
detectControlnetDetectPost({ requestBody, }: {
requestBody?: Body_detect_controlnet_detect_post;
}): CancelablePromise<any>;
/**
* Render Openpose Json
* @returns any Successful Response
* @throws ApiError
*/
renderOpenposeJsonControlnetRenderOpenposeJsonPost({ requestBody, }: {
requestBody?: Array<PoseData>;
}): CancelablePromise<any>;
/**
* Rembg Remove
* @returns any Successful Response
* @throws ApiError
*/
rembgRemoveRembgPost({ requestBody, }: {
requestBody?: Body_rembg_remove_rembg_post;
}): CancelablePromise<any>;
}
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
declare class SDWebUIA1111Client {
readonly default: DefaultService;
readonly request: BaseHttpRequest;
constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
}
type ApiResult = {
readonly url: string;
readonly ok: boolean;
readonly status: number;
readonly statusText: string;
readonly body: any;
};
declare class ApiError extends Error {
readonly url: string;
readonly status: number;
readonly statusText: string;
readonly body: any;
readonly request: ApiRequestOptions;
constructor(request: ApiRequestOptions, response: ApiResult, message: string);
}
type ValidationError = {
loc: Array<(string | number)>;
msg: string;
type: string;
};
type HTTPValidationError = {
detail?: Array<ValidationError>;
};
/**
* 定义拓展脚本的参数
*/
declare class ExtensionScript<Args extends Array<any> = Array<any>> {
readonly name: string;
protected args: Args;
constructor(name: string, args: Args);
install(req: StableDiffusionProcessingImg2Img | StableDiffusionProcessingTxt2Img): void;
}
interface ControlNetUnitRequest {
/**
* This unit enabled or not.
*/
enabled: boolean;
/**
* Image to use in this unit.
* Defaults to null.
*/
image?: string | null;
/**
* Mask pixel_perfect to filter the image.
* Defaults to null.
*/
mask?: string | null;
/**
* Preprocessor to use on the image passed to this unit before using it for conditioning.
* Accepts values returned by the /controlnet/module_list route.
* Defaults to "none".
*/
module?: string;
/**
* Name of the model to use for conditioning in this unit.
* Accepts values returned by the /controlnet/model_list route.
* Defaults to "None".
*/
model?: string;
/**
* Weight of this unit.
* Defaults to -1.
*/
weight?: number;
/**
* How to resize the input image so as to fit the output resolution of the generation.
* Defaults to "Scale to Fit (Inner Fit)".
* Accepted values:
* - 0 or "Just Resize": simply resize the image to the target width/height
* - 1 or "Scale to Fit (Inner Fit)": scale and crop to fit smallest dimension, preserves proportions
* - 2 or "Envelope (Outer Fit)": scale to fit largest dimension, preserves proportions
*/
resize_mode?: ResizeMode;
/**
* Whether to compensate low GPU memory with processing time.
* Defaults to false.
*/
low_vram?: boolean;
/**
* Resolution of the preprocessor.
* Defaults to -1.
*/
processor_res?: number;
/**
* First parameter of the preprocessor.
* Only takes effect when preprocessor accepts arguments.
* Defaults to -1.
*/
threshold_a?: number;
/**
* Second parameter of the preprocessor, same as above for usage.
* Defaults to -1.
*/
threshold_b?: number;
/**
* Ratio of generation where this unit starts to have an effect.
* Defaults to 0.0.
*/
guidance_start?: number;
/**
* Ratio of generation where this unit stops to have an effect.
* Defaults to 1.0.
*/
guidance_end?: number;
/**
* See the related issue for usage.
* Defaults to 0.
* Accepted values:
* - 0 or "Balanced": balanced, no preference between prompt and control model
* - 1 or "My prompt is more important": the prompt has more impact than the model
* - 2 or "ControlNet is more important": the controlnet model has more impact than the prompt
*/
control_mode?: ControlMode;
/**
* Enable pixel-perfect preprocessor.
* Defaults to false.
*/
pixel_perfect?: boolean;
}
type ResizeMode = "Just Resize" | "Scale to Fit (Inner Fit)" | "Envelope (Outer Fit)";
type ControlMode = "Balanced" | "My prompt is more important" | "ControlNet is more important";
declare class ControlNetExt extends ExtensionScript<Array<Partial<ControlNetUnitRequest>>> {
readonly options?: {
disable_auto_set_image?: boolean | undefined;
disable_auto_set_mask?: boolean | undefined;
} | undefined;
constructor(unit0?: Partial<ControlNetUnitRequest>, options?: {
disable_auto_set_image?: boolean | undefined;
disable_auto_set_mask?: boolean | undefined;
} | undefined);
/**
* @deprecated Use `add` instead
*/
addUnit(unit: Partial<ControlNetUnitRequest>): this;
/**
* Add a unit to the control net units. The unit must have at least one key.
* If the unit is empty, an error will be thrown.
* The unit will be merged with the default unit request before being added
* @param {Partial<ControlNetUnitRequest>} unit The unit to add
* @returns {this} The current instance of the extension script
*/
add(unit: Partial<ControlNetUnitRequest>): this;
clear(): this;
install(req: StableDiffusionProcessingImg2Img | StableDiffusionProcessingTxt2Img): void;
}
/**
* Parameters for the cutoff feature.
*/
interface CutoffParams {
/**
* Whether the cutoff feature is enabled.
*/
enabled: boolean;
/**
* The target for the cutoff.
*/
targets: string;
/**
* The weight for the cutoff.
*/
weight: number;
/**
* Whether to disable negative cutoff.
*/
disable_neg: boolean;
/**
* Whether to use strong cutoff.
*/
strong: boolean;
/**
* The padding token for the cutoff (can be an ID or a single token).
*/
padding: string | number;
/**
* Input options for the cutoff. Valid values are "Lerp" or "SLerp".
*/
inpt: "Lerp" | "SLerp";
/**
* Whether to enable debug mode for the cutoff.
*/
debug: boolean;
}
/**
* Arguments for extending the cutoff params.
*/
type CutoffExtArgs = [
enabled: CutoffParams["enabled"],
targets: CutoffParams["targets"],
weight: CutoffParams["weight"],
disable_neg: CutoffParams["disable_neg"],
strong: CutoffParams["strong"],
padding: CutoffParams["padding"],
inpt: CutoffParams["inpt"],
debug: CutoffParams["debug"]
];
declare class CutoffExt extends ExtensionScript<CutoffExtArgs> {
constructor(params?: Partial<CutoffParams>);
/**
* Update the parameters of the cutoff.
*
* @param {Partial<CutoffParams>} params - The updated parameters for the cutoff.
*/
update(params: Partial<CutoffParams>): void;
}
/**
* Parameters for tiled diffusion processing
*/
interface TiledDiffusionParams {
/**
* Whether to enable tiled diffusion
*/
enabled: boolean;
/**
* Tiled diffusion method to use
*/
method: TiledDiffusionMethod;
/**
* Whether to overwrite image size instead of using original size
*/
overwrite_size: boolean;
/**
* Keep input image size when doing img2img
*/
keep_input_size: boolean;
/**
* Image width when overwriting size
*/
image_width: number;
/**
* Image height when overwriting size
*/
image_height: number;
/**
* Width of each latent tile
*/
tile_width: number;
/**
* Height of each latent tile
*/
tile_height: number;
/**
* Overlap between latent tiles
*/
overlap: number;
/**
* Batch size for processing latent tiles
*/
tile_batch_size: number;
/**
* Name of upscaler to use for img2img
*/
upscaler_name: string;
/**
* Scale factor for img2img upscaling
*/
scale_factor: number;
/**
* Whether to enable noise inversion
*/
noise_inverse: boolean;
/**
* Number of steps to run noise inversion
*/
noise_inverse_steps: number;
/**
* Noise inversion retouch strength
*/
noise_inverse_retouch: number;
/**
* Noise renoise strength after inversion
*/
noise_inverse_renoise_strength: number;
/**
* Kernel size for renoise after inversion
*/
noise_inverse_renoise_kernel: number;
/**
* Whether to move control tensor to CPU
*/
control_tensor_cpu: boolean;
/**
* Whether region prompt control is enabled
*/
enable_bbox_control: boolean;
/**
* Whether to draw full background when using region control
*/
draw_background: boolean;
/**
* Whether layers are causaled when using region control
*/
causal_layers: boolean;
bbox_control_states: any[];
}
/**
* Default arguments for tiled diffusion processing
*/
type TiledDiffusionArgs = [
enabled: TiledDiffusionParams["enabled"],
method: TiledDiffusionParams["method"],
overwrite_size: TiledDiffusionParams["overwrite_size"],
keep_input_size: TiledDiffusionParams["keep_input_size"],
image_width: TiledDiffusionParams["image_width"],
image_height: TiledDiffusionParams["image_height"],
tile_width: TiledDiffusionParams["tile_width"],
tile_height: TiledDiffusionParams["tile_height"],
overlap: TiledDiffusionParams["overlap"],
tile_batch_size: TiledDiffusionParams["tile_batch_size"],
upscaler_name: TiledDiffusionParams["upscaler_name"],
scale_factor: TiledDiffusionParams["scale_factor"],
noise_inverse: TiledDiffusionParams["noise_inverse"],
noise_inverse_steps: TiledDiffusionParams["noise_inverse_steps"],
noise_inverse_retouch: TiledDiffusionParams["noise_inverse_retouch"],
noise_inverse_renoise_strength: TiledDiffusionParams["noise_inverse_renoise_strength"],
noise_inverse_renoise_kernel: TiledDiffusionParams["noise_inverse_renoise_kernel"],
control_tensor_cpu: TiledDiffusionParams["control_tensor_cpu"],
enable_bbox_control: TiledDiffusionParams["enable_bbox_control"],
draw_background: TiledDiffusionParams["draw_background"],
causal_layers: TiledDiffusionParams["causal_layers"],
bbox_control_states: TiledDiffusionParams["bbox_control_states"]
];
/**
* Tiled diffusion methods
*/
declare enum TiledDiffusionMethod {
MULTI_DIFF = "MultiDiffusion",
MIX_DIFF = "Mixture of Diffusers"
}
declare class TiledDiffusionExt extends ExtensionScript<TiledDiffusionArgs> {
constructor(params?: Partial<TiledDiffusionParams>);
/**
* Update the parameters of the TiledDiffusion object.
*
* @param {Partial<TiledDiffusionParams>} params - The partial parameters to update.
*/
update(params: Partial<TiledDiffusionParams>): void;
}
/**
* Interface for TiledVAE parameters
*/
interface TiledVAEParams {
/**
* Whether to enable TiledVAE
*/
enabled: boolean;
/**
* Encoder tile size
*/
encoderTileSize: number;
/**
* Decoder tile size
*/
decoderTileSize: number;
/**
* Whether to move VAE to GPU (if possible)
*/
vaeToGPU: boolean;
/**
* Whether to use fast decoder
*/
fastDecoder: boolean;
/**
* Whether to use fast encoder
*/
fastEncoder: boolean;
/**
* Fast encoder color fix
*/
colorFix: boolean;
}
/**
* Type for TiledVAE default argument values
*/
type TiledVAEArgs = [
/**
* Whether to enable TiledVAE
*/
enabled: TiledVAEParams["enabled"],
/**
* Encoder tile size
*/
encoderTileSize: TiledVAEParams["encoderTileSize"],
/**
* Decoder tile size
*/
decoderTileSize: TiledVAEParams["decoderTileSize"],
/**
* Whether to move VAE to GPU (if possible)
*/
vaeToGPU: TiledVAEParams["vaeToGPU"],
/**
* Whether to use fast decoder
*/
fastDecoder: TiledVAEParams["fastDecoder"],
/**
* Whether to use fast encoder
*/
fastEncoder: TiledVAEParams["fastEncoder"],
/**
* Fast encoder color fix
*/
colorFix: TiledVAEParams["colorFix"]
];
declare class TiledVAEExt extends ExtensionScript<TiledVAEArgs> {
constructor(params?: Partial<TiledVAEParams>);
/**
* Update the parameters of the TiledDiffusion object.
*
* @param {Partial<TiledVAEParams>} params - The partial parameters to update.
*/
update(params: Partial<TiledVAEParams>): void;
}
/**
* DynamicCFGParams defines the parameters for the dynamic thresholding UI component
*/
interface DynamicCFGParams {
/**
* Whether dynamic thresholding is enabled
*/
enabled: boolean;
/**
* The scale to mimic for CFG
*/
mimicScale: number;
/**
* The percentile threshold for clamping latent values
*/
thresholdPercentile: number;
/**
* The mode for scheduling the mimic scale value
*/
mimicMode: "Constant" | "Linear" | "Cosine" | "CosineRepeating" | "PowerDown" | "PowerUp";
/**
* The minimum value when using a scheduled mimic scale
*/
mimicScaleMin: number;
/**
* The mode for scheduling the CFG scale value
*/
cfgMode: "Constant" | "Linear" | "Cosine" | "CosineRepeating" | "PowerDown" | "PowerUp";
/**
* The minimum value when using a scheduled CFG scale
*/
cfgScaleMin: number;
/**
* The scheduler value used for some modes
*/
schedVal: number;
}
type DynamicCFGArgs = [
enabled: DynamicCFGParams["enabled"],
mimicScale: DynamicCFGParams["mimicScale"],
thresholdPercentile: DynamicCFGParams["thresholdPercentile"],
mimicMode: DynamicCFGParams["mimicMode"],
mimicScaleMin: DynamicCFGParams["mimicScaleMin"],
cfgMode: DynamicCFGParams["cfgMode"],
cfgScaleMin: DynamicCFGParams["cfgScaleMin"],
schedVal: DynamicCFGParams["schedVal"]
];
declare class DynamicCFGExt extends ExtensionScript<DynamicCFGArgs> {
constructor(params?: Partial<DynamicCFGParams>);
/**
* Update the parameters of object.
*
* @param {Partial<DynamicCFGParams>} params - The partial parameters to update.
*/
update(params: Partial<DynamicCFGParams>): void;
}
/**
* Parameters for the ADetailer feature.
*/
interface ADetailerParams {
ad_model: string;
ad_model_classes: string;
ad_tab_enable: boolean;
ad_prompt: string;
ad_negative_prompt: string;
ad_confidence: number;
ad_mask_filter_method: string;
ad_mask_k: number;
ad_mask_min_ratio: number;
ad_mask_max_ratio: number;
ad_dilate_erode: number;
ad_x_offset: number;
ad_y_offset: number;
ad_mask_merge_invert: string;
ad_mask_blur: number;
ad_denoising_strength: number;
ad_inpaint_only_masked: boolean;
ad_inpaint_only_masked_padding: number;
ad_use_inpaint_width_height: boolean;
ad_inpaint_width: number;
ad_inpaint_height: number;
ad_use_steps: boolean;
ad_steps: number;
ad_use_cfg_scale: boolean;
ad_cfg_scale: number;
ad_use_checkpoint: boolean;
ad_checkpoint: string | null;
ad_use_vae: boolean;
ad_vae: string | null;
ad_use_sampler: boolean;
ad_sampler: string;
ad_scheduler: string;
ad_use_noise_multiplier: boolean;
ad_noise_multiplier: number;
ad_use_clip_skip: boolean;
ad_clip_skip: number;
ad_restore_face: boolean;
ad_controlnet_model: string;
ad_controlnet_module: string;
ad_controlnet_weight: number;
ad_controlnet_guidance_start: number;
ad_controlnet_guidance_end: number;
}
type ADetailerExtArgs = [ADetailerParams];
declare class ADetailerExt extends ExtensionScript<ADetailerExtArgs> {
constructor(params?: Partial<ADetailerParams>);
update(params: Partial<ADetailerParams>): void;
}
declare class SDProcessor<Body> {
readonly init_body: Body;
protected extensions: ExtensionScript<any[]>[];
constructor(init_body: Body);
/**
* Converts the object to its JSON representation.
*
* @return {any} The JSON representation of the object.
*/
toJSON(): Body;
/**
* Adds an extension to the list of extensions.
*
* @param {ExtensionScript} ext - The extension to be added.
* @return {SDProcessor<Body>} The current SDProcessing object.
*/
use(ext: ExtensionScript): this;
/**
* Creates and adds a new ExtensionScript to the list of extensions.
*
* @param {string} name - The name of the extension script.
* @param {any[]} args - The arguments for the extension script.
* @return {SDProcessor<Body>} The current SDProcessing object.
*/
useCustomExt(name: string, args: any[]): this;
/**
* Clears the extensions array.
*
*/
clear(): void;
/**
* A description of the entire function.
*
* @param {SDWebUIA1111Client} client - The SDWebUIA1111Client object used for the request.
* @return {any} The response from the request.
*/
request(client: SDWebUIA1111Client): any;
}
interface SDWebUIA1111SystemSettings {
samples_save: boolean;
samples_format: string;
samples_filename_pattern: string;
save_images_add_number: boolean;
grid_save: boolean;
grid_format: string;
grid_extended_filename: boolean;
grid_only_if_multiple: boolean;
grid_prevent_empty_spots: boolean;
grid_zip_filename_pattern: string;
n_rows: number;
enable_pnginfo: boolean;
save_txt: boolean;
save_images_before_face_restoration: boolean;
save_images_before_highres_fix: boolean;
save_images_before_color_correction: boolean;
save_mask: boolean;
save_mask_composite: boolean;
jpeg_quality: number;
webp_lossless: boolean;
export_for_4chan: boolean;
img_downscale_threshold: number;
target_side_length: number;
img_max_size_mp: number;
use_original_name_batch: boolean;
use_upscaler_name_as_suffix: boolean;
save_selected_only: boolean;
save_init_img: boolean;
temp_dir: string;
clean_temp_dir_at_start: boolean;
outdir_samples: string;
outdir_txt2img_samples: string;
outdir_img2img_samples: string;
outdir_extras_samples: string;
outdir_grids: string;
outdir_txt2img_grids: string;
outdir_img2img_grids: string;
outdir_save: string;
outdir_init_images: string;
save_to_dirs: boolean;
grid_save_to_dirs: boolean;
use_save_to_dirs_for_ui: boolean;
directories_filename_pattern: string;
directories_max_prompt_words: number;
ESRGAN_tile: number;
ESRGAN_tile_overlap: number;
realesrgan_enabled_models: string[];
upscaler_for_img2img: null;
face_restoration_model: string;
code_former_weight: number;
face_restoration_unload: boolean;
show_warnings: boolean;
memmon_poll_rate: number;
samples_log_stdout: boolean;
multiple_tqdm: boolean;
print_hypernet_extra: boolean;
list_hidden_files: boolean;
unload_models_when_training: boolean;
pin_memory: boolean;
save_optimizer_state: boolean;
save_training_settings_to_txt: boolean;
dataset_filename_word_regex: string;
dataset_filename_join_string: string;
training_image_repeats_per_epoch: number;
training_write_csv_every: number;
training_xattention_optimizations: boolean;
training_enable_tensorboard: boolean;
training_tensorboard_save_images: boolean;
training_tensorboard_flush_every: number;
sd_model_checkpoint: string;
sd_checkpoint_cache: number;
sd_vae_checkpoint_cache: number;
sd_vae: string;
sd_vae_as_default: boolean;
sd_unet: string;
inpainting_mask_weight: number;
initial_noise_multiplier: number;
img2img_color_correction: boolean;
img2img_fix_steps: boolean;
img2img_background_color: string;
enable_quantization: boolean;
enable_emphasis: boolean;
enable_batch_seeds: boolean;
comma_padding_backtrack: number;
CLIP_stop_at_last_layers: number;
upcast_attn: boolean;
randn_source: string;
cross_attention_optimization: string;
s_min_uncond: number;
token_merging_ratio: number;
token_merging_ratio_img2img: number;
token_merging_ratio_hr: number;
pad_cond_uncond: boolean;
experimental_persistent_cond_cache: boolean;
use_old_emphasis_implementation: boolean;
use_old_karras_scheduler_sigmas: boolean;
no_dpmpp_sde_batch_determinism: boolean;
use_old_hires_fix_width_height: boolean;
dont_fix_second_order_samplers_schedule: boolean;
hires_fix_use_firstpass_conds: boolean;
interrogate_keep_models_in_memory: boolean;
interrogate_return_ranks: boolean;
interrogate_clip_num_beams: number;
interrogate_clip_min_length: number;
interrogate_clip_max_length: number;
interrogate_clip_dict_limit: number;
interrogate_clip_skip_categories: any[];
interrogate_deepbooru_score_threshold: number;
deepbooru_sort_alpha: boolean;
deepbooru_use_spaces: boolean;
deepbooru_escape: boolean;
deepbooru_filter_tags: string;
extra_networks_show_hidden_directories: boolean;
extra_networks_hidden_models: string;
extra_networks_default_view: string;
extra_networks_default_multiplier: number;
extra_networks_card_width: number;
extra_networks_card_height: number;
extra_networks_add_text_separator: string;
ui_extra_networks_tab_reorder: string;
sd_hypernetwork: string;
localization: string;
gradio_theme: string;
img2img_editor_height: number;
return_grid: boolean;
return_mask: boolean;
return_mask_composite: boolean;
do_not_show_images: boolean;
send_seed: boolean;
send_size: boolean;
font: string;
js_modal_lightbox: boolean;
js_modal_lightbox_initially_zoomed: boolean;
js_modal_lightbox_gamepad: boolean;
js_modal_lightbox_gamepad_repeat: number;
show_progress_in_title: boolean;
samplers_in_dropdown: boolean;
dimensions_and_batch_together: boolean;
keyedit_precision_attention: number;
keyedit_precision_extra: number;
keyedit_delimiters: string;
quicksettings_list: string[];
ui_tab_order: any[];
hidden_tabs: any[];
ui_reorder_list: string[];
hires_fix_show_sampler: boolean;
hires_fix_show_prompts: boolean;
disable_token_counters: boolean;
add_model_hash_to_info: boolean;
add_model_name_to_info: boolean;
add_version_to_infotext: boolean;
disable_weights_auto_swap: boolean;
infotext_styles: string;
show_progressbar: boolean;
live_previews_enable: boolean;
live_previews_image_format: string;
show_progress_grid: boolean;
show_progress_every_n_steps: number;
show_progress_type: string;
live_preview_content: string;
live_preview_refresh_period: number;
hide_samplers: any[];
eta_ddim: number;
eta_ancestral: number;
ddim_discretize: string;
s_churn: number;
s_tmin: number;
s_noise: number;
k_sched_type: string;
sigma_min: number;
sigma_max: number;
rho: number;
eta_noise_seed_delta: number;
always_discard_next_to_last_sigma: boolean;
uni_pc_variant: string;
uni_pc_skip_type: string;
uni_pc_order: number;
uni_pc_lower_order_final: boolean;
postprocessing_enable_in_main_ui: any[];
postprocessing_operation_order: any[];
upscaling_max_images_in_cache: number;
disabled_extensions: any[];
disable_all_extensions: string;
restore_config_state_file: string;
sd_checkpoint_hash: string;
}
declare enum ResizeModeI2i {
"Just resize" = 0,
"Crop and resize" = 1,
"Resize and fill" = 2,
"Just resize (latent upscale)" = 2
}
declare enum InpaintFill {
"fill" = 0,
"original" = 1,
"latent noise" = 2,
"latent nothing" = 3
}
declare enum InpaintFullRes {
"Whole picture" = 0,
"Only masked" = 1
}
type Img2imgProcessParams = StableDiffusionProcessingImg2Img & {
resize_mode?: ResizeModeI2i;
inpainting_fill?: InpaintFill;
inpainting_mask_invert?: 0 | 1;
inpaint_full_res?: InpaintFullRes;
override_settings?: Record<keyof any, any> & Partial<SDWebUIA1111SystemSettings>;
};
type Txt2imgProcessParams = StableDiffusionProcessingTxt2Img & {
override_settings?: Record<keyof any, any> & Partial<SDWebUIA1111SystemSettings>;
};
/**
* Img2imgProcess
*
* usage:
* ```ts
* const client = new SDWebUIA1111Client();
* const process = new Img2imgProcess({ prompt: "1girl" });
* const {images} = await process.request(client);
* const image = images[0]; // base64 image string
* ```
*/
declare class Img2imgProcess extends SDProcessor<Img2imgProcessParams> {
request(client: SDWebUIA1111Client): CancelablePromise<ImageToImageResponse & {
parameters: Img2imgProcessParams;
}>;
}
/**
* Txt2imgProcess
*
* usage:
* ```ts
* const client = new SDWebUIA1111Client();
* const process = new Txt2imgProcess({ prompt: "1girl" });
* const {images} = await process.request(client);
* const image = images[0]; // base64 image string
* ```
*/
declare class Txt2imgProcess extends SDProcessor<Txt2imgProcessParams> {
request(client: SDWebUIA1111Client): CancelablePromise<TextToImageResponse & {
parameters: Txt2imgProcessParams;
}>;
}
/**
* SystemSettingProcess
*
* usage:
* ```ts
* const client = new SDWebUIA1111Client();
* const process = new SystemSettingProcess({
* samples_save: true,
* samples_format: "png",
* samples_filename_pattern: "sample",
* });
* await process.request(client);
* ```
*/
declare class SystemSettingProcess extends SDProcessor<Partial<SDWebUIA1111SystemSettings>> {
request(client: SDWebUIA1111Client): CancelablePromise<any>;
}
type TaskResult = {
image: string;
infotext: string;
};
declare class SDTaskRunner {
protected client: SDWebUIA1111Client;
readonly task_id: string;
private intervalMs;
protected data: TaskResult[];
protected message: string;
queryLoop?: Promise<TaskResult[]>;
constructor(client: SDWebUIA1111Client, task_id: string, intervalMs?: number);
protected running: boolean;
run(): Promise<void>;
protected startQueryLoop(): Promise<TaskResult[]>;
queryResults(): Promise<TaskResult[]>;
results(): Promise<TaskResult[]>;
protected interrupted: boolean;
interrupt(): Promise<void>;
}
declare enum SDTaskStatus {
pending = "pending",
running = "running",
done = "done",
failed = "failed",
interrupted = "interrupted"
}
declare class SDTask {
protected client: SDWebUIA1111Client;
readonly task_id: string;
protected status: SDTaskStatus;
protected error?: any;
protected results?: TaskResult[];
constructor(client: SDWebUIA1111Client, task_id: string);
protected errWrap<T>(callback: () => T): Promise<T | undefined>;
private runner?;
run(): Promise<TaskResult[] | undefined>;
interrupt(): Promise<void>;
}
declare class SDTaskScheduler {
readonly client: SDWebUIA1111Client;
constructor(client: SDWebUIA1111Client);
queueStatus(): Promise<QueueStatusResponse>;
queryHistory(status?: SDTaskStatus, limit?: number, offset?: number): Promise<HistoryResponse>;
pause(): Promise<any>;
resume(): Promise<any>;
createImg2imgTask(img2imgProcess: Img2imgProcess, checkpoint?: string, callback_url?: string): Promise<SDTask>;
createTxt2imgTask(txt2imgProcess: Txt2imgProcess, checkpoint?: string, callback_url?: string): Promise<SDTask>;
}
type CachedApiOptions = {
client: SDWebUIA1111Client;
cacheTime: number;
disableCache?: boolean;
};
/**
* A global cache hub that stores cache data for all CachedApi instances.
*/
declare class GlobalCacheHub {
static __KEY__: string;
private ensureCache;
get _cache(): Record<string, {
data: any;
expires: number;
}>;
clearCache(): void;
}
declare class CachedApi {
protected hub: GlobalCacheHub;
protected options: CachedApiOptions;
constructor(options: Pick<CachedApiOptions, "client"> & Partial<Omit<CachedApiOptions, "client">>, hub?: GlobalCacheHub);
private get _cache();
get client(): SDWebUIA1111Client;
protected cache_key_prefix(): string;
protected full_cache_key(key: string): string;
protected _getFromCache<T>(key: string): Promise<T | null>;
protected _setCache<T>(key: string, data: T): Promise<void>;
protected _getFromCacheOrFetch<T>(key: string, fetch: () => Promise<T>): Promise<T>;
/**
* Clears the cache by resetting the `_cache` object to an empty object.
*/
clearCache(): void;
/**
* Removes a cache entry with the specified key.
*
* @param {string} key - The key of the cache entry to remove.
*/
removeCache(key: string): void;
}
/**
* Minimal `EventEmitter` interface that is molded against the Node.js
* `EventEmitter` interface.
*/
declare class EventEmitter<
EventTypes extends EventEmitter.ValidEventTypes = string | symbol,
Context extends any = any
> {
static prefixed: string | boolean;
/**
* Return an array listing the events for which the emitter has registered
* listeners.
*/
eventNames(): Array<EventEmitter.EventNames<EventTypes>>;
/**
* Return the listeners registered for a given event.
*/
listeners<T extends EventEmitter.EventNames<EventTypes>>(
event: T
): Array<EventEmitter.EventListener<EventTypes, T>>;
/**
* Return the number of listeners listening to a given event.
*/
listenerCount(event: EventEmitter.EventNames<EventTypes>): number;
/**
* Calls each of the listeners registered for a given event.
*/
emit<T extends EventEmitter.EventNames<EventTypes>>(
event: T,
...args: EventEmitter.EventArgs<EventTypes, T>
): boolean;
/**
* Add a listener for a given event.
*/
on<T extends EventEmitter.EventNames<EventTypes>>(
event: T,
fn: EventEmitter.EventListener<EventTypes, T>,
context?: Context
): this;
addListener<T extends EventEmitter.EventNames<EventTypes>>(
event: T,
fn: EventEmitter.EventListener<EventTypes, T>,
context?: Context
): this;
/**
* Add a one-time listener for a given event.
*/
once<T extends EventEmitter.EventNames<EventTypes>>(
event: T,
fn: EventEmitter.EventListener<EventTypes, T>,
context?: Context
): this;
/**
* Remove the listeners of a given event.
*/
removeListener<T extends EventEmitter.EventNames<EventTypes>>(
event: T,
fn?: EventEmitter.EventListener<EventTypes, T>,
context?: Context,
once?: boolean
): this;
off<T extends EventEmitter.EventNames<EventTypes>>(
event: T,
fn?: EventEmitter.EventListener<EventTypes, T>,
context?: Context,
once?: boolean
): this;
/**
* Remove all listeners, or those of the specified event.
*/
removeAllListeners(event?: EventEmitter.EventNames<EventTypes>): this;
}
declare namespace EventEmitter {
export interface ListenerFn<Args extends any[] = any[]> {
(...args: Args): void;
}
export interface EventEmitterStatic {
new <
EventTypes extends ValidEventTypes = string | symbol,
Context = any
>(): EventEmitter<EventTypes, Context>;
}
/**
* `object` should be in either of the following forms:
* ```
* interface EventTypes {
* 'event-with-parameters': any[]
* 'event-with-example-handler': (...args: any[]) => void
* }
* ```
*/
export type ValidEventTypes = string | symbol | object;
export type EventNames<T extends ValidEventTypes> = T extends string | symbol
? T
: keyof T;
export type ArgumentMap<T extends object> = {
[K in keyof T]: T[K] extends (...args: any[]) => void
? Parameters<T[K]>
: T[K] extends any[]
? T[K]
: any[];
};
export type EventListener<
T extends ValidEventTypes,
K extends EventNames<T>
> = T extends string | symbol
? (...args: any[]) => void
: (
...args: ArgumentMap<Exclude<T, string | symbol>>[Extract<K, keyof T>]
) => void;
export type EventArgs<
T extends ValidEventTypes,
K extends EventNames<T>
> = Parameters<EventListener<T, K>>;
export const EventEmitter: EventEmitterStatic;
}
declare class BatchGeneration<Body, Response> extends EventEmitter<{
batch_complete: (response: Response, progress: {
currentBatch: number;
totalBatches: number;
}) => void;
batch_start: (progress: {
currentBatch: number;
totalBatches: number;
}) => void;
batch_error: (error: any, progress: {
currentBatch: number;
totalBatches: number;
}) => void;
complete: (responses: Response[]) => void;
error: (error: any) => void;
start: () => void;
}> {
readonly body: Body;
readonly options: {
batchSize: number;
numBatches: number;
};
responses: Response[];
constructor(body: Body, options: {
batchSize: number;
numBatches: number;
});
/**
* Checks if the current batch generation is complete.
*
* @return {boolean} Returns true if the number of responses is equal to the number of batches, false otherwise.
*/
isComplete(): boolean;
runOneBatch(): Promise<Response>;
/**
* Waits for the completion of an asynchronous operation and returns a Promise that resolves with an array of responses.
*
* @return {Promise<Response[]>} A Promise that resolves with an array of responses when the operation is complete, or rejects with an error if there is an error.
*/
waitForComplete(): Promise<Response[]>;
/**
* Runs the batch generation process.
*
* @return {Promise<Response[]>} A Promise that resolves with an array of responses when the batch generation is complete, or rejects with an error if there is an error.
*/
run(): Promise<Response[] | undefined>;
}
type ModelListResponse = {
model_list: string[];
};
type ModuleListResponse = {
module_list: string[];
module_detail: Record<string, {
model_free: boolean;
sliders: {
max: number;
min: number;
name: string;
step: number;
value: number;
}[];
}>;
};
type DetectResponse = {
images: string[];
info: "Success" | "Error";
poses?: {
animals: any[];
canvas_height: number;
canvas_width: number;
people: {
face_keypoints_2d: number[];
hand_left_keypoints_2d: number[];
hand_right_keypoints_2d: number[];
pose_keypoints_2d: number[];
}[];
}[];
};
type ControlNetDetectRequestBody = Body_detect_controlnet_detect_post;
type ControlTypes = {
version: number;
models: string[];
modules: string[];
types: Record<string, {
module_list: string[];
model_list: string[];
default_option: string;
default_model: string;
}>;
};
type GenerationResponseInfo = {
prompt: string;
all_prompts: string[];
negative_prompt: string;
all_negative_prompts: string[];
seed: number;
all_seeds: number[];
subseed: number;
all_subseeds: number[];
subseed_strength: number;
width: number;
height: number;
sampler_name: string;
cfg_scale: number;
steps: number;
batch_size: number;
restore_faces: boolean;
face_restoration_model: null;
sd_model_name: string;
sd_model_hash: string;
sd_vae_name: null;
sd_vae_hash: null;
seed_resize_from_w: number;
seed_resize_from_h: number;
denoising_strength: null;
extra_generation_params: Record<string, any>;
index_of_first_image: number;
infotexts: string[];
styles: any[];
job_timestamp: string;
clip_skip: number;
is_using_inpainting_conditioning: boolean;
version: string;
};
declare class Img2imgBatchGeneration$1 extends BatchGeneration<Img2imgProcessParams, {
images: string[];
info: GenerationResponseInfo;
}> {
readonly api: ControlNetApi;
readonly units: ControlNetUnitRequest[];
constructor(api: ControlNetApi, body: Img2imgProcessParams, options: {
batchSize: number;
numBatches: number;
}, units: ControlNetUnitRequest[]);
runOneBatch(): Promise<{
image: string;
images: string[];
info: GenerationResponseInfo;
}>;
}
declare class Txt2imgBatchGeneration$1 extends BatchGeneration<Txt2imgProcessParams, {
images: string[];
info: GenerationResponseInfo;
}> {
readonly api: ControlNetApi;
readonly units: ControlNetUnitRequest[];
constructor(api: ControlNetApi, body: Txt2imgProcessParams, options: {
batchSize: number;
numBatches: number;
}, units: ControlNetUnitRequest[]);
runOneBatch(): Promise<{
image: string;
images: string[];
info: GenerationResponseInfo;
}>;
}
declare class ControlNetApi extends CachedApi {
get client(): SDWebUIA1111Client;
cache_key_prefix(): string;
/**
* Retrieves a list of models from the controlnet API.
*
* @return {Promise<string[]>} A promise that resolves to an array of model names.
*/
private _getModels;
/**
* Retrieves the module list response from the controlnet API.
*
* @return {Promise<ModuleListResponse>} A promise that resolves to the module list response.
*/
private _getModuleResponse;
/**
* Retrieves a list of models from the controlnet API, caching the result if caching is enabled.
*
* @return {Promise<string[]>} A promise that resolves to an array of model names.
*/
getModels(): Promise<string[]>;
/**
* Retrieves a list of modules from the cache if caching is enabled, otherwise makes a request to the controlnet API.
*
* @return {Promise<string[]>} A promise that resolves to an array of module names.
*/
getModules(): Promise<ModuleListResponse>;
/**
* Retrieves the detail of a module from the cache if caching is enabled, otherwise makes a request to the controlnet API.
*
* @param {string} module - The name of the module to retrieve the detail for.
* @return {Promise<{model_free: boolean, sliders: {max: number, min: number, name: string, step: number, value: number}[],}>} A promise that resolves to the module detail.
*/
getModuleDetail(module: string): Promise<ModuleListResponse>;
/**
* Retrieves the version of the controlnet API.
*
* @return {Promise<number>} A promise that resolves to the version number.
*/
private _getVersion;
/**
* Retrieves the control types from the controlnet API.
*
* @return {Promise<ControlTypes>} A promise that resolves to the control types.
**/
private _getControlTypes;
/**
* Retrieves the control types from the controlnet API.
*
* @return {Promise<ControlTypes>} A promise that resolves to the control types.
**/
getControlTypes(): Promise<ControlTypes>;
/**
* Retrieves the version of the controlnet API.
*
* @return {Promise<number>} A promise that resolves to the version number.
*/
getVersion(): Promise<number>;
/**
* Retrieves the details of all modules from the cache if caching is enabled, otherwise makes a request to the controlnet API.
*
* @return {Promise<Record<string, {model_free: boolean, sliders: {max: number, min: number, name: string, step: number, value: number}[],}>} A promise that resolves to an object containing the details of all modules.
*/
getAllModuleDetail(): Promise<ModuleListResponse>;
/**
* Detects objects in an image using the controlnet API.
*
* @param {ControlNetDetectRequestBody} params - The parameters for the detection.
* @return {Promise<DetectResponse>} A promise that resolves to the detection response.
*/
detect(params: ControlNetDetectRequestBody): Promise<DetectResponse>;
/**
* Asynchronously sends a text to the server for processing and returns the processed image and information.
*
* @param {Object} options - The options for the text to image processing.
* @param {Txt2imgProcessParams} options.params - The parameters for the text to image processing.
* @param {ControlNetUnitRequest[]} options.units - The control net units for the text to image processing.
* @return {Promise<{ image: string, images: string[], info: GenerationResponseInfo }>} The processed image and information.
* @throws {Error} If no image is returned from the server.
*/
txt2img({ params, units, }: {
params: Txt2imgProcessParams;
units: ControlNetUnitRequest[];
}): Promise<{
image: string;
images: string[];
info: GenerationResponseInfo;
}>;
/**
* Asynchronously sends an image to the server for processing and returns the processed image and information.
*
* @param {Object} options - The options for the image to image processing.
* @param {Img2imgProcessParams} options.params - The parameters for the image to image processing.
* @param {ControlNetUnitRequest[]} options.units - The control net units for the image to image processing.
* @return {Promise<{ image: string, images: string[], info: GenerationResponseInfo }>} The processed image and information.
* @throws {Error} If no image is returned from the server.
*/
img2img({ params, units, }: {
params: Img2imgProcessParams;
units: ControlNetUnitRequest[];
}): Promise<{
image: string;
images: string[];
info: GenerationResponseInfo;
}>;
/**
* Asynchronously creates a batch of image-to-image generations and returns the batch object.
*
* @param {Object} param - The parameters for the batch generation.
* @param {Img2imgProcessParams} param.params - The image processing parameters.
* @param {Object} param.options - The options for the batch generation.
* @param {number} param.options.batchSize - The number of images to generate in each batch.
* @param {number} param.options.numBatches - The total number of batches to generate.
* @param {boolean} [param.options.manual] - Whether to manually run the batch generation.
* @param {ControlNetUnitRequest[]} param.units - The control network units for the batch generation.
* @return {Promise<Img2imgBatchGeneration>} A promise that resolves to the batch object.
*/
img2imgBatch({ params, options, units, }: {
params: Img2imgProcessParams;
options: {
batchSize: number;
numBatches: number;
manual?: boolean;
};
units: ControlNetUnitRequest[];
}): Promise<Img2imgBatchGeneration$1>;
/**
* Asynchronously sends a text to the server for processing and returns the processed image and information.
*
* @param {Object} options - The options for the text to image processing.
* @param {Txt2imgProcessParams} options.params - The parameters for the text to image processing.
* @param {Object} options.options - The options for the text to image processing.
* @param {number} options.options.batchSize - The number of images to generate in each batch.
* @param {number} options.options.numBatches - The total number of batches to generate.
* @param {boolean} [options.options.manual] - Whether to manually run the batch generation.
* @param {ControlNetUnitRequest[]} options.units - The control net units for the batch generation.
* @return {Promise<Txt2imgBatchGeneration>} A promise that resolves to the batch object.
*/
txt2imgBatch({ params, options, units, }: {
params: Txt2imgProcessParams;
options: {
batchSize: number;
numBatches: number;
manual?: boolean;
};
units: ControlNetUnitRequest[];
}): Promise<Txt2imgBatchGeneration$1>;
}
declare class Img2imgBatchGeneration extends BatchGeneration<StableDiffusionProcessingImg2Img, {
images: string[];
info: GenerationResponseInfo;
}> {
readonly serviceApi: ServiceApi;
constructor(serviceApi: ServiceApi, body: StableDiffusionProcessingImg2Img, options: {
batchSize: number;
numBatches: number;
});
runOneBatch(): Promise<{
image: string;
images: string[];
info: GenerationResponseInfo;
}>;
}
declare class Txt2imgBatchGeneration extends BatchGeneration<StableDiffusionProcessingTxt2Img, {
images: string[];
info: GenerationResponseInfo;
}> {
readonly serviceApi: ServiceApi;
constructor(serviceApi: ServiceApi, body: StableDiffusionProcessingTxt2Img, options: {
batchSize: number;
numBatches: number;
});
runOneBatch(): Promise<{
image: string;
images: string[];
info: GenerationResponseInfo;
}>;
}
type ProgressResponse = modules__api__models__ProgressResponse;
declare class ProgressWatcher extends EventEmitter<{
progress: (progress: ProgressResponse) => void;
done: () => void;
}> {
readonly options: {
intervalMs: number;
};
readonly serviceApi: ServiceApi;
isDone: boolean;
constructor(options: {
intervalMs: number;
}, serviceApi: ServiceApi);
start(params?: {
getCurrentImage?: boolean | undefined;
}): Promise<void>;
stop(): void;
}
declare class ServiceApi extends CachedApi {
cache_key_prefix(): string;
/**
* Retrieves the SD models from the API.
*
* @return {Promise<Response>} A promise that resolves to the response containing the SD models.
*/
private _getSDModels;
/**
* Retrieves the samplers from the API.
*
* @return {Promise<Response>} A promise that resolves to the response containing the samplers.
*/
private _getSamplers;
/**
* Retrieves the SD models from the API.
*
* @return {Promise<Response>} A promise that resolves to the response containing the SD models.
*/
getSDModels(): Promise<SDModelItem[]>;
/**
* Retrieves the samplers from the API.
*
* @return {Promise<Response>} A promise that resolves to the response containing the samplers.
*/
getSamplers(): Promise<SamplerItem[]>;
/**
* Retrieves the embeddings from the API.
*
* @return {Promise<Response>} A promise that resolves to the response containing the embeddings.
*/
private _getEmbeddings;
/**
* Retrieves the embeddings from the API.
*
* @return {Promise<Response>} A promise that resolves to the response containing the embeddings.
*/
getEmbeddings(): Promise<EmbeddingsResponse>;
/**
* Retrieves the extension list from the API.
*
* @return {Promise<Response>} A promise that resolves to the response containing the extension list.
*/
private _getExtensionList;
/**
* Retrieves the extension list from the API.
*
* @return {Promise<Response>} A promise that resolves to the response containing the extension list.
*/
getExtensionList(): Promise<ExtensionItem[]>;
/**
* Pings the API to check the response time.
*
* @return {Promise<{ success: boolean, time: number, error?: any }>} An object containing the success status,
* the response time in milliseconds, and an optional error object if the ping fails.
*/
ping(): Promise<{
success: boolean;
time: number;
error?: undefined;
} | {
success: boolean;
time: number;
error: unknown;
}>;
/**
* Asynchronously sends an image to the server for processing and returns the processed image and information.
*
* @param {StableDiffusionProcessingImg2Img} requestBody - The image to be processed.
* @return {Promise<{ image: string, images: string[], info: GenerationResponseInfo }>} The processed image and information.
*/
img2img(requestBody: StableDiffusionProcessingImg2Img): Promise<{
image: string;
images: string[];
info: GenerationResponseInfo;
}>;
/**
* Asynchronously sends a text to the server for processing and returns the processed image and information.
*
* @param {StableDiffusionProcessingTxt2Img} requestBody - The text to be processed.
* @return {Promise<{ image: string, images: string[], info: GenerationResponseInfo }>} The processed image and information.
*/
txt2img(requestBody: StableDiffusionProcessingTxt2Img): Promise<{
image: string;
images: string[];
info: GenerationResponseInfo;
}>;
/**
* Asynchronously creates a batch of image-to-image generations and returns the batch object.
*
* @param {StableDiffusionProcessingImg2Img} body - The image to be processed.
* @param {Object} options - The options for the batch generation.
* @param {number} options.batchSize - The number of images to generate in each batch.
* @param {number} options.numBatches - The total number of batches to generate.
* @param {boolean} options.manual - Whether to manually run the batch generation.
* @return {Promise<Img2imgBatchGeneration>} A promise that resolves to the batch object.
*/
img2imgBatch(body: StableDiffusionProcessingImg2Img, options: {
batchSize: number;
numBatches: number;
manual?: boolean;
}): Promise<Img2imgBatchGeneration>;
/**
* Asynchronously creates a batch of text-to-image generations and returns the batch object.
*
* @param {StableDiffusionProcessingTxt2Img} body - The text to be processed.
* @param {Object} options - The options for the batch generation.
* @param {number} options.batchSize - The number of images to generate in each batch.
* @param {number} options.numBatches - The total number of batches to generate.
* @param {boolean} options.manual - Whether to manually run the batch generation.
* @return {Promise<Txt2imgBatchGeneration>} A promise that resolves to the batch object.
*/
txt2imgBatch(body: StableDiffusionProcessingTxt2Img, options: {
batchSize: number;
numBatches: number;
manual?: boolean;
}): Promise<Txt2imgBatchGeneration>;
/**
* Asynchronously retrieves the progress of a task.
*
* @param {Object} [params] - Optional parameters for the progress request.
* @param {boolean} [params.getCurrentImage] - Whether to include the current image in the response. Defaults to false.
* @return {Promise<Object>} A promise that resolves to the progress response object.
*/
progress(params?: {
getCurrentImage?: boolean;
}): Promise<modules__api__models__ProgressResponse>;
/**
* Asynchronously watches the progress of current task.
*
* @param {Object} options - The options for the progress watcher.
* @param {number} options.intervalMs - The interval in milliseconds to check the progress.
* @param {boolean} options.manual - Whether to manually start the progress watcher.
* @param {boolean} options.getCurrentImage - Whether to include the current image in the response. Defaults to false.
* @return {ProgressWatcher} The progress watcher object.
*/
watchProgress(options: {
intervalMs: number;
manual?: boolean;
getCurrentImage?: boolean;
}): ProgressWatcher;
}
type ApiOptions = {
client: Partial<OpenAPIConfig> & {
BASE: string;
};
cache?: Partial<Omit<CachedApiOptions, "client">>;
};
/**
* The API for the A1111 Stable Diffusion API.
*
* @param {ApiOptions} options - The options for the constructor.
*/
declare class A1111StableDiffusionApi {
client: SDWebUIA1111Client;
ControlNet: ControlNetApi;
Service: ServiceApi;
constructor(options: ApiOptions);
}
declare const _default$1: readonly [{
readonly name: "DPM++ 2M";
readonly aliases: readonly ["k_dpmpp_2m"];
readonly options: {
readonly scheduler: "karras";
};
}, {
readonly name: "DPM++ SDE";
readonly aliases: readonly ["k_dpmpp_sde"];
readonly options: {
readonly scheduler: "karras";
readonly second_order: "True";
readonly brownian_noise: "True";
};
}, {
readonly name: "DPM++ 2M SDE";
readonly aliases: readonly ["k_dpmpp_2m_sde"];
readonly options: {
readonly scheduler: "exponential";
readonly brownian_noise: "True";
};
}, {
readonly name: "DPM++ 2M SDE Heun";
readonly aliases: readonly ["k_dpmpp_2m_sde_heun"];
readonly options: {
readonly scheduler: "exponential";
readonly brownian_noise: "True";
readonly solver_type: "heun";
};
}, {
readonly name: "DPM++ 2S a";
readonly aliases: readonly ["k_dpmpp_2s_a"];
readonly options: {
readonly scheduler: "karras";
readonly uses_ensd: "True";
readonly second_order: "True";
};
}, {
readonly name: "DPM++ 3M SDE";
readonly aliases: readonly ["k_dpmpp_3m_sde"];
readonly options: {
readonly scheduler: "exponential";
readonly discard_next_to_last_sigma: "True";
readonly brownian_noise: "True";
};
}, {
readonly name: "Euler a";
readonly aliases: readonly ["k_euler_a", "k_euler_ancestral"];
readonly options: {
readonly uses_ensd: "True";
};
}, {
readonly name: "Euler";
readonly aliases: readonly ["k_euler"];
readonly options: {};
}, {
readonly name: "LMS";
readonly aliases: readonly ["k_lms"];
readonly options: {};
}, {
readonly name: "Heun";
readonly aliases: readonly ["k_heun"];
readonly options: {
readonly second_order: "True";
};
}, {
readonly name: "DPM2";
readonly aliases: readonly ["k_dpm_2"];
readonly options: {
readonly scheduler: "karras";
readonly discard_next_to_last_sigma: "True";
readonly second_order: "True";
};
}, {
readonly name: "DPM2 a";
readonly aliases: readonly ["k_dpm_2_a"];
readonly options: {
readonly scheduler: "karras";
readonly discard_next_to_last_sigma: "True";
readonly uses_ensd: "True";
readonly second_order: "True";
};
}, {
readonly name: "DPM fast";
readonly aliases: readonly ["k_dpm_fast"];
readonly options: {
readonly uses_ensd: "True";
};
}, {
readonly name: "DPM adaptive";
readonly aliases: readonly ["k_dpm_ad"];
readonly options: {
readonly uses_ensd: "True";
};
}, {
readonly name: "Restart";
readonly aliases: readonly ["restart"];
readonly options: {
readonly scheduler: "karras";
readonly second_order: "True";
};
}, {
readonly name: "DDIM";
readonly aliases: readonly ["ddim"];
readonly options: {};
}, {
readonly name: "DDIM CFG++";
readonly aliases: readonly ["ddim_cfgpp"];
readonly options: {};
}, {
readonly name: "PLMS";
readonly aliases: readonly ["plms"];
readonly options: {};
}, {
readonly name: "UniPC";
readonly aliases: readonly ["unipc"];
readonly options: {};
}, {
readonly name: "LCM";
readonly aliases: readonly ["k_lcm"];
readonly options: {};
}];
declare const _default: readonly [{
readonly name: "automatic";
readonly label: "Automatic";
readonly aliases: null;
readonly default_rho: -1;
readonly need_inner_model: false;
}, {
readonly name: "uniform";
readonly label: "Uniform";
readonly aliases: null;
readonly default_rho: -1;
readonly need_inner_model: true;
}, {
readonly name: "karras";
readonly label: "Karras";
readonly aliases: null;
readonly default_rho: 7;
readonly need_inner_model: false;
}, {
readonly name: "exponential";
readonly label: "Exponential";
readonly aliases: null;
readonly default_rho: -1;
readonly need_inner_model: false;
}, {
readonly name: "polyexponential";
readonly label: "Polyexponential";
readonly aliases: null;
readonly default_rho: 1;
readonly need_inner_model: false;
}, {
readonly name: "sgm_uniform";
readonly label: "SGM Uniform";
readonly aliases: readonly ["SGMUniform"];
readonly default_rho: -1;
readonly need_inner_model: true;
}, {
readonly name: "kl_optimal";
readonly label: "KL Optimal";
readonly aliases: null;
readonly default_rho: -1;
readonly need_inner_model: false;
}, {
readonly name: "align_your_steps";
readonly label: "Align Your Steps";
readonly aliases: null;
readonly default_rho: -1;
readonly need_inner_model: false;
}, {
readonly name: "simple";
readonly label: "Simple";
readonly aliases: null;
readonly default_rho: -1;
readonly need_inner_model: true;
}, {
readonly name: "normal";
readonly label: "Normal";
readonly aliases: null;
readonly default_rho: -1;
readonly need_inner_model: true;
}, {
readonly name: "ddim";
readonly label: "DDIM";
readonly aliases: null;
readonly default_rho: -1;
readonly need_inner_model: true;
}, {
readonly name: "beta";
readonly label: "Beta";
readonly aliases: null;
readonly default_rho: -1;
readonly need_inner_model: true;
}];
type AnyStr = string & {};
type SamplerName = (typeof _default$1)[number]["name"] | (typeof _default$1)[number]["aliases"][number] | AnyStr;
type SchedulerName = (typeof _default)[number]["name"] | NonNullable<(typeof _default)[number]["aliases"]>[number] | AnyStr;
type RequestBody = Img2imgProcessParams & Txt2imgProcessParams;
type BodyKey = keyof RequestBody;
type BodyValue<K extends BodyKey> = NonNullable<RequestBody[K]>;
declare class Pipeline {
readonly client: SDWebUIA1111Client;
private processing;
/**
* Constructs a new Pipeline instance.
*
* @param {SDWebUIA1111Client} client - The client instance used for processing requests.
* @param {RequestBody} [init_body={}] - The initial request body to be used for processing.
*/
constructor(client: SDWebUIA1111Client, init_body?: RequestBody);
private run_t2i;
private run_i2i;
/**
* Adds an extension to the list of extensions.
*
* @param {ExtensionScript} ext - The extension to be added.
* @return {SDProcessor<Body>} The current SDProcessing object.
*/
use(ext: ExtensionScript): this;
/**
* Creates and adds a new ExtensionScript to the list of extensions.
*
* @param {string} name - The name of the extension script.
* @param {any[]} args - The arguments for the extension script.
* @return {SDProcessor<Body>} The current SDProcessing object.
*/
useCustomExt(name: string, args: any[]): this;
is_t2i(): boolean;
is_i2i(): boolean;
run(): Promise<TextToImageResponse>;
_write<K extends keyof RequestBody, V extends RequestBody[K]>(key: K, value: V): void;
/**
* Sets the text prompt for image generation.
* @param {BodyValue<"prompt">} text - The prompt text.
* @returns {this} The pipeline instance.
*/
prompt(text: BodyValue<"prompt">): this;
/**
* Sets the negative prompt to avoid undesired features in the image.
* @param {BodyValue<"negative_prompt">} text - The negative prompt text.
* @returns {this} The pipeline instance.
*/
negative(text: BodyValue<"negative_prompt">): this;
/**
* Sets the seed value for deterministic image generation.
* @param {BodyValue<"seed">} seed - The seed value.
* @returns {this} The pipeline instance.
*/
seed(seed: BodyValue<"seed">): this;
/**
* Sets the subseed value for variations in deterministic generation.
* @param {BodyValue<"subseed">} seed - The subseed value.
* @returns {this} The pipeline instance.
*/
subseed(seed: BodyValue<"subseed">): this;
/**
* Sets the sampler method used for generating images.
* @param {SamplerName} name - The sampler name.
* @returns {this} The pipeline instance.
*/
sampler(name: SamplerName): this;
/**
* Sets the scheduler method for image generation.
* @param {SchedulerName} name - The scheduler name.
* @returns {this} The pipeline instance.
*/
scheduler(name: SchedulerName): this;
/**
* Sets the batch size for image generation.
* @param {BodyValue<"batch_size">} size - The batch size.
* @returns {this} The pipeline instance.
*/
batch(size: BodyValue<"batch_size">): this;
/**
* Sets the number of inference steps.
* @param {BodyValue<"steps">} steps - The number of steps.
* @returns {this} The pipeline instance.
*/
steps(steps: BodyValue<"steps">): this;
/**
* Sets the classifier-free guidance scale.
* @param {BodyValue<"cfg_scale">} scale - The CFG scale value.
* @returns {this} The pipeline instance.
*/
cfg(scale: BodyValue<"cfg_scale">): this;
/**
* Sets the image size.
* @param {BodyValue<"width">} width - The image width.
* @param {BodyValue<"height">} height - The image height.
* @returns {this} The pipeline instance.
*/
size(width: BodyValue<"width">, height: BodyValue<"height">): this;
/**
* Enables high-resolution image generation.
* @param {BodyValue<"enable_hr">} [enable=true] - Whether to enable high-resolution mode.
* @returns {this} The pipeline instance.
*/
enableHR(enable?: BodyValue<"enable_hr">): this;
/**
* Configures high-resolution settings.
* @param {BodyValue<"hr_scale">} scale - The upscaling factor.
* @param {BodyValue<"hr_upscaler">} upscaler - The upscaler algorithm.
* @param {BodyValue<"hr_second_pass_steps">} [secondPassSteps] - Additional processing steps.
* @returns {this} The pipeline instance.
*/
hr(scale: BodyValue<"hr_scale">, upscaler: BodyValue<"hr_upscaler">, secondPassSteps?: BodyValue<"hr_second_pass_steps">): this;
/**
* Overrides some of the processing settings.
* @param {BodyValue<"override_settings">} settings - The settings to override.
* @param {boolean} [restore_afterwards=false] - Whether to restore the original settings after processing.
* @returns {this} The pipeline instance.
*/
override(settings: BodyValue<"override_settings">, restore_afterwards?: boolean): this;
/**
* Sets the model checkpoint to be used for processing.
* @param {string} sd_model_checkpoint - The checkpoint identifier for the model.
* @param {boolean} [restore_afterwards=false] - Whether to restore the original model checkpoint after processing.
* @returns {this} The pipeline instance.
*/
model(sd_model_checkpoint: string, restore_afterwards?: boolean): this;
/**
* Sets the script to be used for processing.
*
* @param {BodyValue<"script_name">} name - The name of the script.
* @param {BodyValue<"script_args">} [args] - Optional arguments for the script.
* @returns {this} The pipeline instance.
*/
script(name: BodyValue<"script_name">, args?: BodyValue<"script_args">): this;
/**
* Controls whether images are saved to disk or not.
* @param {BodyValue<"save_images">} [save=true] - Whether to save images.
* @returns {this} The pipeline instance.
*/
saveImages(save?: BodyValue<"save_images">): this;
/**
* Controls whether generated images are sent back to the client or not.
* @param {BodyValue<"send_images">} [send=true] - Whether to send images.
* @returns {this} The pipeline instance.
*/
sendImages(send?: BodyValue<"send_images">): this;
/**
* Sets the denoising strength for image processing.
* @param {BodyValue<"denoising_strength">} value - The denoising strength value.
* @returns {this} The pipeline instance.
*/
strength(value: BodyValue<"denoising_strength">): this;
/**
* Sets the initial images for image processing.
* @param {...BodyValue<"init_images">} images - The initial images.
* @returns {this} The pipeline instance.
*/
images(...images: BodyValue<"init_images">): this;
/**
* Sets the resize mode for image processing.
* @param {BodyValue<"resize_mode">} mode - The resize mode: 0 to upscale by upscaling_resize amount, 1 to upscale up to upscaling_resize_h x upscaling_resize_w.
* @returns {this} The pipeline instance.
*/
resizeMode(mode: BodyValue<"resize_mode">): this;
/**
* Sets the image configuration scale used in image processing.
* @param {BodyValue<"image_cfg_scale">} scale - The scale value for image configuration.
* @returns {this} The pipeline instance.
*/
imageCfgScale(scale: BodyValue<"image_cfg_scale">): this;
/**
* Sets the mask for image processing.
* @param {BodyValue<"mask">} mask - The mask image (base64).
* @param {Object} [options] - Optional parameters.
* @param {BodyValue<"mask_blur_x">} [options.blurX] - The blur value for the mask in the X direction.
* @param {BodyValue<"mask_blur_y">} [options.blurY] - The blur value for the mask in the Y direction.
* @param {BodyValue<"mask_blur">} [options.blur] - The blur value for the mask.
* @param {BodyValue<"mask_round">} [options.round] - Whether to round the mask.
* @returns {this} The pipeline instance.
*/
mask(mask: BodyValue<"mask">, { blur, blurX, blurY, round, }?: {
blurX?: BodyValue<"mask_blur_x">;
blurY?: BodyValue<"mask_blur_y">;
blur?: BodyValue<"mask_blur">;
round?: BodyValue<"mask_round">;
}): this;
/**
* Configures inpainting settings for image processing.
*
* @param {BodyValue<"inpainting_fill">} fill - The fill type for inpainting, defaults to original.
* @param {Object} [options] - Optional parameters for inpainting.
* @param {BodyValue<"inpaint_full_res">} [options.fullRes] - Whether to use full resolution for inpainting.
* @param {BodyValue<"inpaint_full_res_padding">} [options.fullResPadding] - Padding to apply when using full resolution.
* @param {BodyValue<"inpainting_mask_invert">} [options.maskInvert] - Invert the mask for inpainting.
* @returns {this} The pipeline instance.
*/
inpainting(fill?: BodyValue<"inpainting_fill">, { fullRes, fullResPadding, maskInvert, }?: {
fullRes?: BodyValue<"inpaint_full_res">;
fullResPadding?: BodyValue<"inpaint_full_res_padding">;
maskInvert?: BodyValue<"inpainting_mask_invert">;
}): this;
/**
* Sets the initial noise multiplier.
* @param {BodyValue<"initial_noise_multiplier">} value - The initial noise multiplier.
* @returns {this} The pipeline instance.
*/
initialNoiseMultiplier(value: BodyValue<"initial_noise_multiplier">): this;
/**
* Sets the always-on scripts.
* @param {BodyValue<"alwayson_scripts">} scripts - The always-on scripts configuration.
* @returns {this} The pipeline instance.
*/
alwaysOnScripts(scripts: BodyValue<"alwayson_scripts">): this;
}
export { A1111StableDiffusionApi, ADetailerExt, ADetailerExtArgs, ADetailerParams, ApiError, BaseHttpRequest, Body_detect_controlnet_detect_post, Body_rembg_remove_rembg_post, Body_upload_file_upload_post, CancelError, CancelablePromise, ControlMode, ControlNetApi, ControlNetDetectRequestBody, ControlNetExt, ControlNetUnitRequest, ControlTypes, CreateResponse, CutoffExt, CutoffExtArgs, CutoffParams, DefaultService, DetectResponse, DynamicCFGArgs, DynamicCFGExt, DynamicCFGParams, EmbeddingItem, EmbeddingsResponse, Estimation, ExtensionItem, ExtensionScript, ExtrasBatchImagesRequest, ExtrasBatchImagesResponse, ExtrasSingleImageRequest, ExtrasSingleImageResponse, FaceRestorerItem, FileData, Flags, GenerationResponseInfo, HTTPValidationError, HistoryResponse, HypernetworkItem, ImageToImageResponse, Img2ImgApiTaskArgs, Img2imgProcess, Img2imgProcessParams, InpaintFill, InpaintFullRes, InterrogateRequest, LatentUpscalerModeItem, MemoryResponse, ModelListResponse, ModuleListResponse, OpenAPI, OpenAPIConfig, Options, PNGInfoRequest, PNGInfoResponse, Person, Pipeline, PoseData, PredictBody, ProgressRequest, PromptStyleItem, QueueStatusResponse, QueueTaskResponse, QuicksettingsHint, RealesrganItem, ResetBody, ResizeMode, ResizeModeI2i, SDModelItem, SDTask, SDTaskRunner, SDTaskScheduler, SDTaskStatus, SDVaeItem, SDWebUIA1111Client, SDWebUIA1111SystemSettings, SamplerItem, SchedulerItem, ScriptArg, ScriptInfo, ScriptsList, ServiceApi, StableDiffusionProcessingImg2Img, StableDiffusionProcessingTxt2Img, StringRequestBody, SystemSettingProcess, TaskModel, TextToImageResponse, TiledDiffusionArgs, TiledDiffusionExt, TiledDiffusionMethod, TiledDiffusionParams, TiledVAEArgs, TiledVAEExt, TiledVAEParams, TrainResponse, Txt2ImgApiTaskArgs, Txt2imgProcess, Txt2imgProcessParams, UpdateTaskArgs, UpscalerItem, UseCountListRequest, ValidationError, modules__api__models__ProgressResponse, modules__progress__ProgressResponse };