feat: enhance Comfy API handling and add tests for branded non-Z diffusion models

This commit is contained in:
syntaxbullet
2026-07-09 21:56:25 +02:00
parent c3a75cf0d6
commit 317a7bbf5f
11 changed files with 532 additions and 37 deletions

View File

@@ -524,13 +524,14 @@ export const documentApplyLayerMaskOperationCommand: Command<DocumentApplyLayerM
const maskLocation = findLayerLocation(state.document, payload.maskLayerId);
if (!maskLocation || maskLocation.layer.type === "group") return state;
if (!isReferencedMaskLayer(state.document, payload.maskLayerId)) return state;
const maskAssetId = maskLocation.layer.assetId;
return {
...state,
document: {
...state.document,
assets: state.document.assets.map((asset) =>
asset.id === maskLocation.layer.assetId
asset.id === maskAssetId
? {
...asset,
source: payload.source,
@@ -541,7 +542,7 @@ export const documentApplyLayerMaskOperationCommand: Command<DocumentApplyLayerM
},
editor: {
...state.editor,
brushStrokePreview: state.editor.brushStrokePreview?.assetId === maskLocation.layer.assetId ? undefined : state.editor.brushStrokePreview,
brushStrokePreview: state.editor.brushStrokePreview?.assetId === maskAssetId ? undefined : state.editor.brushStrokePreview,
},
};
},