mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): include upscale metadata for SDXL multidiffusion
This commit is contained in:
parent
f27b6e2b44
commit
571ba87e13
@ -125,19 +125,11 @@ export const buildMultidiffusionUpscaleGraph = async (state: RootState): Promise
|
|||||||
g.addEdge(modelNode, 'unet', tiledMultidiffusionNode, 'unet');
|
g.addEdge(modelNode, 'unet', tiledMultidiffusionNode, 'unet');
|
||||||
addSDXLLoRas(state, g, tiledMultidiffusionNode, modelNode, null, posCondNode, negCondNode);
|
addSDXLLoRas(state, g, tiledMultidiffusionNode, modelNode, null, posCondNode, negCondNode);
|
||||||
|
|
||||||
const modelConfig = await fetchModelConfigWithTypeGuard(model.key, isNonRefinerMainModelConfig);
|
|
||||||
|
|
||||||
g.upsertMetadata({
|
g.upsertMetadata({
|
||||||
cfg_scale,
|
|
||||||
positive_prompt: positivePrompt,
|
positive_prompt: positivePrompt,
|
||||||
negative_prompt: negativePrompt,
|
negative_prompt: negativePrompt,
|
||||||
positive_style_prompt: positiveStylePrompt,
|
positive_style_prompt: positiveStylePrompt,
|
||||||
negative_style_prompt: negativeStylePrompt,
|
negative_style_prompt: negativeStylePrompt,
|
||||||
model: Graph.getModelMetadataField(modelConfig),
|
|
||||||
seed,
|
|
||||||
steps,
|
|
||||||
scheduler,
|
|
||||||
vae: vae ?? undefined,
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
posCondNode = g.addNode({
|
posCondNode = g.addNode({
|
||||||
@ -166,13 +158,17 @@ export const buildMultidiffusionUpscaleGraph = async (state: RootState): Promise
|
|||||||
g.addEdge(modelNode, 'unet', tiledMultidiffusionNode, 'unet');
|
g.addEdge(modelNode, 'unet', tiledMultidiffusionNode, 'unet');
|
||||||
addLoRAs(state, g, tiledMultidiffusionNode, modelNode, null, clipSkipNode, posCondNode, negCondNode);
|
addLoRAs(state, g, tiledMultidiffusionNode, modelNode, null, clipSkipNode, posCondNode, negCondNode);
|
||||||
|
|
||||||
|
g.upsertMetadata({
|
||||||
|
positive_prompt: positivePrompt,
|
||||||
|
negative_prompt: negativePrompt,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const modelConfig = await fetchModelConfigWithTypeGuard(model.key, isNonRefinerMainModelConfig);
|
const modelConfig = await fetchModelConfigWithTypeGuard(model.key, isNonRefinerMainModelConfig);
|
||||||
const upscaleModelConfig = await fetchModelConfigWithTypeGuard(upscaleModel.key, isSpandrelImageToImageModelConfig);
|
const upscaleModelConfig = await fetchModelConfigWithTypeGuard(upscaleModel.key, isSpandrelImageToImageModelConfig);
|
||||||
|
|
||||||
g.upsertMetadata({
|
g.upsertMetadata({
|
||||||
cfg_scale,
|
cfg_scale,
|
||||||
positive_prompt: positivePrompt,
|
|
||||||
negative_prompt: negativePrompt,
|
|
||||||
model: Graph.getModelMetadataField(modelConfig),
|
model: Graph.getModelMetadataField(modelConfig),
|
||||||
seed,
|
seed,
|
||||||
steps,
|
steps,
|
||||||
@ -181,8 +177,13 @@ export const buildMultidiffusionUpscaleGraph = async (state: RootState): Promise
|
|||||||
upscale_model: Graph.getModelMetadataField(upscaleModelConfig),
|
upscale_model: Graph.getModelMetadataField(upscaleModelConfig),
|
||||||
creativity,
|
creativity,
|
||||||
structure,
|
structure,
|
||||||
|
upscale_initial_image: {
|
||||||
|
image_name: upscaleInitialImage.image_name,
|
||||||
|
width: upscaleInitialImage.width,
|
||||||
|
height: upscaleInitialImage.height,
|
||||||
|
},
|
||||||
|
upscale_scale: scale,
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
g.setMetadataReceivingNode(l2iNode);
|
g.setMetadataReceivingNode(l2iNode);
|
||||||
g.addEdgeToMetadata(upscaleNode, 'width', 'width');
|
g.addEdgeToMetadata(upscaleNode, 'width', 'width');
|
||||||
|
Loading…
Reference in New Issue
Block a user