File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -3029,7 +3029,17 @@ def do_POST(self):
30293029 }}).encode ())
30303030 return
30313031
3032- utfprint ("\n Input: " + json .dumps (genparams ),1 )
3032+
3033+ tmpimgs = genparams .get ("images" , []) # reduce amount of text printed to terminal when dumping large images
3034+ if tmpimgs and isinstance (tmpimgs , (list , tuple )) and len (tmpimgs )> 0 :
3035+ printablegenparams = copy .deepcopy (genparams )
3036+ outarr = []
3037+ for img in tmpimgs :
3038+ outarr .append (str (img [:512 ])+ "..." )
3039+ printablegenparams ["images" ] = outarr
3040+ utfprint ("\n Input: " + json .dumps (printablegenparams ),1 )
3041+ else :
3042+ utfprint ("\n Input: " + json .dumps (genparams ),1 )
30333043
30343044 if args .foreground :
30353045 bring_terminal_to_foreground ()
You can’t perform that action at this time.
0 commit comments