fix(ui): do not add save-to-canvas generations to board

rebase
This commit is contained in:
psychedelicious
2024-09-19 09:11:05 +10:00
parent 0653f3ad87
commit 88aa96d2b1
3 changed files with 15 additions and 9 deletions

View File

@@ -162,13 +162,15 @@ export const buildFLUXGraph = async (
canvasOutput = addWatermarker(g, canvasOutput);
}
const shouldSaveToGallery = !canvasSettings.sendToCanvas || canvasSettings.autoSave;
// This image will be staged, should not be saved to the gallery or added to a board.
const is_intermediate = canvasSettings.sendToCanvas;
const board = canvasSettings.sendToCanvas ? undefined : getBoardField(state);
g.updateNode(canvasOutput, {
id: getPrefixedId('canvas_output'),
is_intermediate: !shouldSaveToGallery,
is_intermediate,
use_cache: false,
board: getBoardField(state),
board,
});
g.setMetadataReceivingNode(canvasOutput);

View File

@@ -282,13 +282,15 @@ export const buildSD1Graph = async (
canvasOutput = addWatermarker(g, canvasOutput);
}
const shouldSaveToGallery = !canvasSettings.sendToCanvas || canvasSettings.autoSave;
// This image will be staged, should not be saved to the gallery or added to a board.
const is_intermediate = canvasSettings.sendToCanvas;
const board = canvasSettings.sendToCanvas ? undefined : getBoardField(state);
g.updateNode(canvasOutput, {
id: getPrefixedId('canvas_output'),
is_intermediate: !shouldSaveToGallery,
is_intermediate,
use_cache: false,
board: getBoardField(state),
board,
});
g.setMetadataReceivingNode(canvasOutput);

View File

@@ -285,13 +285,15 @@ export const buildSDXLGraph = async (
canvasOutput = addWatermarker(g, canvasOutput);
}
const shouldSaveToGallery = !canvasSettings.sendToCanvas || canvasSettings.autoSave;
// This image will be staged, should not be saved to the gallery or added to a board.
const is_intermediate = canvasSettings.sendToCanvas;
const board = canvasSettings.sendToCanvas ? undefined : getBoardField(state);
g.updateNode(canvasOutput, {
id: getPrefixedId('canvas_output'),
is_intermediate: !shouldSaveToGallery,
is_intermediate,
use_cache: false,
board: getBoardField(state),
board,
});
g.setMetadataReceivingNode(canvasOutput);