add grid stage to chain def
This commit is contained in:
parent
dc812a4e06
commit
15b8a80f6d
|
@ -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<Txt2ImgStage | Img2ImgStage>;
|
||||
stages: Array<Txt2ImgStage | Img2ImgStage | GridStage>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue