How to upgrade from CPU to GPU for faster generation and iteration?

#410
by oneyellowpeacock - opened

I just made a comic. It took a lot of trial and error which took a lot of time. So I tried to find how to upgrade CPU to save time but I could not find any.
Then I duplicated this space to my profile and went to my spaces and upgraded to GPU but it didn't seem to work. It was throwing a lot of errors.
I'm new here so I don't know how everything works. If you could please help me it would be really awesome! Thank you :)

Hi,

you normally do not need to use pay for a GPU on this space since all the generation (for LLM and stable diffusion) is done on external servers!

the best approach is to:

  • check that you have use a PRO Hugging Face account (it's a modest monthly cost, and this gives you access to unlimited SDXL and LLM for llama-2)
  • duplicate the AI Comic Factory space
  • in the popup (to configure the environment variable) put your Hugging Face API token https://huggingface.co/docs/hub/security-tokens
  • in the same popup, type INFERENCE_API for the "rendering engine", and INFERENCE_API for the "LLM engine"

Thankk you so much for the detailed steps!

By external servers do you mean that you are bearing the cost of all the generations?

I will definitely check out Hugging Face Pro. I already have a 3070 laptop but both llama-2 and SDXL seem to be run quite slow in it. So a pro account definitely might help in that regard as well :)
I didn't know about putting the tokens and inference_api. I'll do that and let you know if all worked.

Again Thank you for this awesome tool :)

Sign up or log in to comment