mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
add upscaling data to metadata
This commit is contained in:
parent
890a3ce32a
commit
7854d913b2
@ -23,7 +23,7 @@ import { addLoRAs } from './generation/addLoRAs';
|
|||||||
import { addSDXLLoRas } from './generation/addSDXLLoRAs';
|
import { addSDXLLoRas } from './generation/addSDXLLoRAs';
|
||||||
import { getBoardField, getSDXLStylePrompts } from './graphBuilderUtils';
|
import { getBoardField, getSDXLStylePrompts } from './graphBuilderUtils';
|
||||||
import { fetchModelConfigWithTypeGuard } from '../../../metadata/util/modelFetchingHelpers';
|
import { fetchModelConfigWithTypeGuard } from '../../../metadata/util/modelFetchingHelpers';
|
||||||
import { isNonRefinerMainModelConfig } from '../../../../services/api/types';
|
import { isNonRefinerMainModelConfig, isSpandrelImageToImageModelConfig } from '../../../../services/api/types';
|
||||||
|
|
||||||
export const UPSCALE_SCALE = 2;
|
export const UPSCALE_SCALE = 2;
|
||||||
|
|
||||||
@ -195,6 +195,7 @@ export const buildMultidiffusionUpscsaleGraph = async (state: RootState): Promis
|
|||||||
addLoRAs(state, g, tiledMultidiffusionNode, modelNode, null, clipSkipNode, posCondNode, negCondNode);
|
addLoRAs(state, g, tiledMultidiffusionNode, modelNode, null, clipSkipNode, posCondNode, negCondNode);
|
||||||
|
|
||||||
const modelConfig = await fetchModelConfigWithTypeGuard(model.key, isNonRefinerMainModelConfig);
|
const modelConfig = await fetchModelConfigWithTypeGuard(model.key, isNonRefinerMainModelConfig);
|
||||||
|
const upscaleModelConfig = await fetchModelConfigWithTypeGuard(upscaleModel.key, isSpandrelImageToImageModelConfig);
|
||||||
|
|
||||||
g.upsertMetadata({
|
g.upsertMetadata({
|
||||||
cfg_scale,
|
cfg_scale,
|
||||||
@ -207,6 +208,10 @@ export const buildMultidiffusionUpscsaleGraph = async (state: RootState): Promis
|
|||||||
steps,
|
steps,
|
||||||
scheduler,
|
scheduler,
|
||||||
vae: vae ?? undefined,
|
vae: vae ?? undefined,
|
||||||
|
upscale_model: Graph.getModelMetadataField(upscaleModelConfig),
|
||||||
|
creativity,
|
||||||
|
sharpness,
|
||||||
|
structure
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user