Run ComfyUI on Kaggle's free GPU: FLUX schnell images in about 24 seconds, and a real AI video with Wan 2.2 5B. Every number in this video is from a real run on a free Kaggle T4 (12 Nov 2026).
⚠️ This method uses a Cloudflare tunnel. Kaggle's acceptable use policy lists "server farming" and "activity unrelated to ML" as abuse. It doesn't mention tunnels and I found no official answer, so I can't promise it's allowed. ComfyUI has no password: don't share your link, and stop the session when you're done.
Real results from this video:
- First image (1024×1024, 4 steps, model loading): 72.7 s
- Second image (model already loaded): 23.8 s
- Video, Wan 2.2 5B, 832×480, 49 frames (about 2 s): 3 min 50 s
Chapters:
0:00 Made for $0
0:27 What is ComfyUI
0:52 Step 1: Turn on the free GPU
1:16 Step 2: Install ComfyUI
1:42 Step 3: Download FLUX schnell
2:05 Step 4: Start ComfyUI + Cloudflare tunnel
2:23 The honest risk (read this)
3:10 Step 5: Make the first image
4:01 Two GPUs: which one is used?
4:26 Step 6: Download Wan 2.2 5B
4:51 Make an AI video
5:54 The 4 limits
6:24 Save your results and stop
6:37 Recap
COMMANDS (one Kaggle cell each, Settings: GPU T4 x2 + Internet on)
Cell 1 - Install ComfyUI:
%cd /tmp
!git clone https://github.com/comfyanonymous/ComfyUI
%cd /tmp/ComfyUI
!pip install -q -r requirements.txt
Cell 2 - Image model, FLUX.1 schnell FP8 (Apache 2.0):
!wget -q --show-progress -c https://huggingface.co/Comfy-Org/flux1-schnell/resolve/main/flux1-schnell-fp8.safetensors -P /tmp/ComfyUI/models/checkpoints
Cell 3 - Start ComfyUI (use 0.0.0.0; with 127.0.0.1 the tunnel gives "403 Forbidden"):
import subprocess, time
subprocess.Popen(['python', 'main.py', '--listen', '0.0.0.0', '--port', '8188'], cwd='/tmp/ComfyUI', stdout=open('/tmp/comfy.log', 'w'), stderr=subprocess.STDOUT)
time.sleep(40)
!tail -n 3 /tmp/comfy.log
Cell 4 - Cloudflare tunnel (prints your link):
!wget -q https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -O /tmp/cloudflared && chmod +x /tmp/cloudflared
subprocess.Popen(['/tmp/cloudflared', 'tunnel', '--url', 'http://127.0.0.1:8188'], stdout=open('/tmp/tunnel.log', 'w'), stderr=subprocess.STDOUT)
time.sleep(12)
!grep -o 'https://[a-z0-9-]*\.trycloudflare\.com' /tmp/tunnel.log | head -1
Copy the link, open a new tab and paste it. Clicking it inside Kaggle gives a 403.
Cell 5 - Video model, Wan 2.2 TI2V 5B (Apache 2.0):
!wget -q --show-progress -c https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_ti2v_5B_fp16.safetensors -P /tmp/ComfyUI/models/diffusion_models
!wget -q --show-progress -c https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors -P /tmp/ComfyUI/models/text_encoders
!wget -q --show-progress -c https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan2.2_vae.safetensors -P /tmp/ComfyUI/models/vae
In ComfyUI: Templates, search "wan 2.2 5b", choose Video Generation. On a T4 set 832 x 480 and 49 frames.
#ComfyUI #Kaggle #FreeGPU