fix(canvas): 图生图节点 - 自动结果继承来源图片尺寸

This commit is contained in:
ddCat committed 2026-07-31 17:17:30 +08:00
1 parent d0eea47a5b
commit 7fb5c75a0c
3 files changed
+21 -11

No files matched your search

@@ -194,7 +194,9 @@ export function useCanvasGenerationRetry({ projectId, domainProjectId, activated
if (!image?.dataUrl) throw new Error("后端任务没有返回图片");
const uploadedImage = await uploadImage(image.dataUrl);
const imageConfig = NODE_DEFAULT_SIZE[CanvasNodeType.Image];
const imageSize = fitNodeSize(uploadedImage.width, uploadedImage.height, imageConfig.width, imageConfig.height);
const imageSize = useReferenceImages
? { width: node.width, height: node.height }
: fitNodeSize(uploadedImage.width, uploadedImage.height, imageConfig.width, imageConfig.height);
const generationMetadata = savedImageMetadata?.generationType
? { generationType: savedImageMetadata.generationType, model: generationConfig.model, size: generationConfig.size, quality: generationConfig.quality, transparentBackground: generationConfig.transparentBackground, count: savedImageMetadata.count || 1, references: savedImageMetadata.references }
: buildImageGenerationMetadata(useReferenceImages ? "edit" : "generation", generationConfig, 1, retryImages);