MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / extract_model_name

Function extract_model_name

app/utils/model_utils.py:387–394  ·  view source on GitHub ↗

从格式化的选项名称中提取原始模型名称

(formatted_name)

Source from the content-addressed store, hash-verified

385
386
387def extract_model_name(formatted_name):
388 """从格式化的选项名称中提取原始模型名称"""
389 if not formatted_name:
390 return ""
391 # 移除开头的 emoji 和空格
392 if formatted_name.startswith("✅ ") or formatted_name.startswith("❌ "):
393 return formatted_name[2:].strip()
394 return formatted_name.strip()
395
396
397def sort_model_choices(models):

Callers 15

build_wan21_componentsFunction · 0.90
build_wan22_componentsFunction · 0.90
download_qwen_image_ditFunction · 0.90
update_model_statusFunction · 0.90
download_model_handlerFunction · 0.90
build_video_pageFunction · 0.90
update_model_componentsFunction · 0.90
run_inference_wrapperFunction · 0.90
on_model_type_changeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected