diff --git a/process_queue.py b/process_queue.py index c92944c..4bf26b2 100644 --- a/process_queue.py +++ b/process_queue.py @@ -13,6 +13,7 @@ from telethon.errors.rpcerrorlist import MessageNotModifiedError, UserIsBlockedE log = logging.getLogger('process') +scale_factor = 1.5 default_vars = { "sampler_name": "DPM++ 2M Karras", } @@ -173,7 +174,8 @@ class Worker: for fn in images: img = Image.open(fn) - img.thumbnail((1280,1280)) + width, height = img.size + img = img.resize((int(width * scale_factor), int(height * scale_factor))) imgdata = BytesIO() img.save(imgdata, format='JPEG') siz = imgdata.seek(0,2)