fix many inpaint bugs (#731)

fix many inpaint bugs
This commit is contained in:
lllyasviel
2023-10-18 06:22:08 -07:00
committed by GitHub
parent d2c8f16082
commit 9660daff94
6 changed files with 131 additions and 96 deletions
+3 -3
View File
@@ -445,6 +445,9 @@ def process_diffusion(positive_cond, negative_cond, steps, switch, width, height
decoded_latent = core.decode_vae(vae=target_model, latent_image=sampled_latent, tiled=tiled)
if refiner_swap_method == 'vae':
if modules.inpaint_worker.current_task is not None:
modules.inpaint_worker.current_task.unswap()
sample_hijack.history_record = []
core.ksampler(
model=final_unet,
@@ -517,9 +520,6 @@ def process_diffusion(positive_cond, negative_cond, steps, switch, width, height
noise=refiner_noise
)
if modules.inpaint_worker.current_task is not None:
modules.inpaint_worker.current_task.swap()
target_model = final_refiner_vae
if target_model is None:
target_model = final_vae