diff --git a/backend/open_webui/utils/voice_avatar.py b/backend/open_webui/utils/voice_avatar.py index c921169726..0d55b11e31 100644 --- a/backend/open_webui/utils/voice_avatar.py +++ b/backend/open_webui/utils/voice_avatar.py @@ -96,7 +96,8 @@ def validate_voice_animation(data: bytes) -> None: ext = model.get('extensions', {}).get('VRMC_vrm_animation', {}) bones = ext.get('humanoid', {}).get('humanBones', {}) nodes = model.get('nodes', []) - if ext.get('specVersion') != '1.0' or not bones or not 0 < len(nodes) <= 512: + # Match the VRMA loader's compatibility fallback for unversioned exports. + if ext.get('specVersion') not in (None, '1.0') or not bones or not 0 < len(nodes) <= 512: raise ValueError('Use a VRMA 1.0 humanoid animation.') for bone in bones.values(): if type(bone.get('node')) is not int or not 0 <= bone['node'] < len(nodes): diff --git a/src/lib/utils/voice-avatar-animation.ts b/src/lib/utils/voice-avatar-animation.ts index f849ab7006..be063ac481 100644 --- a/src/lib/utils/voice-avatar-animation.ts +++ b/src/lib/utils/voice-avatar-animation.ts @@ -29,8 +29,9 @@ export function validateAnimation(data: ArrayBuffer) { const json = JSON.parse(new TextDecoder().decode(new Uint8Array(data, 20, length))); const ext = json.extensions?.VRMC_vrm_animation; const bones = Object.values(ext?.humanoid?.humanBones ?? {}) as { node: number }[]; + // Match the VRMA loader's compatibility fallback for unversioned exports. if ( - ext?.specVersion !== '1.0' || + (ext?.specVersion != null && ext.specVersion !== '1.0') || !bones.length || !json.nodes?.length || json.nodes.length > 512 ||