From f550aa6ba3ec45b749b85a67efefea6c2b1ecd26 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 21 Feb 2025 08:48:59 -0500 Subject: [PATCH] log init latents Signed-off-by: Vladimir Mandic --- scripts/init_latents.py | 6 +++--- wiki | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/init_latents.py b/scripts/init_latents.py index a21c11f21..77a73c80b 100644 --- a/scripts/init_latents.py +++ b/scripts/init_latents.py @@ -28,11 +28,10 @@ class Script(scripts.Script): p.init_latent = slerp(p.subseed_strength, latents, var_latents) if p.subseed_strength < 1 else var_latents p.generator = generator if p.subseed_strength <= 0.5 else var_generator - def process_batch(self, p: processing.StableDiffusionProcessing, *args, **kwargs): # pylint: disable=arguments-differ - from modules.processing_helpers import create_random_tensors - if not shared.native: + if not shared.native or not shared.sd_loaded or not hasattr(shared.sd_model, 'unet'): return + from modules.processing_helpers import create_random_tensors args = list(args) if p.subseed_strength != 0 and getattr(shared.sd_model, '_execution_device', None) is not None: # alt method using slerp @@ -45,4 +44,5 @@ class Script(scripts.Script): subseed_strength=p.subseed_strength, p=p ) + shared.log.debug(f'Latent: seed={p.seeds} subseed={p.subseeds} strength={p.subseed_strength} tensor={list(p.init_latent.shape)}') p.init_latent = p.init_latent.to(device=shared.sd_model._execution_device, dtype=shared.sd_model.unet.dtype) # pylint: disable=protected-access diff --git a/wiki b/wiki index a04284d61..e45bfe41f 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit a04284d619efada82760889a8116db8576bb1f71 +Subproject commit e45bfe41f0e494d6d5145443f966ba47560702f5