Production-grade AI music visual generation studio β node-based workflow engine + ComfyUI backend
RainGod Comfy Studio is the unified visual generation engine and workflow interface for the RAINGOD AI Music Kit β combining a node-based studio frontend with a production-grade FastAPI backend wired directly into ComfyUI.
Built by Curtis Charles Farrar (@POWDER-RANGER) | ORCID: 0009-0008-9273-2458
RainGod Comfy Studio
βββ switchboard/ β Vanilla JS dashboard (6 panels, live health/queue/generation)
βββ backend/ β FastAPI backend
β βββ rain_backend.py REST API (9 endpoints)
β βββ comfyui_client.py Circuit breaker + retry + dedup
β βββ workflow_builder.py Dynamic ComfyUI graph assembly
β βββ lora_manager.py LoRA scan/load/chain/merge
β βββ rain_backend_config.py All presets + GPU detection
βββ workflows/ β ComfyUI JSON templates (8 presets)
βββ files/ β Multi-provider adapters
β βββ gemini_adapter.py Google Gemini
β βββ groq_adapter.py Groq LLM
β βββ suno_adapter.py Suno music generation
β βββ replicate_adapter.py Replicate inference
β βββ ollama_adapter.py Local Ollama
β βββ hf_adapter.py HuggingFace
β βββ dispatcher.py Multi-provider routing
β βββ comfy_cloud_adapter.py Cloud ComfyUI
βββ skills/ β Agent skill definitions (7 skills)
βββ tests/ β 184 pytest tests
βββ scripts/ β quickstart + start_all
βββ examples/ β Album art generation CLI
βββ docs/ β Architecture docs
git clone https://github.com/POWDER-RANGER/RainGod-Comfy-Studio.git
cd RainGod-Comfy-Studio
chmod +x scripts/rain_quickstart.sh
./scripts/rain_quickstart.shOr manually:
python -m venv venv && source venv/bin/activate
pip install -r backend/requirements.txt
uvicorn backend.rain_backend:app --host 0.0.0.0 --port 8000Then open http://localhost:8000/docs for the API or switchboard/index.html in your browser for the dashboard.
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Backend + ComfyUI status |
| GET | /presets |
All sampler/resolution/LoRA presets |
| POST | /generate |
Single image generation (async, 202) |
| POST | /batch-generate |
Batch generation |
| GET | /queue/status |
ComfyUI queue state |
| DELETE | /queue/{id} |
Cancel queued prompt |
| GET | /outputs/{filename} |
Retrieve generated file |
| Template | Steps | Resolution | Notes |
|---|---|---|---|
txt2img_draft |
20 | 512Γ512 | Fastest preview |
txt2img_quality |
40 | 1024Γ1024 | Default production |
txt2img_final |
80 | 2048Γ2048 | Maximum quality |
txt2img_ultra |
80 | 2048Γ2048 | Ultra sampler |
txt2img_synthwave_lora |
40 | 1024Γ1024 | Synthwave LoRA |
img2img_refine |
30 | source | 75% denoise |
| Adapter | Provider | Use Case |
|---|---|---|
gemini_adapter.py |
Google Gemini | Prompt generation / vision |
groq_adapter.py |
Groq | Fast LLM inference |
suno_adapter.py |
Suno | AI music generation |
replicate_adapter.py |
Replicate | Remote model inference |
ollama_adapter.py |
Ollama | Local LLM |
hf_adapter.py |
HuggingFace | Model hub inference |
comfy_cloud_adapter.py |
ComfyUI Cloud | Remote ComfyUI |
pip install pytest pytest-cov
pytest tests/ --verbose --cov=backend --cov-report=term-missing184 tests across: API endpoints, circuit breaker, workflow builder, LoRA manager.
docker-compose up -dServices: ComfyUI (:8188) + RAINGOD backend (:8000) + Redis + Nginx reverse proxy.
.\start_all.ps1- All GitHub Actions SHA-pinned
- CodeQL + Bandit + OSV Scanner + DevSkim running on every push
- Dependabot configured for pip + actions updates
- CORS restricted via
ALLOWED_ORIGINSenv var - Non-root Docker user
- Path traversal protection on
/outputs/endpoint
docs/ARCHITECTURE.mdβ Full system architectureINSTALLATION.mdβ Setup guideCONTRIBUTING.mdβ Contribution guidelinesCONTACT.mdβ Contact & support
MIT β see LICENSE. Attribution required.
Curtis Charles Farrar | ORCID: 0009-0008-9273-2458