Class StableHordeGeneration

Api

public

Classdesc

A single image generation returned by Stable Horde.

Hierarchy

  • StableHordeGeneration

Implements

  • GenericModel

Constructors

Properties

workerName: string

The name of the worker that generated this image.

Methods

  • Will return the original base64-encoded image from Stable Horde.

    Returns

    A base64-encoded WEBP image.

    Returns string

  • Will return the image as a buffer.

    Returns

    A buffer containing the WEBP image data.

    Returns Buffer

  • An alias to the StableHordeGeneration#buffer method.

    Returns

    A buffer containing the WEBP image data.

    Returns Buffer

  • Saves the image to the specified path asynchronously.

    Parameters

    • path: string

      The path to save the image to.

    Returns Promise<void>

  • Saves the image to the specified path synchronously.

    Parameters

    • path: string

      The path to save the image to.

    Returns void

  • Creates a read stream from the image's buffer.

    Returns

    A read stream that you can pipe to a write stream.

    Returns ReadStream

  • Returns object

Generated using TypeDoc