carefree0910 / carefree-creator

AI magics meet Infinite draw board.
https://creator.nolibox.com/guest
MIT License
2.13k stars 216 forks source link

Using API to generate images #37

Closed XplosiON1232 closed 9 months ago

XplosiON1232 commented 10 months ago

Hello! I used to be able to launch it on Colab and then send API requests to the endpoint "/txt2img/sd"

https://example.ngrok.io/txt2img/sd

But now the documentation is gone in "/redoc" and I cant send API requests to the endpoint at all.

I'm sorry if I've missed anything, thank you!

carefree0910 commented 10 months ago

Hi! Since I've added more and more features to this repo, even the basic sd services cannot be launched in a naive Colab due to the memory issue (not GPU RAM, but RAM - there are simply too many models to be loaded 🤣)

So if you scroll down to the bottom of the colab, you'll find that the end of the last LOOOONG command is something like:

os.system('cfcreator serve --limit 1 --focus sync')

You can change it to:

os.system('cfcreator serve --limit 1 --focus sd.base')

to re-activate the /txt2img/sd (and the /img2img/sd) endpoint. Beware that this might crush the Colab if the RAM is not enough!

XplosiON1232 commented 10 months ago

Hey! I tired, and yes, it did indeed hit the RAM limit and crash the Colab 🙃

Is there maybe any way to run an old version of the project on colab? Since I remember it working before.

Thank you.

carefree0910 commented 10 months ago

Hi! Unfortunately, I'm afraid that 'currently' there isn't a way to do it. 😣 But I'm working on simplifying the start up process under the sd.base mode, and once I successfully run it through the Colab, I'll let you know!

XplosiON1232 commented 10 months ago

Okay, thank you!

XplosiON1232 commented 9 months ago

Hello! Sorry to disturb you, but there isn't any way to specify an old version of the package when installing in the colab?

For example instead of "pip install carefree-creator" we could do something like "pip install carefree-creator==1.0" or something, to install the old version of the package?

Thank you, and if not, lmk if you manage to fit it in a colab again!

carefree0910 commented 9 months ago

Oh, never mind! There indeed has a way to specify an old version, and yes, replace pip install carefree-creator with pip install carefree-creator==xxx can definitely do the job!

Here's the full list of the available versions: https://pypi.org/project/carefree-creator/#history

The problem is, I'm not sure which version can solve your problem, so I didn't mention it. 🤣

carefree0910 commented 9 months ago

Hello! Sorry to disturb you, but there isn't any way to specify an old version of the package when installing in the colab?

For example instead of "pip install carefree-creator" we could do something like "pip install carefree-creator==1.0" or something, to install the old version of the package?

Thank you, and if not, lmk if you manage to fit it in a colab again!

Hi! I've just updated the colab, it should be working now. 🥳

Let me know if you face any other issues!

XplosiON1232 commented 9 months ago

Hey! I tried it and it works great! Thank you very much!