avoid vae denoise problem

This commit is contained in:
lvmin 2023-10-13 06:31:38 -07:00
parent 63820ff362
commit 739a8a592a
2 changed files with 9 additions and 1 deletions

View File

@ -1 +1 @@
version = '2.1.55'
version = '2.1.56'

View File

@ -314,6 +314,8 @@ def calculate_sigmas(sampler, model, scheduler, steps, denoise):
@torch.no_grad()
@torch.inference_mode()
def process_diffusion(positive_cond, negative_cond, steps, switch, width, height, image_seed, callback, sampler_name, scheduler_name, latent=None, denoise=1.0, tiled=False, cfg_scale=7.0, refiner_swap_method='joint'):
global final_unet, final_refiner_unet
assert refiner_swap_method in ['joint', 'separate', 'vae', 'upscale']
if final_refiner_unet is not None:
@ -321,6 +323,12 @@ def process_diffusion(positive_cond, negative_cond, steps, switch, width, height
and refiner_swap_method != 'upscale':
refiner_swap_method = 'vae'
if refiner_swap_method == 'vae' and denoise < 0.95:
# VAE swap only support full denoise
refiner_swap_method = 'joint'
# Disable refiner to avoid SD15 in joint swap
final_refiner_unet = None
print(f'[Sampler] refiner_swap_method = {refiner_swap_method}')
if latent is None: