- Enhanced cursor behavior for new tools: semantic select, mask lasso, and mask rectangle. - Updated mask edit state to include mask asset ID and kind. - Implemented inpaint region commands for adding, applying, and removing inpaint regions. - Introduced new operations for lasso and semantic selection tools. - Created UI components for candidate review and inpaint region management. - Added tests for inpaint region commands to ensure functionality. - Updated various components to support new inpaint features and improve user experience.
65 lines
1.6 KiB
TypeScript
65 lines
1.6 KiB
TypeScript
import type { Rect, Size } from "./geometry";
|
|
import type { AssetId, GenerationCandidateId, InpaintRegionId, 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;
|
|
batchSize: number;
|
|
refinePass: boolean;
|
|
refineStrength: number;
|
|
};
|
|
inpaint?: {
|
|
targetLayerId: LayerId;
|
|
regionId: InpaintRegionId;
|
|
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;
|
|
profile: string;
|
|
structureControl: string;
|
|
controlStrength: number;
|
|
controlModel: string;
|
|
colorMatch: boolean;
|
|
};
|
|
};
|
|
};
|
|
|
|
export type AssetProvenance = AssetGenerationProvenance;
|