Latent Diffusion Compression
~6 mincode completion
Implement latent_shape(H, W, C, f, c) returning the array [h, w, c, ratio]. H and W are divisible by f.
Where this shows up
~6 min
••••••••••••••••
8 employers weight this skill
4 autonomy companies, 1 enterprise vendor, 1 defense company, 1 health and bio company, 1 AI product company. Top match scores 87.
Python
import numpy as np
def latent_shape(H, W, C, f, c):
"""
Latent grid size and compression factor of a latent diffusion autoencoder.
Args:
H, W, C: image height, width and channels
f: spatial downsampling factor
c: latent channels
Returns:
array [h, w, c, ratio]
"""
# YOUR CODE HERE
pass