Commit bd9b9d42 authored by Sakura-Luna's avatar Sakura-Luna
Browse files

Add live preview mode check

parent e14b586d
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -26,8 +26,8 @@ approximation_indexes = {"Full": 0, "Tiny AE": 1, "Approx NN": 2, "Approx cheap"




def single_sample_to_image(sample, approximation=None):
def single_sample_to_image(sample, approximation=None):
    if approximation is None:
    if approximation is None or approximation not in approximation_indexes.keys():
        approximation = approximation_indexes.get(opts.show_progress_type, 0)
        approximation = approximation_indexes.get(opts.show_progress_type, 1)


    if approximation == 1:
    if approximation == 1:
        x_sample = sd_vae_taesd.decode()(sample.to(devices.device, devices.dtype).unsqueeze(0))[0].detach()
        x_sample = sd_vae_taesd.decode()(sample.to(devices.device, devices.dtype).unsqueeze(0))[0].detach()