summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md55
1 files changed, 55 insertions, 0 deletions
diff --git a/README.md b/README.md
index 8b2425c..eea735e 100644
--- a/README.md
+++ b/README.md
@@ -639,3 +639,58 @@ Measured on A100 80 GB PCIe (single GPU) with Qwen3-Coder-Next AWQ 4-bit:
| Per-turn latency | ~10–15 s | ~28 s (32k ctx) |
| Context window | 262k (full, no truncation) | 32k (was truncating) |
| VRAM usage | 75 GiB (more KV cache) | 52–61 GiB |
+
+## Photo enhancement (ComfyUI)
+
+A separate VM setup (`hyperstack-vm-photo.toml`) runs [ComfyUI](https://github.com/comfyanonymous/ComfyUI)
+on an L40 GPU for Photolemur-style automatic photo enhancement. No prompts needed — drop photos in,
+get enhanced photos out.
+
+### How it works
+
+The pipeline runs Real-ESRGAN x4plus in "enhance in place" mode:
+upscale 4× (noise reduction, sharpening, colour correction) → scale back to the original resolution.
+Output is saved as JPEG at quality 92, so file sizes stay close to the originals.
+
+### Quickstart
+
+```sh
+# Provision the L40 VM (~$1/hr, ~8 min first-time setup including model download)
+ruby hyperstack.rb --config hyperstack-vm-photo.toml create
+
+# Check connectivity
+ruby photo-enhance.rb --test
+
+# Enhance all photos in a directory (outputs <name>_enhanced.jpg alongside originals)
+ruby photo-enhance.rb --indir ~/Pictures/my-album
+
+# Watch mode: process new arrivals automatically
+ruby photo-enhance.rb --indir ~/Pictures/my-album --watch
+
+# Destroy VM when done
+ruby hyperstack.rb --config hyperstack-vm-photo.toml delete
+```
+
+### Configuration (`hyperstack-vm-photo.toml`)
+
+| Key | Default | Description |
+|-----|---------|-------------|
+| `[vm].flavor_name` | `n3-L40x1` | Hyperstack GPU flavor (L40 48 GB, ~$1/hr) |
+| `[network].wireguard_server_ip` | `192.168.3.4` | WireGuard IP (after VM1=.1, VM2=.3) |
+| `[comfyui].port` | `8188` | ComfyUI REST API port (WireGuard subnet only) |
+| `[comfyui].models_dir` | `/ephemeral/comfyui/models` | Model weights (ephemeral NVMe) |
+| `[comfyui].models` | `["RealESRGAN_x4plus"]` | Pre-downloaded models |
+
+### Custom workflows
+
+The workflow JSON lives at `workflows/photo-enhance.json`. The `NODE_INPUT_IMAGE` placeholder
+is substituted at runtime by `photo-enhance.rb` with the uploaded filename.
+Swap in any ComfyUI-compatible workflow (e.g. add SUPIR for deeper restoration) by editing the JSON
+or passing `--workflow path/to/other.json`.
+
+### Performance (L40 48 GB)
+
+| Operation | Time per photo |
+|-----------|---------------|
+| Real-ESRGAN enhance + scale back | ~50–60 s |
+| Upload + download overhead | ~3 s |