diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-24 09:58:21 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-24 09:58:21 +0200 |
| commit | c2d54f7a4823ca0de99fdb8cc0a094b0cdf4cbb4 (patch) | |
| tree | d790cd7ebf1f2c97cf686dfdf23622b3c7e83823 /hyperstack-vm-photo.toml | |
| parent | 9b3c83d4860566c8d5d682821314378d0c18c35d (diff) | |
Add ComfyUI photo enhancement VM and photo-enhance.rb client
- hyperstack-vm-photo.toml: L40 GPU VM config (192.168.3.4, ~$1/hr)
with [comfyui] section for port, model dirs, and pre-downloaded weights
- hyperstack.rb: full ComfyUI provisioning support alongside vLLM/Ollama —
config accessors, comfyui_install_script (git clone + venv + systemd),
RemoteProvisioner#install_comfyui, Manager#create integration, UFW rules,
status/service_mode_summary updates, --comfyui/--no-comfyui CLI flags
- photo-enhance.rb: standalone client — uploads photos, submits ComfyUI
workflow, polls for output, downloads PNG, converts to JPEG at quality 92
so file sizes match originals; --watch mode; processed-file manifest
- workflows/photo-enhance.json: Real-ESRGAN x4plus enhance-in-place workflow
(upscale 4x for enhancement, ImageScaleBy 0.25 back to original resolution)
- README.md: Photo enhancement section with quickstart, config reference,
workflow customisation notes, and performance table
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'hyperstack-vm-photo.toml')
| -rw-r--r-- | hyperstack-vm-photo.toml | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/hyperstack-vm-photo.toml b/hyperstack-vm-photo.toml new file mode 100644 index 0000000..d6130b0 --- /dev/null +++ b/hyperstack-vm-photo.toml @@ -0,0 +1,68 @@ +[auth] +api_key_file = "~/.hyperstack" + +[hyperstack] +base_url = "https://infrahub-api.nexgencloud.com/v1" + +[state] +file = ".hyperstack-vm-photo-state.json" + +[vm] +name_prefix = "hyperstack-photo" +hostname = "hyperstack-photo" +environment_name = "snonux-ollama" + +# L40 (48GB GDDR6, ~$1.00/hr) is the recommended GPU for ComfyUI photo enhancement. +# It provides ample VRAM for SUPIR (FP16 needs ~12-20GB) + Real-ESRGAN with large tile sizes. +# Cheaper than A100 ($2/hr) while offering faster CUDA cores and FP8 support. +flavor_name = "n3-L40x1" +image_name = "Ubuntu Server 24.04 LTS R570 CUDA 12.8 with Docker" +assign_floating_ip = true +create_bootable_volume = false +enable_port_randomization = false +labels = ["comfyui", "photo-enhance", "wireguard"] + +[ssh] +username = "ubuntu" +private_key_path = "~/.ssh/id_rsa" +hyperstack_key_name = "earth" +port = 22 +connect_timeout_sec = 10 + +[network] +wireguard_udp_port = 56710 +wireguard_subnet = "192.168.3.0/24" +# Photo VM uses .4; VM1=.1, VM2=.3 are the LLM VMs on the same wg1 tunnel. +wireguard_server_ip = "192.168.3.4" +# Reuse the same inference port constant; ComfyUI uses its own port 8188 below. +ollama_port = 11434 +allowed_ssh_cidrs = ["auto"] +allowed_wireguard_cidrs = ["auto"] + +[bootstrap] +enable_guest_bootstrap = true +install_wireguard = true +configure_ufw = true +configure_ollama_host = false + +[ollama] +# Not needed on this VM; photo enhancement uses ComfyUI exclusively. +install = false + +[vllm] +# Not needed on this VM; ComfyUI handles all inference. +install = false + +[comfyui] +install = true +# ComfyUI REST API port — opened on the WireGuard subnet only. +port = 8188 +# Model weights on ephemeral NVMe for fast access; survives reboots on Hyperstack. +models_dir = "/ephemeral/comfyui/models" +output_dir = "/ephemeral/comfyui/output" +container_name = "comfyui_photo" +# Pre-downloaded model weights: +# RealESRGAN_x4plus — fast 4x upscaling + sharpening (~65MB, upscale_models/) +# SUPIR-v0Q — SDXL-based photo restoration, Photolemur-quality results (~8GB, checkpoints/) +# SUPIR-v0F — SUPIR variant tuned for faithful fidelity over generative enhancement (~8GB) +models = ["RealESRGAN_x4plus", "SUPIR-v0Q"] |
