Skip to content

POWDER-RANGER/RainGod-Comfy-Studio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ RayneGod Comfy Studio

Production-grade AI music visual generation studio β€” node-based workflow engine + ComfyUI backend

CI Security Scans MIT License Python ComfyUI


🎯 Overview

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


πŸ—οΈ Architecture

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

πŸš€ Quick Start

git clone https://github.com/POWDER-RANGER/RainGod-Comfy-Studio.git
cd RainGod-Comfy-Studio
chmod +x scripts/rain_quickstart.sh
./scripts/rain_quickstart.sh

Or 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 8000

Then open http://localhost:8000/docs for the API or switchboard/index.html in your browser for the dashboard.


πŸ”§ Backend API

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

🎨 Workflow Templates

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

πŸ”Œ Provider Adapters (files/)

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

πŸ§ͺ Testing

pip install pytest pytest-cov
pytest tests/ --verbose --cov=backend --cov-report=term-missing

184 tests across: API endpoints, circuit breaker, workflow builder, LoRA manager.


🐳 Docker

docker-compose up -d

Services: ComfyUI (:8188) + RAINGOD backend (:8000) + Redis + Nginx reverse proxy.


πŸ“ Windows Quick Launch

.\start_all.ps1

πŸ” Security

  • All GitHub Actions SHA-pinned
  • CodeQL + Bandit + OSV Scanner + DevSkim running on every push
  • Dependabot configured for pip + actions updates
  • CORS restricted via ALLOWED_ORIGINS env var
  • Non-root Docker user
  • Path traversal protection on /outputs/ endpoint

πŸ“š Documentation


βš–οΈ License

MIT β€” see LICENSE. Attribution required.
Curtis Charles Farrar | ORCID: 0009-0008-9273-2458

About

🎡 RayneGod Comfy Studio - Node-based AI music workflow studio inspired by ComfyUI | Features draggable nodes, SVG connection pipelines, and real-time audio synthesis using Web Workers | Built for WebSIM with optimized memory pooling

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors