Commit 14cf434b authored by AUTOMATIC1111's avatar AUTOMATIC1111
Browse files

fix an issue in live previews that happens when you use SDXL with fp16 VAE

parent 5dee0fa1
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -539,8 +539,7 @@ def create_random_tensors(shape, seeds, subseeds=None, subseed_strength=0.0, see


def decode_first_stage(model, x):
    with devices.autocast(disable=x.dtype == devices.dtype_vae):
        x = model.decode_first_stage(x)
    x = model.decode_first_stage(x.to(devices.dtype_vae))

    return x