Pod
. We’ll set up a server to generate images with Flux1 Schnell, but you can easily adapt it to use other models like Stable Diffusion v1.5.
app.py
with the following code. This script sets up a Beam Pod
with ComfyUI, installs dependencies, downloads the Flux1 Schnell model, and launches the server.
https://pod-12345.apps.beam.cloud
) where your server is hosted.
app.py
. Here’s how:
image
section:
ORG_NAME
, REPO_NAME
, WEIGHTS_FILE
, and COMMIT
with values from the model’s repository. Check the “Files and versions” tab for the weights file and commit hash.workflow_api.json
file in the same directory as app.py
. This file should contain your ComfyUI workflow, which you can export from the ComfyUI web interface.workflow_api.json
file in your Volume and use it like WORKFLOW_FILE = Path("/your_volume/workflow_api.json")
/generate
endpoint with a JSON payload containing a prompt
: