mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-29 09:42:54 +08:00
custom schedule
This commit is contained in:
parent
5dbd0355b0
commit
2ea8726597
@ -54,8 +54,8 @@ def samples_to_images_tensor(sample, approximation=None, model=None):
|
||||
elif approximation == 4:
|
||||
with devices.autocast(), torch.no_grad():
|
||||
x_sample = sd_vae_consistency.decoder_model()(
|
||||
sample.to(devices.device, devices.dtype)/0.18215,
|
||||
schedule=[1.0],
|
||||
sample.detach().to(devices.device, devices.dtype)/0.18215,
|
||||
schedule=[float(i.strip()) for i in shared.opts.sd_vae_consistency_schedule.split(',')],
|
||||
)
|
||||
sd_vae_consistency.unload()
|
||||
else:
|
||||
|
@ -173,6 +173,7 @@ For img2img, VAE is used to process user's input image before the sampling, and
|
||||
"auto_vae_precision": OptionInfo(True, "Automatically revert VAE to 32-bit floats").info("triggers when a tensor with NaNs is produced in VAE; disabling the option in this case will result in a black square image"),
|
||||
"sd_vae_encode_method": OptionInfo("Full", "VAE type for encode", gr.Radio, {"choices": ["Full", "TAESD"]}, infotext='VAE Encoder').info("method to encode image to latent (use in img2img, hires-fix or inpaint mask)"),
|
||||
"sd_vae_decode_method": OptionInfo("Full", "VAE type for decode", gr.Radio, {"choices": ["Full", "TAESD", "Consistency Decoder"]}, infotext='VAE Decoder').info("method to decode latent to image"),
|
||||
"sd_vae_consistency_schedule": OptionInfo("1.0, 0.5", "consistency schedule").info("sampling schedule for consistency decoder."),
|
||||
}))
|
||||
|
||||
options_templates.update(options_section(('img2img', "img2img"), {
|
||||
|
Loading…
Reference in New Issue
Block a user