[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-109219":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":43,"updatedAt":44,"readmeContent":45,"aiSummary":46,"trendingCount":15,"starSnapshotCount":15,"syncStatus":16,"lastSyncTime":47,"discoverSource":48},109219,"comfy-colab-kit","FireTable\u002Fcomfy-colab-kit","FireTable","Zero-GPU-idle gateway for running ComfyUI on ephemeral Google Colab VMs with Zero-Trust Access","https:\u002F\u002Fcomfy-colab-kit.firetable.tech",null,"Python",140,24,82,0,2,35,48.69,"MIT License",false,"main",true,[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"ai-agents","claude-code","cloudflared","colab","comfyui","cursor","free","gateway","google-ai","google-colab","gpu-gateway","image-generation","mcp","mcp-server","model-context-protocol","opensource","serverless-gpu","stable-diffusion","zero-trust","2026-11-12 03:42:57","2026-11-23 14:24:38","\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Flogo\u002Flogo-e-fusion-dark-512.png\" width=\"96\" height=\"96\" alt=\"Comfy Colab Kit logo\" style=\"border-radius: 16px;\" \u002F>\n\u003C\u002Fp>\n\n\u003Ch1 align=\"center\">Comfy Colab Kit\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n  \u003Cb>An always-available, wake-on-demand ComfyUI on Google Colab — open the URL; if it's asleep, press Wake and watch it boot; then it is your ComfyUI app.\u003C\u002Fb>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  English •\n  \u003Ca href=\"README-CN.md\">简体中文\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fcomfy-colab-kit.firetable.tech\">\u003Cb>🌐 Live Showcase Site\u003C\u002Fb>\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fcomfy-colab-kit.firetable.tech\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FShowcase-comfy--colab--kit.firetable.tech-10b981?logo=cloudflare&logoColor=white\" alt=\"Live Showcase\" \u002F>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fglama.ai\u002Fmcp\u002Fservers\u002FFireTable\u002Fcomfy-colab-kit\">\u003Cimg src=\"https:\u002F\u002Fglama.ai\u002Fmcp\u002Fservers\u002FFireTable\u002Fcomfy-colab-kit\u002Fbadges\u002Fscore.svg\" alt=\"Glama MCP Server\" \u002F>\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FFireTable\u002Fcomfy-colab-kit\u002Freleases\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002FFireTable\u002Fcomfy-colab-kit?color=8b5cf6&label=Release\" alt=\"Release\" \u002F>\u003C\u002Fa>\n  \u003Ca href=\"LICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-amber.svg\" alt=\"License\" \u002F>\u003C\u002Fa>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.11%2B-3b82f6?logo=python&logoColor=white\" alt=\"Python\" \u002F>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FColab-L4-F9AB00?logo=googlecolab&logoColor=white\" alt=\"Colab L4\" \u002F>\n\u003C\u002Fp>\n\n---\n\n> [!IMPORTANT]\n> **Personal-use tool.** Colab compute belongs to your Google account. Sharing it with others may violate the\n> Colab terms\u002FFAQ (e.g. reselling or sharing compute) and can get the account restricted. Keep access to\n> yourself or a handful of family\u002Ffriends. Not affiliated with Google or Comfy Org.\n\n---\n\n## 📖 Overview\n\nA tiny gateway, **comfy-gate** (Python \u002F aiohttp), runs either **100% locally on your Mac\u002FPC (zero VPS, zero domain, zero setup fees)** or on a Linux VPS behind Cloudflare Access.\n\n> [!NOTE]\n> **The Gate's Essential Role**: `comfy-gate` is fundamentally a **lifecycle, cold-start, and auto-shutdown gateway** — it does **NOT** reimplement ComfyUI. When the GPU is asleep, it serves a lightweight, zero-compute wake card with real-time SSE progress. When booted, it transparently reverse-proxies directly into the **authentic, full-featured ComfyUI Web Application** (including node graph, App mode, custom nodes, extensions, and WebSocket streaming), injecting only a non-intrusive floating overlay to switch between App mode and the Node Graph.\n\n| Pillar | What you see | How |\n|---|---|---|\n| **1 · Wake on demand** | Sleep card → Wake → stages + logs → ComfyUI Web App | 10-state machine, `colab new` (L4) + setup via `colab exec`, streaming reverse proxy (HTTP + `\u002Fws`) |\n| **2 · Switchable profiles** | Pick MOSS-Image, FLUX.2 Klein, Wan 2.2 Video, SD3.5, Qwen before waking | `profile.yaml` + JSON Schema; zero secrets, models by public URL |\n| **3 · Auto-stop** | Overlay shows time left; sleeps on idle \u002F max session \u002F quiet hours \u002F CU budget | every rule configured in `.env` |\n| **4 · Run Anywhere** | **Local Standalone** (`http:\u002F\u002Flocalhost:8080`) or **Cloud VPS** (`comfy.domain.com`) | 1-command Docker \u002F Python launch; no VPS or domain needed for local users |\n\n---\n\n## 🖼️ Preview\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"screenshots\u002Fpreview-landing.png\" width=\"100%\" alt=\"Landing Showcase\" \u002F>\u003Cbr\u002F>\n  \u003Ci>Landing Showcase: WebGL Aurora backdrop, zero-GPU-idle architecture, and community workflow showcase\u003C\u002Fi>\n\u003C\u002Fp>\n\n\u003Ctable>\n  \u003Ctr>\n    \u003Ctd align=\"center\" width=\"50%\">\n      \u003Cimg src=\"screenshots\u002Fpreview-wake.png\" width=\"100%\" alt=\"Cold-Start Wake Gateway\" \u002F>\u003Cbr\u002F>\n      \u003Csub>\u003Cb>Cold-Start Wake Gateway\u003C\u002Fb>\u003Cbr\u002F>Real-time SSE stage telemetry, Cloudflare Access Zero-Trust auth, and live CU budget ledger\u003C\u002Fsub>\n    \u003C\u002Ftd>\n    \u003Ctd align=\"center\" width=\"50%\">\n      \u003Cimg src=\"screenshots\u002Fpreview-comfyui.png\" width=\"100%\" alt=\"ComfyUI on Colab L4 GPU\" \u002F>\u003Cbr\u002F>\n      \u003Csub>\u003Cb>ComfyUI on Colab L4 GPU\u003C\u002Fb>\u003Cbr\u002F>Native ComfyUI web application with App mode, Linear\u002FGraph toggle overlay, and real-time image generation\u003C\u002Fsub>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n### 🤖 AI Agent Driving the GPU (Image & Video Showcase)\n\nThree real sessions where an AI agent called the gateway end-to-end — no browser, no manual cell.\n\n\u003Ctable>\n  \u003Ctr>\n    \u003Ctd align=\"center\" width=\"50%\">\n      \u003Cimg src=\"screenshots\u002Fagent-txt2img.png\" width=\"100%\" alt=\"AI agent text-to-image session\" \u002F>\u003Cbr\u002F>\n      \u003Csub>\u003Cb>Text-to-Image via \u003Ccode>\u002Fcomfy-colab-kit\u003C\u002Fcode>\u003C\u002Fb>\u003Cbr\u002F>41 s from prompt to finished PNG\u003C\u002Fsub>\n    \u003C\u002Ftd>\n    \u003Ctd align=\"center\" width=\"50%\">\n      \u003Cimg src=\"screenshots\u002Fagent-img2img.png\" width=\"100%\" alt=\"AI agent image-to-image session\" \u002F>\u003Cbr\u002F>\n      \u003Csub>\u003Cb>Image-to-Image via \u003Ccode>\u002Fcomfy-colab-kit\u003C\u002Fcode>\u003C\u002Fb>\u003Cbr\u002F>2 m 14 s, two variations from one reference\u003C\u002Fsub>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd align=\"center\" colspan=\"2\">\n      \u003Cimg src=\"screenshots\u002Fagent-img2vid.gif\" width=\"100%\" alt=\"AI agent video generation session\" \u002F>\u003Cbr\u002F>\n      \u003Csub>\u003Cb>Text-to-Video via \u003Ccode>wan-ltx-video\u003C\u002Fcode>\u003C\u002Fb>\u003Cbr\u002F>65 s from prompt to 24 fps HD MP4\u003C\u002Fsub>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n| | 🟢 Text-to-Image | 🟣 Image-to-Image | 🎬 Text\u002FImage-to-Video |\n|---|---|---|---|\n| **Agent command** | `text to img: a pic about \"hello world: comfy-colab-kit\" 1024 × 1024` | `img to img, using the highest quality, generate an image based on the reference image, maintaining the original composition, and completely change the girl's outfit to a bikini.` | `A cinematic tracking shot of a cute red panda walking through a mossy bamboo forest in soft morning sunlight, golden dust motes floating in the air, shallow depth of field` |\n| **Skill entry** | `\u002Fcomfy-colab-kit` | `\u002Fcomfy-colab-kit` | `\u002Fcomfy-colab-kit` |\n| **Pipeline** | MOSS-Image DeBand text-to-image | character matte → beach plate → MOSS-Image DeBand img2img | `wan-ltx-video` · Wan 2.2 5B TI2V (`Wan22ImageToVideoLatent`) |\n| **Profile preset** | `Fast alt` — 10 steps + anti-banding LoRAs | `Quality` — 25 steps, banding-fix LoRAs at full strength | Official Wan 2.2 5B 20-step `uni_pc` (`shift=5.0`, `cfg=5.0`) |\n| **Resolution** | 1024 × 1024 | 1024 × 1024, 2 variations | 832 × 480 · 33 frames @ 24 fps (HD MP4) |\n| **GPU state on arrival** | already `ready` — no wake-up needed | already `ready` — session reused | woke from `sleeping` (19.8 GB streamed at 518 MB\u002Fs) |\n| **Wall time** | 41 s | 2 m 14 s | 65 s generation |\n| **Output** | one PNG (`outputs\u002Fhello-world-comfy-colab-kit-1024.png`) | `beachA` (sheer wrap) and `beachB` (plain two-piece) | one H.264 MP4 (`WanVideo_00001_.mp4`) + preview GIF |\n| **CU ledger** | 22.16 CU left · 1.71 CU\u002Fhr while up | 20.99 CU left · 1.71 CU\u002Fhr while up | 1.71 CU\u002Fhr while up · auto-stopped immediately after |\n| **Afterwards** | agent can call `stop` to release the GPU immediately | agent keeps the GPU warm for the next variation, then releases it | agent downloads MP4 & calls `ckit stop` immediately |\n\nAll flows run entirely through the gateway's REST\u002FMCP surface: the agent never touches a browser, a notebook cell, or a Colab URL.\n\n---\n\n## 💡 Why Comfy Colab Kit? (The Paradigm Shift)\n\nTraditional Colab forces you to sit in front of a computer, manually run notebook cells, and baby-sit browser tabs that disconnect when your laptop sleeps. Comfy Colab Kit completely decouples compute execution from human attendance:\n\n| Dimension | ❌ Traditional Colab Notebooks | ⚡ Comfy Colab Kit |\n|---|---|---|\n| **Trigger Method** | Sit at PC, open browser, manually execute cells | **Anywhere & Autonomous Agents**: 1-click wake on mobile, tablet, or headless AI agent (REST \u002F MCP) |\n| **Session Reliability** | Dies if laptop sleeps, tab closes, or Wi-Fi blips | **Decoupled Cloud Gateway**: VPS gateway persists state, auto-reconnects, survives local disconnects |\n| **Access & Security** | Ephemeral random `*.trycloudflare.com` URLs with zero auth | **Single Custom Domain + Cloudflare Access**: Enterprise Zero-Trust SSO \u002F OTP, service tokens for agents |\n| **Collaboration** | Teammates accidentally spin up duplicate VMs, burning CU | **Global Idempotent Shared Session**: All visitors join the running instance with live streaming logs |\n| **Budget Safety** | Leaving notebooks running overnight drains entire CU quotas | **Smart Auto-Shutdown**: Automatic spin-down on idle (e.g. 20m), max session time, or CU hard budget |\n| **Automation & MCP** | Inaccessible to headless AI coding agents | **AI Agent & MCP Native**: Full Model Context Protocol (stdio + HTTP), `ckit` CLI, RFC 8628 device flow, `\u002Fcomfy-colab-kit` skill |\n\n## ✨ Features\n\n- **Remote & Mobile Wake** — Wake ComfyUI on Colab L4 from your smartphone, tablet, or terminal. No desktop browser or manual cell execution required.\n- **One shared session** — wake is idempotent; a second visitor (or agent) joins the in-flight boot instead of\n  starting another VM. State survives gate restarts (`STATE_DIR\u002Fsession.json`).\n- **Model Context Protocol (MCP) Native** — Full MCP JSON-RPC 2.0 support via local stdio (`ckit mcp`) and remote HTTP (`\u002Fmcp`), exposing `gate_status`, `gate_wake`, `gate_txt2img`, `gate_img2img`, `gate_generate`, and `gate_stop`.\n- **Live progress for everyone** — Server-Sent Events broadcast state, download GB \u002F speed and setup logs.\n- **Dual-Mode Access Control (Mode B Default)** — `OWNER_ONLY_CONTROL=true` restricts wake, stop, profile switch, and extension to administrators (`OWNER_EMAILS`), safeguarding Colab compute units while allowing all authenticated team members to share ComfyUI once ready. Switchable to Mode A collaborative control (\"who wakes can stop\").\n- **Multi-IdP & Access-verified identity** — Supports Google & GitHub OAuth alongside Email OTP. Every request verifies `Cf-Access-Jwt-Assertion` (RS256, AUD, issuer).\n- **Backend locked to a service token** — the Colab tunnel hostname only admits the gate's Access service token.\n- **Fast cold start & L4 hardware acceleration** — a parallel HTTP Range downloader streams the 24.9 GB MOSS-Image profile at T0 straight into a RAM tmpfs at up to 1,096 MB\u002Fs (8.77 Gbps), overlapping tool installs and ComfyUI boot. `--highvram` keeps the entire 18 GB model suite resident in L4's 24 GB VRAM with 100% cache retention (zero PCIe swapping), yielding ~90 s (~1.5 min) cold starts and 26.8 s warm 1024×1024 generations.\n- **App mode first** — workflows get ComfyUI App-mode metadata; the injected overlay toggles App ⇄ Graph.\n- **Full ComfyUI API passthrough** — transparently proxies `\u002Fupload\u002Fimage` for Img2Img reference images, `\u002Fprompt`, `\u002Fhistory`, `\u002Fview`, `\u002Fobject_info`, `\u002Fsystem_stats`, `\u002Fqueue`, and WebSocket `\u002Fws`.\n- **Autonomous Agent friendly** — RFC 8628 device flow (`ckit auth`), 1-click prompt copy in Web UI, `docs\u002FAGENT_SKILL.md`, `docs\u002FMCP.md`, `skills\u002Fcomfy-colab-kit\u002FSKILL.md`, and `llms.txt`.\n\n## 🚀 Quick start\n\nChoose the deployment path that fits your needs:\n\n### Option A: 💻 100% Local Standalone (Zero VPS, Zero Domain, Zero Cloudflare)\n> **Recommended for individual creators, local AI agents, and Mac \u002F laptop users!** No server to rent, no domain to buy, and no Cloudflare configuration. Your machine commands an ephemeral Google Colab L4 GPU (24GB VRAM) and streams ComfyUI directly to `http:\u002F\u002Flocalhost:8080`.\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FFireTable\u002Fcomfy-colab-kit.git && cd comfy-colab-kit\ncp .env.example .env\n# Enable local zero-auth & localhost port (macOS: sed -i ''; Linux: sed -i)\nsed -i '' 's\u002FAUTH_DISABLED=false\u002FAUTH_DISABLED=true\u002F' .env\nsed -i '' 's\u002FPUBLIC_HOST=comfy.example.com\u002FPUBLIC_HOST=localhost:8080\u002F' .env\n\n# 1. One-time Google Colab login & directories setup\nmkdir -p data secrets && chmod 777 data\ndocker run --rm -it -v $(pwd)\u002Fdata:\u002Fdata -e HOME=\u002Fdata\u002Fhome ghcr.io\u002Ffiretable\u002Fcomfy-colab-kit:latest colab sessions\n\n# 2. Start the gateway locally\ndocker compose -f deploy\u002Fdocker-compose.local.yml up -d\n# (Or run natively: pip install -e \".[dev]\" && python3 -m gate)\n\n# 3. Open http:\u002F\u002Flocalhost:8080 in your browser!\n```\n*Full local guide & AI agent setup: [docs\u002FDEPLOY_LOCAL.md](docs\u002FDEPLOY_LOCAL.md)*\n\n---\n\n### Option B: ☁️ Cloud VPS + Cloudflare Zero Trust (Production Team Setup)\n> **Recommended for teams, 24\u002F7 background automations, and public webhook integrations.**\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FFireTable\u002Fcomfy-colab-kit.git && cd comfy-colab-kit\ncp .env.example .env                         # set PUBLIC_HOST, COLAB_TUNNEL_HOST, CF_ACCESS_*, emails\nmkdir -p secrets data && chmod 700 secrets data\nZONE_NAME=example.com COLAB_TUNNEL_HOST=comfy-colab.example.com \\\n  CLOUDFLARE_API_TOKEN=… scripts\u002Fcf-setup.sh # tunnel + DNS + backend Access app + service token → secrets\u002F\nopenssl rand -hex 32 > secrets\u002Fagent_token && chmod 600 secrets\u002F*\ndocker compose -f deploy\u002Fdocker-compose.yml run --rm comfy-gate colab sessions   # one-time colab login\ndocker compose -f deploy\u002Fdocker-compose.yml up -d\n# add deploy\u002FCaddyfile.snippet to Caddy, reload, open https:\u002F\u002F$PUBLIC_HOST\n```\n\nPre-built container images are published on GHCR (`docker pull ghcr.io\u002Ffiretable\u002Fcomfy-colab-kit:latest`), and the operator CLI \u002F MCP client can be installed standalone via `uv tool install git+https:\u002F\u002Fgithub.com\u002FFireTable\u002Fcomfy-colab-kit.git` (or from the `.whl` attached to [GitHub Releases](https:\u002F\u002Fgithub.com\u002FFireTable\u002Fcomfy-colab-kit\u002Freleases)).\n\nFull walkthroughs: [docs\u002FDEPLOY_LOCAL.md](docs\u002FDEPLOY_LOCAL.md) (local standalone), [docs\u002FDEPLOY_VPS.md](docs\u002FDEPLOY_VPS.md) (VPS), [docs\u002FACCESS.md](docs\u002FACCESS.md) (browser, guest link, LAN & agent access), [docs\u002FCLOUDFLARE.md](docs\u002FCLOUDFLARE.md), and [docs\u002FAGENT.md](docs\u002FAGENT.md) (comprehensive credential guide).\n\n## 🤖 For AI Agents & Automation (Agent Skill Protocol)\n\nAutonomous coding agents (Claude Code, Cursor, OpenClaw, Codex, LangGraph) can wake, monitor, use, and release the ComfyUI GPU backend without manual browser interaction:\n\n```\n[Agent] ──Bearer \u002F Service Token──► comfy-gate (\u002F_gate\u002Fstatus)\n                                          │ If sleeping: POST \u002F_gate\u002Fwake\n                                          ▼\n                                    Colab VM boots L4 ComfyUI\n                                          ▼\n[Agent] ◄──standard ComfyUI API───► Proxied \u002Fprompt, \u002Fhistory, \u002Fview\n                                          ▼\n[Agent] ──POST \u002F_gate\u002Fstop────────► Releases GPU (or auto-sleep on idle)\n```\n\n1. **Authentication & Pairing**: Provide `Authorization: Bearer \u003Cagent_token>` or Cloudflare Access Service Token headers. Alternatively, use RFC 8628 device flow via `ckit auth https:\u002F\u002F\u003Chost>` or click **🤖 Copy Prompt for AI Agent** in the Web UI.\n2. **Status Check & Discovery**: Call `GET \u002F_gate\u002Fstatus` (or `ckit status --json`). Discover supported workflows via `ckit profiles --json` or `GET \u002F_gate\u002Fprofiles`.\n3. **Idempotent Wake**: Call `POST \u002F_gate\u002Fwake` (or `ckit wake --profile \u003Cname> --wait`). Multiple concurrent wakes safely join the in-flight boot.\n4. **Model Context Protocol (MCP)**: Run `ckit mcp` locally for Cursor\u002FClaude Desktop, or point streamable MCP clients to `https:\u002F\u002F\u003Chost>\u002Fmcp` to use `gate_status`, `gate_wake`, `gate_txt2img`, `gate_img2img`, `gate_generate`, and `gate_stop`.\n5. **ComfyUI API Passthrough**: Once `ready`, call standard ComfyUI endpoints directly through the gate (`POST \u002Fupload\u002Fimage` for Img2Img reference uploads, `POST \u002Fprompt`, `GET \u002Fhistory\u002F{prompt_id}`, `GET \u002Fview?filename=...`, and WebSocket `\u002Fws`).\n6. **Clean Shutdown**: When execution completes and no humans are active (`clients == 0`), call `POST \u002F_gate\u002Fstop` (or MCP `gate_stop`) to immediately release compute, or allow the idle auto-stop rule to reclaim the VM.\n\n📖 **Agent References & Protocols**:\n- [docs\u002FAGENT_SCAFFOLDING.md](docs\u002FAGENT_SCAFFOLDING.md) — **Let AI Build Your Profile or Adapt a Fork**: Agent runbook & copy-paste prompts for generating custom ComfyUI profiles or adapting a fork of this gateway to run *any* Google Colab GPU workload (vLLM, Ollama, Forge, Gradio, etc.).\n- [docs\u002FMCP.md](docs\u002FMCP.md) — Comprehensive Model Context Protocol guide (stdio `ckit mcp`, remote HTTP `\u002Fmcp`, Cursor & Claude setup).\n- [skills\u002Fcomfy-colab-kit\u002FSKILL.md](skills\u002Fcomfy-colab-kit\u002FSKILL.md) — Universal Agent Skill specification (`\u002Fcomfy-colab-kit`) with Txt2Img vs Img2Img decision tree.\n- [skills\u002Fcomfy-workflow-ui\u002FSKILL.md](skills\u002Fcomfy-workflow-ui\u002FSKILL.md) — ComfyUI App Mode and workflow UI inspection & audit runbook.\n- [docs\u002FAPP_MODE.md](docs\u002FAPP_MODE.md) — ComfyUI App Mode (Linear Mode) architecture, schemas, and node serialization rules.\n- [docs\u002FAGENT_SKILL.md](docs\u002FAGENT_SKILL.md) — Detailed Agent Skill specification, credential handling, and tool patterns.\n- [docs\u002FAGENT.md](docs\u002FAGENT.md) — Autonomous VPS deployment guide, credential procurement, and Cloudflare Access setup.\n- [apps\u002Fgate\u002Fopenapi.yaml](apps\u002Fgate\u002Fopenapi.yaml) — OpenAPI 3.1 specification for all `\u002F_gate\u002F*` and passthrough routes.\n- [llms.txt](llms.txt) — LLM context index for AI systems.\n\n## 🧩 Profiles\n\n| Profile | Purpose | Default download |\n|---|---|---|\n| [`moss-image`](profiles\u002Fexamples\u002Fmoss-image\u002F) (primary) | MOSS-Image: DeBand int8 default, 4-step turbo, official quality \u002F layout, edit (optional) — side by side in App mode | ~25 GB core \u002F ~57 GB full default set |\n| [`flux-klein`](profiles\u002Fexamples\u002Fflux-klein\u002F) | FLUX.2 Klein 4B: Distilled 4-step (Apache-2.0) & Base 20-step T2I + `ReferenceLatent` Image Edit, plus FLUX.1 Schnell fp8 (optional) | ~15.4 GB core \u002F ~27.6 GB |\n| [`wan-ltx-video`](profiles\u002Fexamples\u002Fwan-ltx-video\u002F) | Wan 2.2 5B TI2V (Text\u002FImage-to-Video), Wan 2.1 1.3B T2V (`prefetch: true`), and Lightricks LTX-Video 2B T2V\u002FI2V (optional) | ~16.9 GB core \u002F ~30.6 GB |\n| [`sd-latest`](profiles\u002Fexamples\u002Fsd-latest\u002F) | Stable Diffusion 3.5: Large fp8 default, TurboX 8-step, Medium turbo (gated, optional) | ~15 GB core \u002F ~22 GB |\n| [`qwen-image`](profiles\u002Fexamples\u002Fqwen-image\u002F) | Qwen-Image 2.1: Turbo T2I default, full T2I, Turbo \u002F full Edit | ~27 GB core \u002F ~43 GB |\n\nWorkflows are **only** community-published ones, fetched from the author with source and license recorded.\nFormat and passthrough options: [docs\u002FPROFILES.md](docs\u002FPROFILES.md).\n\n> [!TIP]\n> **Need a different model or a non-ComfyUI Colab service?**\n> If the built-in profiles don't include the model you want — or if you want to fork this repository and reuse its wake-on-demand gateway, Zero-Trust auth, RAM `tmpfs` Range downloader, and auto-stop rules for **any Google Colab GPU workload** (vLLM, Ollama, SD-WebUI Forge, Gradio, etc.) — point your AI coding agent at [**`docs\u002FAGENT_SCAFFOLDING.md`**](docs\u002FAGENT_SCAFFOLDING.md) to scaffold it automatically.\n\n## ⏱️ Auto-stop\n\n`IDLE_TIMEOUT_MIN` · `MAX_SESSION_HOURS` \u002F `EXTEND_MAX_TIMES` · `BOOT_TIMEOUT_MIN` · `STOP_ON_PAGE_CLOSE_MIN` ·\n`QUIET_HOURS` · `DAILY_CU_BUDGET` \u002F `MONTHLY_CU_BUDGET` \u002F `MIN_CU_BALANCE` · `ORPHAN_SWEEP_MIN` ·\n`WATCHDOG_GATE_LOST_MIN` (Colab-side self-release). Details: [docs\u002FAUTO_STOP.md](docs\u002FAUTO_STOP.md).\n\n## 🔐 Security\n\nNo secret ever enters the repo: `.env`, `secrets\u002F`, `data\u002F` are ignored, gitleaks + `scripts\u002Fcheck-secrets.sh`\nrun in pre-commit and CI, profiles reject credential-like keys. Secrets reach Colab over `colab exec` stdin and\nlive only in kernel memory. See [docs\u002FSECURITY.md](docs\u002FSECURITY.md).\n\n## 🏗️ Monorepo Architecture\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Farchitecture\u002Fflow.svg\" width=\"100%\" alt=\"Comfy Colab Kit: request path, 10-state lifecycle, and auto-stop gates\" \u002F>\u003Cbr\u002F>\n  \u003Ci>Request path, 10-state lifecycle, and the five auto-stop gates — animated SVG, light &amp; dark aware\u003C\u002Fi>\n\u003C\u002Fp>\n\nComfy Colab Kit is structured as an engineering monorepo separating server applications, runtime packages, model profiles, and deployment automation:\n\n```\ncomfy-colab-kit\u002F\n├── apps\u002F\n│   ├── gate\u002F                 # [Application] Gateway & Reverse Proxy (backend Python + web UI)\n│   │   ├── app.py            # aiohttp entrypoint, routes, middleware, auto-stop loop\n│   │   ├── session.py        # Central single-instance Session orchestrator\n│   │   ├── proxy.py          # Reverse proxy with SSE\u002FWS streaming & overlay injection\n│   │   ├── openapi.yaml      # OpenAPI 3.1 specification\n│   │   └── web\u002F              # Wake page static UI (index.html, bg.js, logo.svg)\n│   └── site\u002F                 # [Application] Showcase \u002F Landing Site\n│       ├── index.html        # Showcase documentation & promo page\n│       ├── styles.css        # Aligned theme styles\n│       └── main.js           # Client interactions\n├── packages\u002F\n│   ├── colab\u002F                # [Package] Colab VM agent & runtime (setup.py)\n│   ├── cli\u002F                  # [Package] Host & developer CLI tool (ckit)\n│   └── schemas\u002F              # [Package] JSON Schema definitions (profile.schema.json)\n├── profiles\u002F                 # Profiles & Model Configurations\n│   ├── examples\u002F             # Built-in community profiles (moss-image, flux-klein, wan-ltx-video, sd-latest, qwen-image)\n│   └── custom\u002F               # Mount point for user custom profiles\n├── deploy\u002F                   # Infrastructure & deployment configuration\n│   ├── Dockerfile            # Container build recipe\n│   ├── docker-compose.yml    # VPS orchestration\n│   └── Caddyfile.snippet     # Reverse proxy routing\n├── docs\u002F                     # Comprehensive product & engineering documentation\n│   ├── AGENT.md              # VPS deployment & credential acquisition runbook\n│   ├── AGENT_SKILL.md        # AI agent usage guide (wake, generate, stop)\n│   ├── AGENT_SCAFFOLDING.md  # AI agent guide to author profiles or adapt forks for any Colab workload\n│   ├── APP_MODE.md           # ComfyUI App Mode form architecture & UI specifications\n│   └── ...\n├── skills\u002F                   # Self-contained agent runbooks\n│   ├── comfy-colab-kit\u002F      # Gateway operator skill (wake, prompt, generate, stop)\n│   └── comfy-workflow-ui\u002F    # Workflow UI & App Mode inspector and audit skill\n├── scripts\u002F                  # CI, validation and secret check utilities\n└── tests\u002F                    # Pytest test suite (157 tests)\n```\n\n## 🛠️ Development\n\n```bash\npython -m venv .venv && . .venv\u002Fbin\u002Factivate && pip install -e \".[dev]\"\nnpm install                 # Graphviz (WebAssembly) — lays out the architecture diagram\npython -m pytest -q\nnode scripts\u002Fbuild-hero.mjs               # the dispatch bench, assets\u002Farchitecture\u002Fhero.svg\npython scripts\u002Fbuild-architecture-svg.py   # regenerate assets\u002Farchitecture\u002Fflow*.svg\nAUTH_DISABLED=true STATE_DIR=\u002Ftmp\u002Fkit COLAB_BIN=\u002Fbin\u002Ffalse python -m gate.app   # wake page on :8080\n```\n\n## 💖 Acknowledgments & Open-Source Credits\n\nComfy Colab Kit stands on the shoulders of giants. We express our deepest gratitude to the creators and open-source communities who make this project possible:\n\n- **[ComfyUI](https:\u002F\u002Fgithub.com\u002Fcomfyanonymous\u002FComfyUI)** — The revolutionary node-based diffusion execution engine and modern Web App interface created by @comfyanonymous and the Comfy Org.\n- **[Google Colab](https:\u002F\u002Fcolab.research.google.com\u002F)** — For democratizing high-performance GPU compute (NVIDIA L4 24GB).\n- **[Cloudflare](https:\u002F\u002Fwww.cloudflare.com\u002F)** — For the rock-solid Zero Trust Access network, Named Tunnels (`cloudflared`), and global Pages hosting.\n- **[React Bits](https:\u002F\u002Freactbits.dev)** — The visual design foundation for the Aurora WebGL shaders, SpotlightCard cursor glow, and ShinyText animations created by **David Haz**.\n- **[Hugging Face](https:\u002F\u002Fhuggingface.co\u002F)** — High-speed model hosting and parallel weight streaming (`hf_xet`).\n- **[uv by Astral](https:\u002F\u002Fastral.sh\u002Fuv)** — Blazing fast Python environment initialization.\n- **[MOSS-Image](https:\u002F\u002Fhuggingface.co\u002FMATLOWAI\u002FMOSS-Image-SFT-DeBand-int8)** — Cutting-edge open diffusion weights, DeBand LoRAs, and community workflows by OpenLMLab and MATLOWAI.\n- **[Black Forest Labs](https:\u002F\u002Fblackforestlabs.ai\u002F)** — Creators of the FLUX.2 Klein 4B (Distilled Apache-2.0 & Base) and FLUX.1 Schnell image generation & editing models.\n- **[Alibaba Wan Team (Tongyi Lab)](https:\u002F\u002Fgithub.com\u002FWan-Video\u002FWan2.2) & [Lightricks](https:\u002F\u002Fgithub.com\u002FLightricks\u002FLTX-Video)** — Creators of the Apache-2.0 Wan 2.2 5B TI2V \u002F Wan 2.1 1.3B and LTX-Video 2B open video generation models.\n- **[Stability AI](https:\u002F\u002Fstability.ai\u002F) & [Qwen Team](https:\u002F\u002Fgithub.com\u002FQwenLM)** — For open-weights research (SD 3.5 Large & Qwen-Image 2.1).\n\n## 📄 License\n\nMIT for this repository. Models, LoRAs, custom nodes and workflows referenced by profiles keep their own licenses\n(listed in each profile README) and are downloaded from their original sources. Colab is a trademark of Google;\nComfyUI belongs to Comfy Org. This project is not affiliated with either.\n","Comfy Colab Kit 是一个轻量级网关工具，用于在临时性 Google Colab GPU 实例上按需启动并托管 ComfyUI 工作流界面。它通过本地或 VPS 部署的 aiohttp 网关（comfy-gate）实现冷启动管理：用户访问 URL 后可一键唤醒休眠中的 Colab VM，实时查看启动日志，并无缝接入原生 ComfyUI Web 应用（支持节点图、App 模式、自定义节点与 WebSocket 流）。项目采用零信任访问模型，集成 Cloudflare Access，支持多模型配置文件（如 SD3.5、FLUX.2、Qwen 等）和自动关机策略。适用于个人 AI 图像\u002F视频生成实验、快速原型验证及低开销的 Stable Diffusion 服务化部署。","2026-11-24 04:36:12","CREATED_QUERY"]