Phase 2: CLI Commands (tsr comfy)

Add ComfyUI CLI subcommand group with:
- `tsr comfy status` - System stats (GPU, RAM, PyTorch, queue)
- `tsr comfy queue` - Show queue status (running/pending)
- `tsr comfy queue --clear` - Clear the queue
- `tsr comfy models` - List available checkpoints, LoRAs, VAE, etc.
- `tsr comfy history [ID]` - View generation history
- `tsr comfy generate` - Text-to-image with full parameter control
  - prompt, negative, model, width, height, steps, cfg, seed
  - sampler, scheduler selection
  - optional --output to save locally
- `tsr comfy run workflow.json` - Run arbitrary API-format workflows

All commands support --json output and --url for custom server.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Adam Ladachowski
2026-02-16 16:07:49 +01:00
parent e776f9846e
commit c8c93596c8
2 changed files with 340 additions and 5 deletions
+5 -5
View File
@@ -15,16 +15,16 @@
- Include SDXL/Flux-compatible default workflow (DEFAULT_WORKFLOW_TEMPLATE)
## Phase 2: CLI Commands (`tensors/cli.py`)
- [ ] Step 2.1: Add `comfy` subcommand group with status commands
- `tsr comfy status` - System stats
- [x] Step 2.1: Add `comfy` subcommand group with status commands
- `tsr comfy status` - System stats (GPU, RAM, queue)
- `tsr comfy queue` - Queue status
- `tsr comfy queue --clear` - Clear queue
- `tsr comfy models` - List loaded models
- `tsr comfy history [PROMPT_ID]` - View history
- [ ] Step 2.2: Add generation commands
- `tsr comfy generate "prompt"` - Simple text-to-image
- [x] Step 2.2: Add generation commands
- `tsr comfy generate "prompt"` - Simple text-to-image with full options
- `tsr comfy run workflow.json` - Run arbitrary workflow
- Rich progress bar for generation
- Rich progress output via console
## Phase 3: Server API Routes (`tensors/server/comfyui_api_routes.py`)
- [ ] Step 3.1: Create new router with query endpoints