TizenryA/colab-gpu-studio
About
移动端 AI 创作工作台:按需 Colab GPU、ComfyUI 工作流、Drive 缓存与任务管理。
Productivity & AutomationMeasured star growth
- in 24h
- 0
- in 7 days
- +9
- in 15 days
- +38
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.en.md
OriginalEnglish | 简体中文
Current version: 0.3.1. Fixes #27, #29, #30 and #31. See 0.3.1 and the 0.3.0 release notes below and the offline implementation notes.
Colab GPU Studio
A personal AI workspace that lets you run ComfyUI on Colab GPUs from your phone, for image generation and H3 video.
The frontend is a React single-page app optimized for mobile touch controls, and the backend uses FastAPI. Your website, task queue, and past creations normally stay on your own VPS, without occupying a GPU. Only when you click “Generate” does the backend request a GPU from Google Colab. Once the job is done, it saves the results back and immediately destroys the runtime by default (or keeps it briefly when Retain mode is selected), so your compute units (CU) are not wasted on an idle GPU.
Downloads and Online Demo
- Latest version: 0.3.1 release (source + release notes).
- Prebuilt multi-platform bundles: the 0.3.1 release assets ship Windows x86_64 / Linux x86_64 / macOS x64 / macOS arm64 / Android Termux packages. Desktop bundles include Python and dependencies; Termux installs its native dependencies online at first launch; checksums are in
SHA256SUMS.txt. - Read-only UI demo: Open the Cloudflare Workers demo. Public demo password:
demo-readonly. - The demo uses the original 0.1.31-dev.8 frontend with a separate Mock data snapshot. It does not connect to the production site, Google, or a real GPU, and does not consume CU. Generation, uploads, edits, deletion, and authorization are unavailable; download and self-host the full version for complete functionality.
- Demo details and more screenshots. The screenshots below were captured in a real browser on the live demo site; they are not design mockups.
| Mobile creation page | Settings · Light theme |
|---|---|
![]() |
![]() |
View the desktop screenshot

0.3.1
Small bug-fix release, no data migration.
- #29 Job list shows Chinese labels for every backend state (e.g.
waiting_for_capacity→ 等待算力), and the "in progress" count includes queued / waiting / allocating jobs. - #30 If a job fails before a runtime is created, its instance is closed as released instead of staying "releasing" forever. File SQLite now uses WAL with a 30 s lock wait to reduce
OperationalError(database is locked). - #31 The offline workflow preview loads once per workflow instead of reloading on every page refresh, and text versions like
1.0.0no longer return a 422. - First start On a fresh database the API and worker no longer race to create tables (
table already exists); schema creation is serialized across processes. - #27 Windows frontend tests convert the file URL with
fileURLToPath(thanks @CyrusAuyeung, PR #28).
Downloads
- Colab-GPU-Studio-v0.3.1-windows-x86_64.zip
- Colab-GPU-Studio-v0.3.1-linux-x86_64.tar.gz
- Colab-GPU-Studio-v0.3.1-macos-x86_64.tar.gz
- Colab-GPU-Studio-v0.3.1-macos-arm64.tar.gz
- Colab-GPU-Studio-v0.3.1-android-termux.zip
- SHA256SUMS.txt
0.3.0 Release Notes
No new features in this release. It does two things: cleans up the code and fixes #24.
Defensive code cleanup (about 1270 lines removed, 490 added)
- The scheduler, instance, account, Drive and workbench services talk only to the real data layer; probing, fallback calls and compatibility branches for test doubles are gone.
- Removed try/except blocks that only swallowed errors, repeated checks, impossible branches and unused options.
- Authentication, per-user isolation, path checks, secret handling, and error handling around Colab, Drive and subprocess calls are kept.
#24 fixes (based on and merged from @CyrusAuyeung's work in #25, thank you)
- The runtime reports the actual GPU via nvidia-smi; jobs, instances and leases record the real model, and the UI shows "actual GPU" and "requested spec" separately.
- With exactly one authorized Colab account, auto allocation binds that account first; cache prep and Drive sync use the right compute and Drive accounts.
- Allocation failures distinguish "no GPU available (NO_RUNTIMES)" from other errors, and Google's raw error text is no longer shown.
- Released or cleaning-up leases are never reallocated; a successful cleanup retry clears the temporary warning and keeps the original failure reason.
- The Windows coordinator uses a cross-platform file lock, and timestamps always carry a time zone.
Testing
- 509 backend and 43 frontend tests pass; type check, production build and contract checks pass.
- One real CUDA smoke test on a Colab L4: it detected an NVIDIA L4 and the runtime was released after the job.
- Not yet verified: the Windows file lock has not been tried on a real Windows machine.
Back up the database and .env before upgrading; no data migration is needed. Full notes (Chinese): 0.3.0 release notes.
Downloads
- Colab-GPU-Studio-v0.3.0-windows-x86_64.zip
- Colab-GPU-Studio-v0.3.0-linux-x86_64.tar.gz
- Colab-GPU-Studio-v0.3.0-macos-x86_64.tar.gz
- Colab-GPU-Studio-v0.3.0-macos-arm64.tar.gz
- Colab-GPU-Studio-v0.3.0-android-termux.zip
- SHA256SUMS.txt
Why Build This?
- Saving CU comes first: The ComfyUI environment and tens of gigabytes of large-model weights are cached in your Google Drive. Let an inexpensive CPU runtime handle the heavy lifting of downloading models and setting up the environment. The expensive GPU (T4 / L4) only does three things after startup: restore the environment → sample the output → shut down and delete the instance immediately.
- Comfortable image and video creation on your phone: No more struggling with dense ComfyUI node connections in a mobile browser or watching a Colab tab to prevent disconnections. The frontend automatically renders forms from each workflow, while queued jobs keep running in the background even after you close the browser.
- One-click enablement in the browser: built-in templates start as drafts; the Workflows page walks you through validation, license confirmation, weight locking, a real GPU smoke test and publishing, polling automatically and stopping at the failing step.
- Four refined workflow templates included: Built-in templates cover Krea+MOSS dual-sampling image generation, MOSS text-to-image, MiniMax H3 image-to-video with first and last frames, and MiniMax H3 multi-reference image-to-video (supporting up to 6 reference images, 8-step Turbo v1.1, 1.2x latent refinement, a seamless anime VAE, and multiple SFW LoRAs for motion, camera movement, and consistent visual style).
Safety note: a fresh install only enables the offline
demo-mockworkflow (no Google, no cost). The four real built-in workflows sit in the list as drafts; clicking "enable" and confirming the cost runs one real GPU smoke test (billed per minute) and publishes automatically once it passes. See built-in workflows.
Built-in Workflows
| Workflow | Version | Recommended GPU | Description |
|---|---|---|---|
krea2-moss-dual-t2i |
1.0.0 / 1.1.1 | T4 HighRAM | 1.0.0 is the original template; 1.1.1 chains 4 publicly downloadable film/MJ texture LoRAs (1.1.0 referenced 7 LoRAs but shipped none of the weight files, so it has been retired) |
moss-image-sft-t2i |
1.0.0 | T4 | Single-image text-to-image generation with OpenMOSS |
minimax-h3-i2v |
1.1.0 | L4 | Generate a short video with audio from a first frame and an optional last frame, with an 8-step acceleration LoRA |
minimax-h3-ref2v |
1.4.0 | L4 | Generate video with audio from up to 6 reference images; choose 4-step, 8-step, refinement, or 20-step modes, with a seamless anime VAE |
See the built-in workflow guide for details and activation steps.
Quick Deployment
Option 1: One-command Docker Startup (Recommended for VPS Deployment)
Install Docker, Docker Compose, and Python first (Python is used to generate the initial random secrets):
# 1. Generate your private .env configuration file (replace the domain with your own; leave it unchanged for local use)
uv run python scripts/init_env.py --site-url https://your-domain
# 2. Copy your own compose file (port/mount tweaks live here, so the git tree stays clean)
cp docker-compose.example.yml docker-compose.yml
# 3. Start the services (three containers: api / worker / watchdog)
docker compose up -d --build
Only
docker-compose.example.ymlis tracked; your localdocker-compose.ymlis git-ignored, so changing ports or mounts no longer conflicts withgit pull.scripts/deploy.shcreates it automatically when missing.
By default, the service listens only on the local address 127.0.0.1:8788. For public access, use Caddy or Nginx as a reverse proxy with HTTPS. All data is stored in the studio-data volume. Do not accidentally run docker compose down -v, which deletes the data volume.
Option 2: Run Locally
Requires Python 3.11+, uv, Node.js, and npm:
uv sync --extra test
uv run python scripts/init_env.py --site-url http://127.0.0.1:8788
npm --prefix web ci
npm --prefix web run build
# Terminal 1: Start the Web API
uv run --env-file .env uvicorn app.main:app --app-dir api --host 127.0.0.1 --port 8788 --no-access-log
# Terminal 2: Start the task queue worker
uv run --env-file .env python -m app.worker worker
# Terminal 3: Start the timeout-cleanup watchdog
uv run --env-file .env python -m app.worker watchdog
After startup, open http://127.0.0.1:8788. The login password is the STUDIO_PASSWORD value in the newly generated .env file.
How Do I Connect My Own Google Colab Account to Run Real Models?
To prevent secret leaks and unintended charges, real GPU access is disabled by default (GPU_REAL_ENABLED=0). Follow these steps in order to connect your own account:
- Connect Google OAuth: Follow the Google OAuth and Drive setup guide, import your Google Cloud Web client JSON in the web settings, and connect Colab and Drive separately.
- Enable built-in workflows or import new ones: Refer to the built-in workflow guide and the model and workflow review process. Set
GPU_REAL_ENABLED=1, configure budget limits, and review and enable the workflows.
API Documentation
See the Chinese API guide for authentication, asset uploads, jobs and batches, polling, downloads, and retries, with a Python client example. The guide targets 0.1.31-dev.8; its verification scope is documented.
Development and Testing
uv run pytest -q
uv run ruff check api tests
npm --prefix web run test:contract
npm --prefix web run build
Important Notes and Disclaimer
- Protect your secrets: Never upload
.env, databases, or Google OAuth client JSON files to a public repository or send them to others. TheENCRYPTION_KEYin.envdecrypts OAuth tokens stored in the database. Keep an offline backup; if you lose it, you will need to authorize your accounts again. - Google is the billing authority: CU usage shown on the website is only an estimate calculated from past jobs. Check your Google Colab account for the actual number of compute units charged.
- Designed for personal use: This project is intended for personal use and does not implement multi-tenant isolation. Do not deploy it directly as a public, multi-user SaaS service.
- License: This project's code is open source under GNU AGPL-3.0 (if you modify it and provide a service over a network, you must also make the complete modified source code available). ComfyUI, third-party nodes, model weights, and LoRAs used in workflows remain subject to their respective licenses (no model weight files are included in this repository).
Support the Community
Issues and pull requests are welcome to improve the project or share better workflows! If you find it useful, please consider giving it a Star.
Reproducible Offline Acceptance Checks (No Real GPU Startup)
After installing dependencies, run uv run python scripts/verify_offline.py. This command isolates the configuration, runs backend tests, Ruff, frontend contract checks, and a frontend build. It also starts and stops two temporary Mock services to run browser tests for batches, retries after failure, and long lists. The browser origin must be the local address 127.0.0.1; use OFFLINE_CHROMIUM to specify the Chromium executable. Test logs and network audits are saved in docs/offline-evidence/, and verification-run.json is written only after all checks pass.
.github/workflows/offline.yml provides CI configuration for the same command. Verification has currently been performed locally only, not in GitHub Actions. Dependency installation accesses package repositories, but real Colab, OAuth, Drive operations, and GPU calls are prohibited during acceptance checks. These checks do not establish that real cloud storage or models are usable.
Explore related projects
Loading…

