diff --git a/invokeai/frontend/web/src/features/nodes/util/graph/buildMultidiffusionUpscaleGraph.ts b/invokeai/frontend/web/src/features/nodes/util/graph/buildMultidiffusionUpscaleGraph.ts index 551cc45113..2905f31b50 100644 --- a/invokeai/frontend/web/src/features/nodes/util/graph/buildMultidiffusionUpscaleGraph.ts +++ b/invokeai/frontend/web/src/features/nodes/util/graph/buildMultidiffusionUpscaleGraph.ts @@ -125,19 +125,11 @@ export const buildMultidiffusionUpscaleGraph = async (state: RootState): Promise g.addEdge(modelNode, 'unet', tiledMultidiffusionNode, 'unet'); addSDXLLoRas(state, g, tiledMultidiffusionNode, modelNode, null, posCondNode, negCondNode); - const modelConfig = await fetchModelConfigWithTypeGuard(model.key, isNonRefinerMainModelConfig); - g.upsertMetadata({ - cfg_scale, positive_prompt: positivePrompt, negative_prompt: negativePrompt, positive_style_prompt: positiveStylePrompt, negative_style_prompt: negativeStylePrompt, - model: Graph.getModelMetadataField(modelConfig), - seed, - steps, - scheduler, - vae: vae ?? undefined, }); } else { posCondNode = g.addNode({ @@ -166,24 +158,33 @@ export const buildMultidiffusionUpscaleGraph = async (state: RootState): Promise g.addEdge(modelNode, 'unet', tiledMultidiffusionNode, 'unet'); addLoRAs(state, g, tiledMultidiffusionNode, modelNode, null, clipSkipNode, posCondNode, negCondNode); - const modelConfig = await fetchModelConfigWithTypeGuard(model.key, isNonRefinerMainModelConfig); - const upscaleModelConfig = await fetchModelConfigWithTypeGuard(upscaleModel.key, isSpandrelImageToImageModelConfig); - g.upsertMetadata({ - cfg_scale, positive_prompt: positivePrompt, negative_prompt: negativePrompt, - model: Graph.getModelMetadataField(modelConfig), - seed, - steps, - scheduler, - vae: vae ?? undefined, - upscale_model: Graph.getModelMetadataField(upscaleModelConfig), - creativity, - structure, }); } + const modelConfig = await fetchModelConfigWithTypeGuard(model.key, isNonRefinerMainModelConfig); + const upscaleModelConfig = await fetchModelConfigWithTypeGuard(upscaleModel.key, isSpandrelImageToImageModelConfig); + + g.upsertMetadata({ + cfg_scale, + model: Graph.getModelMetadataField(modelConfig), + seed, + steps, + scheduler, + vae: vae ?? undefined, + upscale_model: Graph.getModelMetadataField(upscaleModelConfig), + creativity, + structure, + upscale_initial_image: { + image_name: upscaleInitialImage.image_name, + width: upscaleInitialImage.width, + height: upscaleInitialImage.height, + }, + upscale_scale: scale, + }); + g.setMetadataReceivingNode(l2iNode); g.addEdgeToMetadata(upscaleNode, 'width', 'width'); g.addEdgeToMetadata(upscaleNode, 'height', 'height');