From 4c750ee490df95a1cf8f5276b117899e7d654360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E6=B3=93?= Date: Tue, 19 May 2026 15:05:21 +0800 Subject: [PATCH] fix pipelines in plugin --- modelscope/utils/registry.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modelscope/utils/registry.py b/modelscope/utils/registry.py index ae81cfc4..a323d2a8 100644 --- a/modelscope/utils/registry.py +++ b/modelscope/utils/registry.py @@ -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: