Hierarchy (View Summary)

  • DataEntity<
        {
            error?: ErrorData;
            eta?: Date;
            etaSeconds?: number;
            id: string;
            isNSFW?: boolean;
            jobIndex?: number;
            negativePrompt?: string;
            positivePrompt?: string;
            previewUrl?: string;
            projectId: string;
            resultUrl?: null
            | string;
            seed?: number;
            status: JobStatus;
            step: number;
            stepCount: number;
            userCanceled?: boolean;
            workerName?: string;
        },
        JobEventMap,
    >
    • Job

Constructors

  • Parameters

    • data: {
          error?: ErrorData;
          eta?: Date;
          etaSeconds?: number;
          id: string;
          isNSFW?: boolean;
          jobIndex?: number;
          negativePrompt?: string;
          positivePrompt?: string;
          previewUrl?: string;
          projectId: string;
          resultUrl?: null | string;
          seed?: number;
          status: JobStatus;
          step: number;
          stepCount: number;
          userCanceled?: boolean;
          workerName?: string;
      }
      • Optionalerror?: ErrorData
      • Optionaleta?: Date

        Estimate completion time of the job (for long-running jobs like video generation). Updated by ComfyUI workers during inference.

      • OptionaletaSeconds?: number

        Estimated time remaining in seconds (for long-running jobs like video generation). Updated by ComfyUI workers during inference.

        Use eta instead.

      • id: string
      • OptionalisNSFW?: boolean
      • OptionaljobIndex?: number
      • OptionalnegativePrompt?: string
      • OptionalpositivePrompt?: string
      • OptionalpreviewUrl?: string
      • projectId: string
      • OptionalresultUrl?: null | string
      • Optionalseed?: number
      • status: JobStatus
      • step: number
      • stepCount: number
      • OptionaluserCanceled?: boolean
      • OptionalworkerName?: string
    • options: JobOptions

    Returns Job

Properties

data: {
    error?: ErrorData;
    eta?: Date;
    etaSeconds?: number;
    id: string;
    isNSFW?: boolean;
    jobIndex?: number;
    negativePrompt?: string;
    positivePrompt?: string;
    previewUrl?: string;
    projectId: string;
    resultUrl?: null | string;
    seed?: number;
    status: JobStatus;
    step: number;
    stepCount: number;
    userCanceled?: boolean;
    workerName?: string;
}

Type declaration

  • Optionalerror?: ErrorData
  • Optionaleta?: Date

    Estimate completion time of the job (for long-running jobs like video generation). Updated by ComfyUI workers during inference.

  • OptionaletaSeconds?: number

    Estimated time remaining in seconds (for long-running jobs like video generation). Updated by ComfyUI workers during inference.

    Use eta instead.

  • id: string
  • OptionalisNSFW?: boolean
  • OptionaljobIndex?: number
  • OptionalnegativePrompt?: string
  • OptionalpositivePrompt?: string
  • OptionalpreviewUrl?: string
  • projectId: string
  • OptionalresultUrl?: null | string
  • Optionalseed?: number
  • status: JobStatus
  • step: number
  • stepCount: number
  • OptionaluserCanceled?: boolean
  • OptionalworkerName?: string
lastUpdated: Date = ...
listeners: {
    completed?: (data: string) => void[];
    failed?: (data: ErrorData) => void[];
    progress?: (data: number) => void[];
    updated?: (data: string[]) => void[];
} = {}

Accessors

  • get enhancedImage(): | null
    | {
        error: undefined
        | ErrorData;
        getResultUrl: () => Promise<string>;
        progress: number;
        result: null | string;
        status: ProjectStatus;
    }
  • Returns
        | null
        | {
            error: undefined
            | ErrorData;
            getResultUrl: () => Promise<string>;
            progress: number;
            result: null | string;
            status: ProjectStatus;
        }

  • get eta(): undefined | Date
  • Estimate completion time of the job. Only available for ComfyUI-based workers during inference. Is useful when data is persisted Returns undefined if no ETA has been received.

    Returns undefined | Date

  • get etaSeconds(): undefined | number
  • Estimated time remaining in seconds for long-running jobs (e.g., video generation). Only available for ComfyUI-based workers during inference. Returns undefined if no ETA has been received.

    Returns undefined | number

    Use timeLeft instead.

  • get hasResultMedia(): boolean
  • Whether this job has a result media file available for download. Returns true if completed and not NSFW filtered.

    Returns boolean

  • get isNSFW(): boolean
  • Whether the image is NSFW or not. Only makes sense if job is completed. If NSFW filter is disabled, this property will always be false. If NSFW filter is enabled and the image is NSFW, image will not be available for download.

    Returns boolean

  • get previewUrl(): undefined | string
  • Last preview image URL generated by the worker.

    Returns undefined | string

  • get progress(): number
  • Progress of the job in percentage (0-100).

    Returns number

  • get resultUrl(): undefined | null | string
  • URL to the result image, could be null if the job was canceled or triggered NSFW filter while it was not disabled explicitly.

    Returns undefined | null | string

  • get seed(): undefined | number
  • Seed used to generate the image. This property is only available when the job is completed.

    Returns undefined | number

  • get stepCount(): number
  • Total number of steps that worker will perform.

    Returns number

  • get type(): "image" | "video" | "audio"
  • Media type produced by this job's model

    Returns "image" | "video" | "audio"

  • get workerName(): undefined | string
  • Name of the worker that is processing this job.

    Returns undefined | string

Methods

  • Enhance the image using the Flux model. This method will create a new project with the enhancement parameters and use the result image of the current job as the starting image.

    Parameters

    • strength: EnhancementStrength

      how much freedom the model has to change the image.

    • overrides: { positivePrompt?: string; stylePrompt?: string; tokenType?: TokenType } = {}

      optional parameters to override original prompt, style or token type.

    Returns Promise<string>

  • Get the result URL of the job. This method will make a request to the API to get signed URL. IMPORTANT: URL expires after 30 minutes, so make sure to download the result as soon as possible. For video jobs, this returns a video URL. For image jobs, this returns an image URL.

    Returns Promise<string>

  • Get a copy of the entity's data

    Returns {
        error?: ErrorData;
        eta?: Date;
        etaSeconds?: number;
        id: string;
        isNSFW?: boolean;
        jobIndex?: number;
        negativePrompt?: string;
        positivePrompt?: string;
        previewUrl?: string;
        projectId: string;
        resultUrl?: null | string;
        seed?: number;
        status: JobStatus;
        step: number;
        stepCount: number;
        userCanceled?: boolean;
        workerName?: string;
    }

    • Optionalerror?: ErrorData
    • Optionaleta?: Date

      Estimate completion time of the job (for long-running jobs like video generation). Updated by ComfyUI workers during inference.

    • OptionaletaSeconds?: number

      Estimated time remaining in seconds (for long-running jobs like video generation). Updated by ComfyUI workers during inference.

      Use eta instead.

    • id: string
    • OptionalisNSFW?: boolean
    • OptionaljobIndex?: number
    • OptionalnegativePrompt?: string
    • OptionalpositivePrompt?: string
    • OptionalpreviewUrl?: string
    • projectId: string
    • OptionalresultUrl?: null | string
    • Optionalseed?: number
    • status: JobStatus
    • step: number
    • stepCount: number
    • OptionaluserCanceled?: boolean
    • OptionalworkerName?: string