Closed gimaldi closed 1 year ago
Hi @gimaldi, thanks for the issue! It looks to me like this is a new bug somewhere in HF's Inference API. The text-to-image models hosted on their website are currently returning the same error, for example runwayml/stable-diffusion-v1-5.
I'll leave this issue open for now and keep an eye on things. I haven't found any reference to this issue on their forums yet, but hopefully it will be fixed soon.
Thanks for pointing out the poor error handling in the text-to-image example. I've updated it in v1.2.1.
Hi @TannerKvarfordt, in this thread, https://github.com/huggingface/huggingface.js/issues/182, I have found a reference to a working model:
prompthero/openjourney-v4
For now I had hardcoded the above string in your main.go, inside goroutine:
img, fmt, err := hfapigo.SendTextToImageRequest("prompthero/openjourney-v4", &hfapigo.TextToImageRequest{//code}
Thanks for your quick response.
Good find! Looks like a more permanent solution is coming with huggingface/api-inference-community#246.
This has been resolved! Any model should work now.
Hi, I confirm is working.
Thank you very much. Ciao
I'm trying the "Text-To-Image" example. After entering a prompt, it give me the following error:
Sending request.......unknown image format:
I have tried debugging the sample code and I found that var chrv, after 'select/case' evaluation (case chrv := <-ch:), at line 56, contain an error:
`(dlv) print chrv
main.ChanRv·1 {
(dlv) quit`
I have tried to found a 'scale' object in your sources, but I din't find anything. Anyway, other examples work perfectly, so thank for your efforts.
Ciao gianluca