Line-up the wuerstchen model with the python implementation. (#901)

* Line-up the wuerstchen model with the python implementation.

* Missing cos.

* Fix the picture denormalization.
This commit is contained in:
Laurent Mazare
2023-09-19 21:59:44 +01:00
committed by GitHub
parent 7ad82b87e4
commit 67a486d18d
4 changed files with 10 additions and 7 deletions

View File

@ -373,7 +373,6 @@ fn run(args: Args) -> Result<()> {
);
let image = vqgan.decode(&(&latents * 0.3764)?)?;
// TODO: Add the clamping between 0 and 1.
let image = ((image / 2.)? + 0.5)?.to_device(&Device::Cpu)?;
let image = (image * 255.)?.to_dtype(DType::U8)?.i(0)?;
let image_filename = output_filename(&final_image, idx + 1, num_samples, None);
candle_examples::save_image(&image, image_filename)?