Skip to content

BarrenWardo/Fooocus-Modal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 

Repository files navigation

🚀 Fooocus-Modal

Deploy the Fooocus App using Modal with persistent volume.

📖 Tutorial

Follow this guide, and you can deploy the Fooocus web app on modal in just a few minutes.

🛠️ Setting up Modal

  1. Start by registering on Modal. 💰 (Bonus - You'll get $30 free every month.)

Register on Modal

  1. Once registered, click on your profile & then settings (top right corner).

Profile Settings

  1. Now click on "API Tokens".

API Tokens

  1. Click on "New Token".

New Token

  1. You'll get this window. Now copy the command mentioned here.

Copy Command

🖥️ Getting System Ready

  1. Open Terminal.
  2. Install modal:
    pip install modal
  3. Check if modal is installed using this command:
    modal --version
    It should look something like this:

Modal Version

  1. Now paste the command copied at step 5 & run it.
  2. Then run:
    modal config show
    You should be able to see Token ID & Token Secret already set up here.

Modal Config

  1. Now go to any folder you want to run the setup from & git clone this repo & go into the cloned folder.
    git clone https://github.com/BarrenWardo/Fooocus-Modal.git && cd Fooocus-Modal

🚀 Deploy Fooocus

  1. You can deploy it now by running:

    modal deploy deploy.py
  2. You'll get a URL which should be something like this. Open it. Enjoy!

    xxyyzz-fooocus.modal.run
    

It'll take a few minutes for the web app to start. You can check logs on the modal dashboard.

Now Enjoy!

📝 Additional Notes

  • You can stop the app by going to your Modal Dashboard > Deployed Apps > Fooocus > Stop (Top right)

Stop App - Step 1 Stop App - Step 2

  • You can also temporarily deploy using modal serve. Documentation here. You need to keep the terminal running. If the terminal is stopped, then the app gets stopped.

    • Go into Fooocus-Modal folder using terminal & run any command below:
      • modal serve deploy.py (runs until the terminal is closed)
      • modal serve deploy.py --timeout 3600 (runs for 3600 seconds = 1 hour; you can change this number. Also, the terminal needs to be open or the app gets stopped)
  • The deployment is currently set to run on a Tesla T4 GPU and 1 container which will cost approximately $1 per hour. You can change it in the deploy.py file at line 7. The GPU list is available here.

    • “t4”
    • “l4”
    • “a100”
    • “h100”
    • “a10g”
    • “any”
  • Modal Pricing :

Modal Pricing

📓 Dev Notes

I know this might not be the best or most optimal way to deploy the app, but I tried my level best. If you liked this, consider giving a star on this repo & supporting me here:

ko-fi

About

Fooocus App deployment using Modal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages