question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Poor sampling quality in upscaler Unets

See original GitHub issue

I’ve seen good quality results with the upscaling Unets in your DALLE2 repo but have been having trouble getting similar ones with the Imagen ones over the same training period.

After reviewing the code and the Imagen paper I wonder if this is the problem: https://github.com/lucidrains/imagen-pytorch/blob/6a04c908f65e39af55263ce3dcacca943b90fc5a/imagen_pytorch/imagen_pytorch.py#L1584

https://github.com/lucidrains/imagen-pytorch/blob/6a04c908f65e39af55263ce3dcacca943b90fc5a/imagen_pytorch/imagen_pytorch.py#L205

I think that this should be (1.0 - lowres_sample_noise_level)? I see that you do your augmentation by sampling at a specific timestep based on the overall number of timesteps, but the default of 0.2 would sample at time 200 - which is actually closer to 0.8 augmentation if you were using a linear scale.

As a workaround I am trying to pass 0.8 into my sample function but I’m not sure this is enough to fully address the issue. Maybe it just takes longer to train since the training operates on a full aug level of 1.0 to 0.0 like the paper does, but I’ll keep the unet training for now.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:104 (71 by maintainers)

github_iconTop GitHub Comments

4reactions
Netruk44commented, Jun 15, 2022

My biggest improvement in the upscaler was achieved by changing the default unet2 dim = 32 to 128 (inspired by Friends don’t let friends train small diffusion models). Training time is much slower and GPU memory usage is much higher, but the upscaler output looks a lot better for me now.

2reactions
deepglugscommented, Jun 20, 2022

This training was seeing discoloration earlier, but it has gone away.

imagen_28_60

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Deep Learning Approach to Upscaling “Low-Quality” MR ...
“low-quality” (LQ) images. We investigate three UNets for upscaling LQ MRI: dense (DUNet), robust. (RUNet), and anisotropic (AUNet).
Read more >
Glossary:High-fidelity upscaling - PCGamingWiki PCGW
Deep Learning Super Sampling is a set of image upscaling algorithms developed by Nvidia for real-time use in video games using deep learning ......
Read more >
Upscaling and what it means? - Technical Discussion
These terms are often used interchangeably, although a more proper application of them would be that “oversampling” means sampling at a higher ...
Read more >
DLSS, Is it Upscaling, Super Sampling, or Anti Aliasing??
Yes, technically you're correct it's upscaling not supersampling (even though ... In both modes of DLSS there is a base-quality image being ...
Read more >
Transforming Noisy Low-Resolution into High-Quality Videos ...
Upscaler (Figure 2) is a fast and light-weighted method for increasing the video resolution of an input video while also adding detail to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found