diff --git a/gui/src/client/types.ts b/gui/src/client/types.ts index d1912d7b..908f70b0 100644 --- a/gui/src/client/types.ts +++ b/gui/src/client/types.ts @@ -174,8 +174,17 @@ export interface Img2ImgStage { params: Img2ImgParams; } +export interface GridStage { + name: string; + type: 'blend-grid'; + params: { + height: number; + width: number; + }; +} + export interface ChainPipeline { - stages: Array; + stages: Array; } /** diff --git a/gui/src/client/utils.ts b/gui/src/client/utils.ts index 20742556..fc7aad74 100644 --- a/gui/src/client/utils.ts +++ b/gui/src/client/utils.ts @@ -27,6 +27,7 @@ export function buildPipelineForTxt2ImgGrid(grid: PipelineGrid, model: ModelPara type: 'source-txt2img', params: { ...params, + ...model, [grid.columns.parameter]: column, [grid.rows.parameter]: row, }, @@ -36,7 +37,16 @@ export function buildPipelineForTxt2ImgGrid(grid: PipelineGrid, model: ModelPara } } - // TODO: add final grid stage + pipeline.stages.push({ + name: 'grid', + type: 'blend-grid', + params: { + ...params, + ...model, + height: grid.rows.values.length, + width: grid.columns.values.length, + }, + }); return pipeline; }