From 75457bbde0c35b25e0de97d67423261ce95933fa Mon Sep 17 00:00:00 2001 From: wailovet Date: Sat, 6 Jul 2024 00:48:52 +0800 Subject: [PATCH] 'update' --- hook_kohya_ss_run.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hook_kohya_ss_run.py b/hook_kohya_ss_run.py index 5926bb3..9045bbe 100644 --- a/hook_kohya_ss_run.py +++ b/hook_kohya_ss_run.py @@ -78,7 +78,10 @@ def sample_images(self, *args, **kwargs): if epoch is not None and cmd_args.save_every_n_epochs is not None and epoch % cmd_args.save_every_n_epochs == 0: datasets = get_datasets() - height, width = datasets.get("resolution", (512, 512)) + resolution = datasets.get("resolution", (512, 512)) + if isinstance(resolution, int): + resolution = (resolution, resolution) + height, width = resolution print(f"sample_images: height = {height}, width = {width}") prompt_dict_list = other_config.get("prompt_dict_list", [])