| title | Video Generation |
|---|---|
| slug | yyrsk9K8K5rJT2Kxew6yN |
| createdAt | Tue Jan 21 2025 21:36:39 GMT+0000 (Coordinated Universal Time) |
| updatedAt | Thu May 29 2025 17:02:32 GMT+0000 (Coordinated Universal Time) |
This guide will walk you through setting up and using ComfyUI for video generation on Vast.ai. ComfyUI provides a powerful node-based interface for creating advanced stable diffusion pipelines, making it ideal for video generation workflows.
- A Vast.ai account
- Basic familiarity with image or video generation models
- (Optional) Read Jupyter guide
- (Optional) SSH client installed on your local machine and SSH public key added in Account tab at cloud.vast.ai
Navigate to the Templates tab to view available templates. For video generation, we recommend searching for "ComfyUI" among the recommended templates. The ComfyUI template provides a powerful and modular stable diffusion GUI for designing and executing advanced pipelines using a graph/nodes/flowchart based interface.
Template Features:
- Access through both Jupyter and SSH
- Instance Portal
- Token-based authentication enabled by default
- Built-in provisioning script for models and custom nodes
Add/update these environment variables as needed:
# Core Settings
COMFYUI_ARGS="--disable-auto-launch --port 18188 --enable-cors-header" # ComfyUI launch arguments
# Authentication
WEB_ENABLE_HTTPS=false # Enable/disable direct HTTPS
WEB_ENABLE_AUTH=true # Enable/disable authentication
# Access Tokens
CF_TUNNEL_TOKEN="" # Cloudflare Zero Trust token
CIVITAI_TOKEN="" # Access gated Civitai models
HF_TOKEN="" # Access gated HuggingFace models
# Custom Setup
PROVISIONING_SCRIPT="" # URL to custom provisioning scriptProvisioning Script:
- Default script includes popular image models and custom nodes
- Fully customizable - Create your own script for a custom instance
- Must be Bash-compatible and start with
#!/bin/bash - Upload modified script to a GitHub Gist or respository and update the PROVISIONING_SCRIPT variable to point to the raw file
Select your template from 'My Templates' after making any desired edits to it.
- In the Search interface, look for machines that have sufficient VRAM to handle your chosen video model. ⚠All models are different so check the model requirements carefully.
- Click RENT to create an instance on the machine with the GPU of your choice
- Go to Instances tab to see your instance loading
- When the blue button says "OPEN", click this button to access the Instance Portal which will provide access to ComfyUI and other useful applications.
- Click the direct link or cloudflare quick tunnel link to access ComfyUI. Here's a beginner's guide to using ComfyUI.
ComfyUI has a workflow browser, so for a quick start you can choose on of their templates
We'll pick the LTX Video workflow for this guide. Simply click it to proceed.
Your new instance will not yet have the required models, but fortunately ComfyUI will alert us to this and offer the models for download.
Unfortunately, the interface does not know it is running in the cloud so clicking the download buttons will download the models to your local machine. To work around this you can either:
- Download the models to your computer and then upload them to the instance
- SSH to the instance and use
curlorwgetto directly download the models to their correct locations
To complete this guide we will use SSH
# Download the models
wget --content-disposition -P /workspace/ComfyUI/models/checkpoints/ "https://huggingface.co/Lightricks/LTX-Video/resolve/main/ltx-video-2b-v0.9.safetensors"
wget --content-disposition -P /workspace/ComfyUI/models/clip/ "https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp16.safetensors"
# Download the workflow source image
wget --content-disposition -P /workspace/ComfyUI/input/ "https://comfyanonymous.github.io/ComfyUI_examples/ltxv/island.jpg"The above commands will download the required models into the instance. When the downloads have completed you can refresh the browser window to clear the missing models error.
Finally, click the Run button to process the workflow.
Feel free to modify the prompts and experiement!
We have some pre-configured ComfyUI templates - And one for this guide. Check them out here
Remember to always check VRAM usage and adjust parameters accordingly. Start with smaller frames and resolutions, then scale up as you become more comfortable with the workflow.

