fix pipelines in plugin

This commit is contained in:
雨泓
2026-05-19 15:05:21 +08:00
committed by Jintao Huang
parent 46d653b079
commit 4c750ee490

View File

@@ -205,6 +205,8 @@ def build_from_cfg(cfg,
raise TypeError(
f'type must be a str or valid type, but got {type(obj_type)}')
try:
if not obj_cls.__module__.startswith('modelscope'):
args.pop('trust_remote_code', None)
if hasattr(obj_cls, '_instantiate'):
return obj_cls._instantiate(**args)
else: