Update renderer.py for better readable console output

This commit is contained in:
jsuelwald 2022-12-27 15:41:10 +01:00 committed by GitHub
parent 11730dcbe4
commit 6f60e88ca6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
import queue import queue
import time import time
import json import json
import pprint
from easydiffusion import device_manager from easydiffusion import device_manager
from easydiffusion.types import TaskData, Response, Image as ResponseImage, UserInitiatedStop, GenerateImageRequest from easydiffusion.types import TaskData, Response, Image as ResponseImage, UserInitiatedStop, GenerateImageRequest
@ -28,8 +29,8 @@ def init(device):
def make_images(req: GenerateImageRequest, task_data: TaskData, data_queue: queue.Queue, task_temp_images: list, step_callback): def make_images(req: GenerateImageRequest, task_data: TaskData, data_queue: queue.Queue, task_temp_images: list, step_callback):
context.stop_processing = False context.stop_processing = False
log.info(f'request: {get_printable_request(req)}') log.info(f'request: {pprint.pformat(get_printable_request(req))}')
log.info(f'task data: {task_data.dict()}') log.info(f'task data: {pprint.pformat(task_data.dict())}')
images = make_images_internal(req, task_data, data_queue, task_temp_images, step_callback) images = make_images_internal(req, task_data, data_queue, task_temp_images, step_callback)