1
0
Fork 0

add tile size to grid jobs

This commit is contained in:
Sean Sube 2023-09-11 17:35:47 -05:00
parent 1247cb7307
commit bf830a9032
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 13 additions and 3 deletions

View File

@ -165,7 +165,9 @@ export interface HighresParams {
export interface Txt2ImgStage { export interface Txt2ImgStage {
name: string; name: string;
type: 'source-txt2img'; type: 'source-txt2img';
params: Txt2ImgParams; params: Txt2ImgParams & {
tile_size: number;
};
} }
export interface Img2ImgStage { export interface Img2ImgStage {
@ -180,6 +182,7 @@ export interface GridStage {
params: { params: {
height: number; height: number;
width: number; width: number;
tile_size: number;
}; };
} }
@ -187,7 +190,7 @@ export interface OutputStage {
name: string; name: string;
type: 'persist-disk'; type: 'persist-disk';
params: { params: {
/* none */ tile_size: number;
}; };
} }

View File

@ -30,6 +30,8 @@ export function buildPipelineForTxt2ImgGrid(grid: PipelineGrid, model: ModelPara
...model, ...model,
[grid.columns.parameter]: column, [grid.columns.parameter]: column,
[grid.rows.parameter]: row, [grid.rows.parameter]: row,
// eslint-disable-next-line camelcase
tile_size: 8192,
}, },
}); });
@ -45,13 +47,18 @@ export function buildPipelineForTxt2ImgGrid(grid: PipelineGrid, model: ModelPara
...model, ...model,
height: grid.rows.values.length, height: grid.rows.values.length,
width: grid.columns.values.length, width: grid.columns.values.length,
// eslint-disable-next-line camelcase
tile_size: 8192,
}, },
}); });
pipeline.stages.push({ pipeline.stages.push({
name: 'save', name: 'save',
type: 'persist-disk', type: 'persist-disk',
params: {}, params: {
// eslint-disable-next-line camelcase
tile_size: 8192,
},
}); });
return pipeline; return pipeline;