refactor: 同步独立选角与默认人物基线
This commit is contained in:
@@ -130,7 +130,8 @@ function chooseAnchor(imageId: string) {
|
||||
</div>
|
||||
<p class="alert mt-5 text-xs">
|
||||
Character 现在需要依次完成身份文本、选角候选、确认演员并锁定
|
||||
Identity,之后首帧才能就绪。场景和道具仍使用普通身份母版流程;旧形态图、首帧与视频不会因母版切换自动更新。
|
||||
Identity,之后首帧才能就绪。未明确人物背景时,AI
|
||||
默认以中国人物作为选角基线;项目和角色的明确事实始终优先。场景和道具仍使用普通身份母版流程。
|
||||
</p>
|
||||
<p
|
||||
v-if="catalog.error.value || styleQuery.error.value || castingQuery.error.value"
|
||||
@@ -154,7 +155,8 @@ function chooseAnchor(imageId: string) {
|
||||
<div>
|
||||
<h3 class="text-sm font-semibold">角色选角</h3>
|
||||
<p class="mt-2 text-xs leading-6 text-muted">
|
||||
只处理 Character。候选图不会自动成为演员,确认选择时才会同时切换 Anchor 并锁定 Identity。
|
||||
只处理 Character。每张候选都从 Identity 独立生成,不复用旧 Anchor;确认选择时才会同时切换
|
||||
Anchor 并锁定 Identity。
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -221,7 +223,7 @@ function chooseAnchor(imageId: string) {
|
||||
castingBlocked || !hasStyle || !batchValid || !candidateLimitValid || !casting.missingAnchor
|
||||
"
|
||||
acknowledgement
|
||||
description="最多按本批上限为缺少 Anchor 的 Character 调用 Seedream,各生成一张停用的 primary 候选。已有候选、已有母版或已完成选角的角色不会重复处理。"
|
||||
description="最多按本批上限为缺少 Anchor 的 Character 调用 Seedream,各自独立生成一张停用的 primary 候选,不复用旧身份母版。已有候选、已有母版或已完成选角的角色不会重复处理。"
|
||||
@confirm="generateCastingCandidates"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { AppDialog } from '../../../components/ui'
|
||||
import { validImageSize } from '../../subject-images/model'
|
||||
import type { GenerateCastingCandidateInput } from '../types'
|
||||
|
||||
/** Character 选角候选表单固定使用 primary,且不会自动选择演员。 */
|
||||
/** Character 选角候选表单固定使用 primary,每次独立生成且不会自动选择演员。 */
|
||||
const props = defineProps<{ subjectId: string; subjectName: string; disabled: boolean }>()
|
||||
const open = defineModel<boolean>('open', { default: false })
|
||||
const emit = defineEmits<{ generate: [input: GenerateCastingCandidateInput] }>()
|
||||
@@ -39,8 +39,8 @@ function submit() {
|
||||
<AppDialog v-model:open="open" title="生成角色选角候选" :description="`${subjectName} · 候选不会自动成为身份母版`">
|
||||
<form class="mt-5 space-y-4" @submit.prevent="submit">
|
||||
<p class="alert text-xs">
|
||||
后端会依据角色 Identity、项目视觉风格和默认选角约束生成一张 primary
|
||||
候选。生成完成后仍需人工点击“确认选角”。
|
||||
后端会依据角色 Identity、项目视觉风格和默认选角约束独立生成一张 primary
|
||||
候选,不会复用当前身份母版。生成完成后仍需人工点击“确认选角”。
|
||||
</p>
|
||||
<label class="block">
|
||||
<span class="field-label">覆盖本次完整提示词(可选)</span>
|
||||
@@ -48,7 +48,7 @@ function submit() {
|
||||
id="casting-candidate-prompt"
|
||||
v-model="prompt"
|
||||
class="input min-h-24"
|
||||
placeholder="建议留空,使用后端编译的稳定身份和选角约束"
|
||||
placeholder="建议留空,使用后端编译的稳定身份和选角约束;未明确人物背景时默认中国人物"
|
||||
/>
|
||||
</label>
|
||||
<p v-if="prompt.trim()" class="text-xs text-danger">
|
||||
|
||||
@@ -199,6 +199,7 @@ describe('身份图与母版契约', () => {
|
||||
props: { open: true, subjectId: 'subject-1', subjectName: '林夏', disabled: false }
|
||||
})
|
||||
await flushPromises()
|
||||
expect(document.body.textContent).toContain('不会复用当前身份母版')
|
||||
document.querySelector<HTMLInputElement>('#casting-candidate-cost')!.click()
|
||||
await flushPromises()
|
||||
button('确认生成候选').click()
|
||||
|
||||
@@ -54,7 +54,7 @@ export interface GenerateIdentityImageInput {
|
||||
height?: number
|
||||
}
|
||||
|
||||
/** Character 选角候选固定生成 primary,且不会自动成为 Anchor。 */
|
||||
/** Character 选角候选固定独立生成 primary,不复用旧 Anchor,也不会自动成为新 Anchor。 */
|
||||
export interface GenerateCastingCandidateInput {
|
||||
provider: 'seedream'
|
||||
prompt?: string
|
||||
|
||||
@@ -212,7 +212,7 @@ export function useSubjectIdentity() {
|
||||
await detail.refresh()
|
||||
}
|
||||
|
||||
/** 单角色候选图固定为 primary,生成成功后仍需人工确认选角。 */
|
||||
/** 单角色候选图固定为独立 primary,不复用旧 Anchor,生成成功后仍需人工确认选角。 */
|
||||
async function generateCastingCandidate(input: GenerateCastingCandidateInput) {
|
||||
if (!canGenerateCandidate.value || !subject.value || !identity.value) return
|
||||
const id = subject.value.id
|
||||
|
||||
Reference in New Issue
Block a user