Fix VoxCPM2 component recipe and clarify missing execution adapter

This commit is contained in:
Mikei386 committed 2026-10-02 11:43:47 +02:00
1 parent 3cd9fa5750
commit 1f0fc42344
7 files changed
+102 -12

No files matched your search

+5 -2
View File
@@ -56,12 +56,14 @@ def file_role(filename):
role,label='auxiliary','Sprach-Tokenizer'
elif any(p in ('text_encoder','text_encoders') for p in parts) or re.search(r'(?:^|[/_-])(?:text.encoder|qwen3vl|t5xxl|clip_l|clip_g)(?:[/_.-]|$)',name):
role,label='text_encoder','Textencoder'
elif 'vae' in parts or re.search(r'(?:^|[/_-])vae(?:[/_.-]|$)',name):
elif PurePosixPath(name).name in ('audiovae.pth','audiovae.safetensors') or 'vae' in parts or re.search(r'(?:^|[/_-])vae(?:[/_.-]|$)',name):
role,label='vae','VAE'
elif any(p in ('latent_upscale_models','model_patches','loras') for p in parts):
role,label='auxiliary','Zusatzkomponente'
elif re.search(r'(?:^|[/_-])(?:lora|adapter)(?:[/_.-]|$)',name):
role,label='auxiliary','Zusatzkomponente'
elif 'tokenizer' in PurePosixPath(name).name or name.endswith('.tiktoken'):
role,label='tokenizer','Tokenizer-Datei'
elif name.endswith(('.gguf','.safetensors')):
role,label='model','Modelldatei'
else:
@@ -201,7 +203,8 @@ class Catalog:
files=[]
for f in data.get('siblings',[]):
name=f['rfilename'];p=PurePosixPath(name)
if p.is_absolute() or '..' in p.parts or p.suffix.lower() not in ('.gguf','.safetensors','.json','.tiktoken'):continue
allowed=p.suffix.lower() in ('.gguf','.safetensors','.json','.tiktoken') or (repo=='openbmb/VoxCPM2' and name=='audiovae.pth')
if p.is_absolute() or '..' in p.parts or not allowed:continue
size=f.get('size',f.get('lfs',{}).get('size'))
if not isinstance(size,int) or size<1:continue
files.append(dict(name=name,size=size,sha256=f.get('lfs',{}).get('sha256')))