Constructors

  • Constructs a new Pipeline instance.

    Parameters

    • client: SDWebUIA1111Client

      The client instance used for processing requests.

    • Optional init_body: RequestBody = {}

      The initial request body to be used for processing.

    Returns Pipeline

Properties

The client instance used for processing requests.

processing: SDProcessor<RequestBody>

Methods

  • Type Parameters

    • K extends "initial_noise_multiplier" | "s_min_uncond" | "s_churn" | "s_tmin" | "s_noise" | "init_images" | "mask" | "prompt" | "negative_prompt" | "styles" | "seed" | "subseed" | "subseed_strength" | "seed_resize_from_h" | "seed_resize_from_w" | "sampler_name" | "scheduler" | "batch_size" | "n_iter" | "steps" | "cfg_scale" | "width" | "height" | "restore_faces" | "tiling" | "do_not_save_samples" | "do_not_save_grid" | "eta" | "denoising_strength" | "s_tmax" | "override_settings" | "override_settings_restore_afterwards" | "refiner_checkpoint" | "refiner_switch_at" | "disable_extra_networks" | "firstpass_image" | "comments" | "resize_mode" | "image_cfg_scale" | "mask_blur_x" | "mask_blur_y" | "mask_blur" | "mask_round" | "inpainting_fill" | "inpaint_full_res" | "inpaint_full_res_padding" | "inpainting_mask_invert" | "latent_mask" | "force_task_id" | "sampler_index" | "include_init_images" | "script_name" | "script_args" | "send_images" | "save_images" | "alwayson_scripts" | "infotext" | "enable_hr" | "firstphase_width" | "firstphase_height" | "hr_scale" | "hr_upscaler" | "hr_second_pass_steps" | "hr_resize_x" | "hr_resize_y" | "hr_checkpoint_name" | "hr_sampler_name" | "hr_scheduler" | "hr_prompt" | "hr_negative_prompt"
    • V extends undefined | string | number | boolean | any[] | Record<string, any> | string[] | Record<string, any> & Record<string | number | symbol, any> & Partial<SDWebUIA1111SystemSettings>

    Parameters

    • key: K
    • value: V

    Returns void

  • Enables high-resolution image generation.

    Parameters

    • Optional enable: BodyValue<"enable_hr"> = true

      Whether to enable high-resolution mode.

    Returns Pipeline

    The pipeline instance.

  • Configures high-resolution settings.

    Parameters

    • scale: number

      The upscaling factor.

    • upscaler: string

      The upscaler algorithm.

    • Optional secondPassSteps: number

      Additional processing steps.

    Returns Pipeline

    The pipeline instance.

  • Sets the image configuration scale used in image processing.

    Parameters

    • scale: number

      The scale value for image configuration.

    Returns Pipeline

    The pipeline instance.

  • Configures inpainting settings for image processing.

    Parameters

    • fill: BodyValue<"inpainting_fill"> = InpaintFill.original

      The fill type for inpainting, defaults to original.

    • Optional options: {
          fullRes?: undefined;
          fullResPadding?: number;
          maskInvert?: BodyValue<"inpainting_mask_invert">;
      } = {}

      Optional parameters for inpainting.

      • Optional fullRes?: undefined

        Whether to use full resolution for inpainting.

      • Optional fullResPadding?: number

        Padding to apply when using full resolution.

      • Optional maskInvert?: BodyValue<"inpainting_mask_invert">

        Invert the mask for inpainting.

    Returns Pipeline

    The pipeline instance.

  • Sets the mask for image processing.

    Parameters

    • mask: string

      The mask image (base64).

    • Optional options: {
          blur?: number;
          blurX?: number;
          blurY?: number;
          round?: BodyValue<"mask_round">;
      } = {}

      Optional parameters.

      • Optional blur?: number

        The blur value for the mask.

      • Optional blurX?: number

        The blur value for the mask in the X direction.

      • Optional blurY?: number

        The blur value for the mask in the Y direction.

      • Optional round?: BodyValue<"mask_round">

        Whether to round the mask.

    Returns Pipeline

    The pipeline instance.

  • Sets the model checkpoint to be used for processing.

    Parameters

    • sd_model_checkpoint: string

      The checkpoint identifier for the model.

    • Optional restore_afterwards: boolean = false

      Whether to restore the original model checkpoint after processing.

    Returns Pipeline

    The pipeline instance.

  • Overrides some of the processing settings.

    Parameters

    • settings: Record<string, any> & Record<string | number | symbol, any> & Partial<SDWebUIA1111SystemSettings>

      The settings to override.

    • Optional restore_afterwards: boolean = false

      Whether to restore the original settings after processing.

    Returns Pipeline

    The pipeline instance.

  • Sets the resize mode for image processing.

    Parameters

    • mode: BodyValue<"resize_mode">

      The resize mode: 0 to upscale by upscaling_resize amount, 1 to upscale up to upscaling_resize_h x upscaling_resize_w.

    Returns Pipeline

    The pipeline instance.

  • Controls whether images are saved to disk or not.

    Parameters

    • Optional save: BodyValue<"save_images"> = true

      Whether to save images.

    Returns Pipeline

    The pipeline instance.

  • Sets the script to be used for processing.

    Parameters

    • name: string

      The name of the script.

    • Optional args: any[]

      Optional arguments for the script.

    Returns Pipeline

    The pipeline instance.

  • Controls whether generated images are sent back to the client or not.

    Parameters

    • Optional send: BodyValue<"send_images"> = true

      Whether to send images.

    Returns Pipeline

    The pipeline instance.

  • Creates and adds a new ExtensionScript to the list of extensions.

    Parameters

    • name: string

      The name of the extension script.

    • args: any[]

      The arguments for the extension script.

    Returns Pipeline

    The current SDProcessing object.