dont print full base64 for images

This commit is contained in:
Concedo 2025-03-20 21:20:04 +08:00
parent 143b611274
commit 9d5efd68b6

View file

@ -3029,7 +3029,17 @@ Enter Prompt:<br>
}}).encode()) }}).encode())
return return
utfprint("\nInput: " + json.dumps(genparams),1)
tmpimgs = genparams.get("images", []) # reduce amount of text printed to terminal when dumping large images
if tmpimgs and isinstance(tmpimgs, (list, tuple)) and len(tmpimgs)>0:
printablegenparams = copy.deepcopy(genparams)
outarr = []
for img in tmpimgs:
outarr.append(str(img[:512])+"...")
printablegenparams["images"] = outarr
utfprint("\nInput: " + json.dumps(printablegenparams),1)
else:
utfprint("\nInput: " + json.dumps(genparams),1)
if args.foreground: if args.foreground:
bring_terminal_to_foreground() bring_terminal_to_foreground()