IF
IF copied to clipboard
Tensor error for basic example usage
Can't seem to run the basic example usage from here. Throws the following error:
`
AttributeError Traceback (most recent call last)
4 frames /usr/local/lib/python3.10/dist-packages/diffusers/utils/pil_utils.py in numpy_to_pil(images) 41 if images.ndim == 3: 42 images = images[None, ...] ---> 43 images = (images * 255).numpy().round().astype("uint8") 44 if images.shape[-1] == 1: 45 # special case for grayscale (single channel) images
AttributeError: 'Tensor' object has no attribute 'astype'
I'm getting the same error. I have diffusers v0.20.2.
I avoided the error by rolling back diffusers library with "pip install diffusers==0.16" however, the final output image was not what the prompt stated. This colab page does work however here
Thank you @adavies25. I got it working too! The stage 3 is where the upscaler is being used.. And that was where it was failing. I was able to use it simply with my own diffuser. And building the diffuser library from source.
But this bug should remain Open since the documentation is wrong.. It doesn't mention anything about using an old diffuser version. Just my opinion