1
0
Fork 0

add output stage, parse individual numbers

This commit is contained in:
Sean Sube 2023-09-10 22:19:46 -05:00
parent dcc0063195
commit 89de05b7c5
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
3 changed files with 16 additions and 2 deletions

View File

@ -183,8 +183,16 @@ export interface GridStage {
};
}
export interface OutputStage {
name: string;
type: 'persist-disk';
params: {
/* none */
};
}
export interface ChainPipeline {
stages: Array<Txt2ImgStage | Img2ImgStage | GridStage>;
stages: Array<Txt2ImgStage | Img2ImgStage | GridStage | OutputStage>;
}
/**

View File

@ -48,5 +48,11 @@ export function buildPipelineForTxt2ImgGrid(grid: PipelineGrid, model: ModelPara
},
});
pipeline.stages.push({
name: 'save',
type: 'persist-disk',
params: {},
});
return pipeline;
}

View File

@ -89,7 +89,7 @@ export const EXPR_NUMBER_RANGE = /^([0-9]+)-([0-9]+)$/;
export function expandRanges(range: string): Array<string | number> {
if (EXPR_STRICT_NUMBER.test(range)) {
// entirely numeric, return without parsing
return [range];
return [parseInt(range, 10)];
}
if (EXPR_NUMBER_RANGE.test(range)) {