支持规范参考图输入
为角色形象规范、UI素材规范、自定义规范面板新增参考图上传入口。 生成规范时携带参考图并自动追加参考图生成规范语义。 补充生成流程和上传流程回归测试。 更新画板角色形象生成入口设计文档。
This commit is contained in:
@@ -827,19 +827,30 @@ export function useImageCanvasGenerationWorkflow({
|
||||
const specType = dialog.specType ?? 'custom';
|
||||
const specValues =
|
||||
dialog.specValues ?? DEFAULT_SPEC_FORM_VALUES[specType];
|
||||
const specPrompt = buildSpecPrompt(specType, specValues);
|
||||
const specPrompt = buildSpecPrompt(
|
||||
specType,
|
||||
specValues,
|
||||
Boolean(dialog.specReference?.src),
|
||||
);
|
||||
const generated = await generateEditorImage({
|
||||
prompt: specPrompt,
|
||||
size: SPEC_GENERATION_SIZE,
|
||||
model: DEFAULT_IMAGE_MODEL,
|
||||
kind: 'spec',
|
||||
...(dialog.specReference?.src
|
||||
? { referenceImageSrcs: [dialog.specReference.src] }
|
||||
: {}),
|
||||
});
|
||||
addGeneratedResultLayer(generated, {
|
||||
frame: getGeneratingDialogPlaceholder(dialog),
|
||||
assetKind: specType === 'icon' ? 'icon-spec' : 'spec',
|
||||
title: `${SPEC_TYPE_LABEL[specType]} ${layerCounterRef.current + 1}`,
|
||||
dialogId: canvasDialog?.id,
|
||||
generationInputs: buildSpecGenerationInputs(specType, specValues),
|
||||
generationInputs: buildSpecGenerationInputs(
|
||||
specType,
|
||||
specValues,
|
||||
dialog.specReference,
|
||||
),
|
||||
});
|
||||
} else if (dialog.mode === 'character') {
|
||||
const referenceImageSrcs = [
|
||||
|
||||
Reference in New Issue
Block a user