fix(ui): always write seamless metadata

Ensure images without seamless enabled correctly reset the setting
when all parameters are recalled
This commit is contained in:
Riku
2024-10-28 11:06:38 +01:00
committed by psychedelicious
parent 84c6209a45
commit 097e92db6a

View File

@@ -23,6 +23,12 @@ export const addSeamless = (
): Invocation<'seamless'> | null => {
const { seamlessXAxis: seamless_x, seamlessYAxis: seamless_y } = state.params;
// Always write seamless metadata to ensure recalling all parameters will reset the seamless settings
g.upsertMetadata({
seamless_x,
seamless_y,
});
if (!seamless_x && !seamless_y) {
return null;
}
@@ -34,11 +40,6 @@ export const addSeamless = (
seamless_y,
});
g.upsertMetadata({
seamless_x: seamless_x || undefined,
seamless_y: seamless_y || undefined,
});
// Seamless slots into the graph between the model loader and the denoise node
g.deleteEdgesFrom(modelLoader, ['unet']);
g.deleteEdgesFrom(modelLoader, ['vae']);