The point of latent diffusion is compression: the model works on far fewer numbers than the pixels. This ratio measures how much smaller the latent is than the image it encodes.
Implement compression_ratio(h, w, c_img, f, c_lat), the number of image values divided by the number of latent values.
Count the image values, count the latent values with the latent grid size, and divide.
No results yet
Run your code to check it against the examples, or submit to run every test.