From 903944a411c35b8f7b2b51ada77a7c2a80e7fb88 Mon Sep 17 00:00:00 2001 From: eromomon Date: Mon, 14 Jul 2025 04:16:49 -0600 Subject: [PATCH] [examples] fix do_reduce_labels argument for run_semantic_segmentation_no_trainer (#39322) * no use do_reduce_labels argument in model * use do_reducer_labels in AutoImageProcessor --- .../run_semantic_segmentation_no_trainer.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/pytorch/semantic-segmentation/run_semantic_segmentation_no_trainer.py b/examples/pytorch/semantic-segmentation/run_semantic_segmentation_no_trainer.py index a35cc411aa..fca89a6428 100644 --- a/examples/pytorch/semantic-segmentation/run_semantic_segmentation_no_trainer.py +++ b/examples/pytorch/semantic-segmentation/run_semantic_segmentation_no_trainer.py @@ -324,13 +324,12 @@ def main(): args.model_name_or_path, id2label=id2label, label2id=label2id, trust_remote_code=args.trust_remote_code ) image_processor = AutoImageProcessor.from_pretrained( - args.model_name_or_path, trust_remote_code=args.trust_remote_code + args.model_name_or_path, trust_remote_code=args.trust_remote_code, do_reduce_labels=args.do_reduce_labels ) model = AutoModelForSemanticSegmentation.from_pretrained( args.model_name_or_path, config=config, trust_remote_code=args.trust_remote_code, - do_reduce_labels=args.do_reduce_labels, ) # Define transforms to be applied to each image and target.