mirror of
https://github.com/Anil-matcha/Open-Generative-AI.git
synced 2026-05-07 01:17:18 +00:00
fix(video-studio): map t2v selection to i2v sibling by family on image upload
Uploading an image while in t2v mode reset the model to allI2V[0]; with the i2v list being a concatenation of regular models + effects, that index shifts as entries are reordered, so users saw seemingly random switches (e.g. Veo 3.1 → AI Video Effects or seedance lite). Look up the matching i2v variant by family (veo3.1, kling-v3.0, etc.) and only fall back to allI2V[0] when no sibling exists. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8cbaf7fc3f
commit
b2d331e7d8
1 changed files with 7 additions and 2 deletions
|
|
@ -130,8 +130,13 @@ export function VideoStudio() {
|
|||
}
|
||||
if (!imageMode) {
|
||||
imageMode = true;
|
||||
selectedModel = allI2V[0].id;
|
||||
selectedModelName = allI2V[0].name;
|
||||
const currentT2V = allT2V.find(m => m.id === selectedModel);
|
||||
const sibling = currentT2V?.family
|
||||
? allI2V.find(m => m.family === currentT2V.family)
|
||||
: null;
|
||||
const target = sibling || allI2V[0];
|
||||
selectedModel = target.id;
|
||||
selectedModelName = target.name;
|
||||
document.getElementById('v-model-btn-label').textContent = selectedModelName;
|
||||
updateControlsForModel(selectedModel);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue