Register and log in on Modal.
Run the following commands in your terminal:
pip install modal
python3 -m modal setup
Clone the official example repository:
git clone <https://github.com/modal-labs/modal-examples>
Then navigate to the modal-examples directory:
cd modal-examples
Now, follow the official tutorial for deployment.
Official tutorial:
https://modal.com/docs/examples/comfyapp#run-flux-on-comfyui-as-an-api