This commit is contained in:
lvmin
2023-08-10 10:22:42 -07:00
parent 723a4b60d9
commit e42c2f62ac
2 changed files with 70 additions and 10 deletions
+6 -10
View File
@@ -23,20 +23,16 @@ def process(positive_prompt, negative_prompt, width=1024, height=1024, batch_siz
empty_latent = core.generate_empty_latent(width=width, height=height, batch_size=batch_size)
sampled_latent = core.ksampler(
sampled_latent = core.ksampler_with_refiner(
model=xl_base.unet,
positive=positive_conditions,
negative=negative_conditions,
refiner=xl_refiner,
refiner_positive=positive_conditions_refiner,
refiner_negative=negative_conditions_refiner,
refiner_switch_step=20,
latent=empty_latent,
steps=30, start_step=0, last_step=20, disable_noise=False, force_full_denoise=False
)
sampled_latent = core.ksampler(
model=xl_refiner.unet,
positive=positive_conditions_refiner,
negative=negative_conditions_refiner,
latent=sampled_latent,
steps=30, start_step=20, last_step=30, disable_noise=True, force_full_denoise=True
steps=30, start_step=0, last_step=30, disable_noise=False, force_full_denoise=True
)
decoded_latent = core.decode_vae(vae=xl_refiner.vae, latent_image=sampled_latent)