mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
calculate vae-scale-factor and use everywhere
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -168,7 +168,8 @@ def full_vae_decode(latents, model):
|
||||
if debug:
|
||||
log_debug(f'VAE memory: {shared.mem_mon.read()}')
|
||||
vae_name = os.path.splitext(os.path.basename(sd_vae.loaded_vae_file))[0] if sd_vae.loaded_vae_file is not None else "default"
|
||||
shared.log.debug(f'Decode: vae="{vae_name}" upcast={upcast} slicing={getattr(model.vae, "use_slicing", None)} tiling={getattr(model.vae, "use_tiling", None)} latents={list(latents.shape)}:{latents.device}:{latents.dtype} time={t1-t0:.3f}')
|
||||
vae_scale_factor = sd_vae.get_vae_scale_factor(model)
|
||||
shared.log.debug(f'Decode: vae="{vae_name}" scale={vae_scale_factor} upcast={upcast} slicing={getattr(model.vae, "use_slicing", None)} tiling={getattr(model.vae, "use_tiling", None)} latents={list(latents.shape)}:{latents.device}:{latents.dtype} time={t1-t0:.3f}')
|
||||
return decoded
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user