move the modified decode into smapler_common

This commit is contained in:
Kohaku-Blueleaf 2023-08-04 14:38:52 +08:00
parent 70e66e81e5
commit 1f6bfdea80
1 changed files with 3 additions and 3 deletions

View File

@ -55,9 +55,9 @@ def single_sample_to_image(sample, approximation=None):
def decode_first_stage(model, x):
x = model.decode_first_stage(x.to(devices.dtype_vae))
return x
x = x.to(devices.dtype_vae)
approx_index = approximation_indexes.get(opts.sd_vae_decode_method, 0)
return samples_to_images_tensor(x, approx_index, model)
def sample_to_image(samples, index=0, approximation=None):