[Doc] Improved level of clarity for latents_to_rgb. by LagPixelLOL · Pull Request #9529 · huggingface/diffusers (original) (raw)

Oh I think it's an error on my part, I was passing without batch dim to the function before, since I assumed as the function returns only a single image, it should only accept a single latent as the input. It will result in an error at the image_array = image_array.transpose(1, 2, 0) line with an error message of ValueError: axes don't match array.

I just tested with passing in with the batch dim and it will run successfully.

This PR still do improve LoC by only accepting without batch and returning a single image, as I got confused by the input value and assumed the function contains an error.