File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -575,6 +575,9 @@ def main(args):
575575 print ("Running text-only preview generation for Nemotron VL model..." )
576576 try :
577577 # Try text-only generation using model.chat with None for images
578+ if tokenizer is None :
579+ raise ValueError ("Tokenizer is required for Nemotron VL text generation" )
580+
578581 question = tokenizer .decode (input_ids [0 ], skip_special_tokens = True )
579582 generation_config = {
580583 "max_new_tokens" : 100 ,
@@ -639,6 +642,9 @@ def main(args):
639642 print ("Running text-only preview generation for quantized Nemotron VL model..." )
640643 try :
641644 # Try text-only generation using model.chat with None for images
645+ if tokenizer is None :
646+ raise ValueError ("Tokenizer is required for Nemotron VL text generation" )
647+
642648 question = tokenizer .decode (input_ids [0 ], skip_special_tokens = True )
643649 generation_config = {
644650 "max_new_tokens" : 100 ,
You can’t perform that action at this time.
0 commit comments