mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
calculate vae-scale-factor and use everywhere
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -158,11 +158,12 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
|
||||
|
||||
shared.prompt_styles.apply_styles_to_extra(p)
|
||||
shared.prompt_styles.extract_comments(p)
|
||||
vae_scale_factor = sd_vae.get_vae_scale_factor()
|
||||
|
||||
if p.width is not None:
|
||||
p.width = 8 * int(p.width / 8)
|
||||
p.width = vae_scale_factor * int(p.width / vae_scale_factor)
|
||||
if p.height is not None:
|
||||
p.height = 8 * int(p.height / 8)
|
||||
p.height = vae_scale_factor * int(p.height / vae_scale_factor)
|
||||
|
||||
script_callbacks.before_process_callback(p)
|
||||
timer.process.record('pre')
|
||||
|
||||
Reference in New Issue
Block a user