add output stage, parse individual numbers
This commit is contained in:
parent
dcc0063195
commit
89de05b7c5
|
@ -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>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -48,5 +48,11 @@ export function buildPipelineForTxt2ImgGrid(grid: PipelineGrid, model: ModelPara
|
|||
},
|
||||
});
|
||||
|
||||
pipeline.stages.push({
|
||||
name: 'save',
|
||||
type: 'persist-disk',
|
||||
params: {},
|
||||
});
|
||||
|
||||
return pipeline;
|
||||
}
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue