Currently the generic text-to-image (i.e sd2.1, dreamshaper) models return images in data_url format. Looking at this question, it looks like it's best if the library supports some data-url handling so the user can only focus on managing the bytes (instead of parsing the data-url as well).
I can work on that in the coming days, unless somebody does it faster :)
Ah, we can just use const { data: image_data} = await axios.get(data_url_or_url), it works for both urls and data urls... it shouldn't be any slower for data urls anyway.
Currently the generic text-to-image (i.e sd2.1, dreamshaper) models return images in data_url format. Looking at this question, it looks like it's best if the library supports some data-url handling so the user can only focus on managing the bytes (instead of parsing the data-url as well).
I can work on that in the coming days, unless somebody does it faster :)