Files
image-studio/core/asset-provenance.ts
syntaxbullet 5e4b548ad4 feat: add ComfyUI integration for image generation and management
- Implemented ComfyGenerateRequest type and associated functions for generating images using various architectures and modes.
- Added functions for listing generation options and handling image uploads.
- Created workflows for different generation modes including SDXL, Z-Image, Z-Image Turbo, and Anima.
- Introduced GenerationJobStatus component to display the status of ongoing generation jobs.
- Developed MaskControls for managing mask operations and displaying mask analysis.
- Created palette items for tool selection, layer management, and generation settings.
2026-07-10 23:15:02 +02:00

57 lines
1.3 KiB
TypeScript

import type { Rect, Size } from "./geometry";
import type { AssetId, GenerationCandidateId, LayerId } from "./id";
export type GeneratedAssetMode = "text-to-image" | "image-to-image" | "inpaint" | "outpaint";
export type GeneratedAssetAcceptance = "layer" | "replacement";
export type AssetGenerationProvenance = {
kind: "generated";
candidateId: GenerationCandidateId;
mode: GeneratedAssetMode;
acceptance: GeneratedAssetAcceptance;
prompt: string;
negativePrompt: string;
seed: number;
outputSize: Size;
settings: {
architecture: string;
model: string;
textEncoder: string;
vae: string;
strength: number;
steps: number;
cfg: number;
sampler: string;
scheduler: string;
width: number;
height: number;
};
inpaint?: {
targetLayerId: LayerId;
maskLayerId: LayerId;
sourceAssetId: AssetId;
maskAssetId: AssetId;
crop: {
assetBounds: Rect;
documentBounds: Rect;
padding: number;
maskedAreaOnly: boolean;
};
mask: {
polarity: "hidden" | "revealed";
activeBounds: Rect;
};
backend: {
growMaskBy: number;
maskedContent: string;
maskBlur: number;
maskFeather: number;
maskExpand: number;
cropPadding: number;
};
};
};
export type AssetProvenance = AssetGenerationProvenance;