Hello everyone,
I am testing stable diffusion with Bumblebee. Everything is fine, but I would like to display the generated images on the web.
I receive these kind of results…
%{
results: [
%{
image: #Nx.Tensor<
u8[512][512][3]
EXLA.Backend<host:0, 0.3536702673.2258239536.2772>
[
[
[75, 103, 11],
[68, 107, 0],
[64, 109, 0],
[63, 110, 0],
[62, 107, 0],
[61, 110, 0],
[61, 110, 0],
[60, 110, 0],
[60, 110, 0],
[60, 110, 0],
[61, 109, 0],
[61, 109, 0],
[61, 109, 0],
[60, 108, 0],
[60, 109, 0],
[60, 109, ...],
...
],
...
]
>,
is_safe: true
},
...
It is a list of #Nx.Tensor<u8[512][512]…>
In the demo code these images are transformed into Kino.Image, to be displayed into Livebook.
Does anyone knows how to transform those images into something more usual for the web, like jpg, or png?
Thanks for taking time