Txt2ImgOptions: {
    alwayson_scripts: Record<string, any> | null;
    batch_size: number;
    cfg_scale: number;
    comments: Record<string, any> | null;
    denoising_strength: number | null;
    disable_extra_networks: boolean;
    do_not_save_grid: boolean;
    do_not_save_samples: boolean;
    enable_hr: boolean;
    eta: number | null;
    firstpass_image: string | null;
    firstphase_height: number;
    firstphase_width: number;
    force_task_id: string | null;
    height: number;
    hr_checkpoint_name: string | null;
    hr_negative_prompt: string;
    hr_prompt: string;
    hr_resize_x: number;
    hr_resize_y: number;
    hr_sampler_name: string | null;
    hr_scale: number;
    hr_scheduler: string | null;
    hr_second_pass_steps: number;
    hr_upscaler: string | null;
    infotext: string | null;
    n_iter: number;
    negative_prompt: string;
    override_settings: OverrideSettings | null;
    override_settings_restore_afterwards: boolean;
    prompt: string;
    refiner_checkpoint: string | null;
    refiner_switch_at: number | null;
    restore_faces: boolean | null;
    s_churn: number | null;
    s_min_uncond: number | null;
    s_noise: number | null;
    s_tmax: number | null;
    s_tmin: number | null;
    sampler_index: string;
    sampler_name: string;
    save_images: boolean;
    scheduler: string | null;
    script_args: (string | number | null)[] | never[];
    script_name: string | null;
    seed: number;
    seed_resize_from_h: number;
    seed_resize_from_w: number;
    send_images: boolean;
    steps: number;
    styles: string[] | null;
    subseed: number;
    subseed_strength: number;
    tiling: boolean | null;
    width: number;
}

Represents the options that can be passed to the txt2img endpoint

Type declaration

  • alwayson_scripts: Record<string, any> | null

    Always on scripts

  • batch_size: number

    Batch number generation

  • cfg_scale: number

    Classifier Free Guidance (cfg) scale

    how closely you'd like your artwork generator to follow the input prompt

  • comments: Record<string, any> | null

    Comments

  • denoising_strength: number | null

    Denoising strength

    Determines the extent to which noise is removed or reduced in the generated images.

  • disable_extra_networks: boolean

    Should disable extra networks

  • do_not_save_grid: boolean

    Don't save grid

  • do_not_save_samples: boolean

    Don't save samples

  • enable_hr: boolean

    Enable High Resolution

  • eta: number | null

    Estimated Time of Arrival

  • firstpass_image: string | null

    First pass image

  • firstphase_height: number

    First phase height

  • firstphase_width: number

    First phase width

  • force_task_id: string | null

    Force Task ID

  • height: number

    image height

  • hr_checkpoint_name: string | null

    High Resolution checkpoint name

  • hr_negative_prompt: string

    High Resolution negative prompt

  • hr_prompt: string

    High Resolution positive prompt

  • hr_resize_x: number

    Resize High Resolution X

  • hr_resize_y: number

    Resize High Resolution Y

  • hr_sampler_name: string | null

    High Resolution Sampler name

  • hr_scale: number

    High Resolution scale

  • hr_scheduler: string | null

    High Resolution Scheduler

  • hr_second_pass_steps: number

    High Resolution second pass steps

  • hr_upscaler: string | null

    High Resolution upscaler to use

  • infotext: string | null

    Infotext

  • n_iter: number

    The number of iterations to run

  • negative_prompt: string

    The negative prompt to use for the generation

  • override_settings: OverrideSettings | null

    Override current settings

    See example

  • override_settings_restore_afterwards: boolean

    Restore settings after override

  • prompt: string

    The positive prompt to use for the generation

  • refiner_checkpoint: string | null

    Refiner checkpoint

  • refiner_switch_at: number | null

    Refiner switch at what point

  • restore_faces: boolean | null

    Should restore faces

  • s_churn: number | null

    s_churn

  • s_min_uncond: number | null

    s_min_uncond

  • s_noise: number | null

    s_noise

  • s_tmax: number | null

    s_tmax

  • s_tmin: number | null

    s_tmin

  • sampler_index: string

    Sampler index

  • sampler_name: string

    Sampler name to use for the generation

  • save_images: boolean

    Save the generated images

  • scheduler: string | null

    Scheduler to use for the generation

  • script_args: (string | number | null)[] | never[]

    Script arguments

  • script_name: string | null

    Script name to use

  • seed: number

    The seed to use for the generation

  • seed_resize_from_h: number

    resize seed from height

  • seed_resize_from_w: number

    resize seed from width

  • send_images: boolean

    Send the generated images meaning the images will be sent to the client and we are the client

    {"images": [...]}

  • steps: number

    The number of steps to run

  • styles: string[] | null

    Styles that should be applied to the generation

  • subseed: number

    Subseed to use for the generation

  • subseed_strength: number

    Strength of the subseed

  • tiling: boolean | null

    Should tile the image

  • width: number

    image width