From 8576a540ef47652d0a06616c021b66fa448fd5e9 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 14 May 2024 10:07:16 -0400 Subject: [PATCH] add control run summary --- README.md | 3 +++ modules/control/run.py | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 27c1f245e..198d17911 100644 --- a/README.md +++ b/README.md @@ -226,6 +226,9 @@ List of available parameters, run `webui --help` for the full & up-to-date list: ## Notes +> [!TIP] +> If you don't want to use built-in `venv` support and prefer to run SD.Next in your own environment such as *Docker* container, *Conda* environment or any other virtual environment, you can skip `venv` create/activate and launch SD.Next directly using `python launch.py` (command line flags noted above still apply). + ### Control **SD.Next** comes with built-in control for all types of text2image, image2image, video2video and batch processing diff --git a/modules/control/run.py b/modules/control/run.py index 36748f572..9a8271d89 100644 --- a/modules/control/run.py +++ b/modules/control/run.py @@ -72,6 +72,7 @@ def control_run(units: List[unit.Unit] = [], inputs: List[Image.Image] = [], ini *input_script_args ): global instance, pipe, original_pipeline # pylint: disable=global-statement + t_start = time.time() debug(f'Control: type={unit_type} input={inputs} init={inits} type={input_type}') if inputs is None or (type(inputs) is list and len(inputs) == 0): inputs = [None] @@ -621,12 +622,14 @@ def control_run(units: List[unit.Unit] = [], inputs: List[Image.Image] = [], ini shared.log.error(f'Control pipeline failed: type={unit_type} units={len(active_model)} error={e}') errors.display(e, 'Control') + t_end = time.time() + if len(output_images) == 0: output_images = None - image_txt = 'images=None' + image_txt = '| Images None' else: image_str = [f'{image.width}x{image.height}' for image in output_images] - image_txt = f'| Images {len(output_images)} | Size {" ".join(image_str)}' + image_txt = f'| Time {t_end-t_start:.2f}s | Images {len(output_images)} | Size {" ".join(image_str)}' p.init_images = output_images # may be used for hires if video_type != 'None' and isinstance(output_images, list):