From c2d54f7a4823ca0de99fdb8cc0a094b0cdf4cbb4 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 24 Mar 2026 09:58:21 +0200 Subject: Add ComfyUI photo enhancement VM and photo-enhance.rb client MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- workflows/photo-enhance.json | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 workflows/photo-enhance.json (limited to 'workflows') diff --git a/workflows/photo-enhance.json b/workflows/photo-enhance.json new file mode 100644 index 0000000..6be7dfa --- /dev/null +++ b/workflows/photo-enhance.json @@ -0,0 +1,42 @@ +{ + "1": { + "class_type": "LoadImage", + "_meta": {"title": "Load Input Photo"}, + "inputs": { + "image": "NODE_INPUT_IMAGE", + "upload": "image" + } + }, + "2": { + "class_type": "UpscaleModelLoader", + "_meta": {"title": "Load Real-ESRGAN Model"}, + "inputs": { + "model_name": "RealESRGAN_x4plus.pth" + } + }, + "3": { + "class_type": "ImageUpscaleWithModel", + "_meta": {"title": "Enhance (internal 4x pass)"}, + "inputs": { + "upscale_model": ["2", 0], + "image": ["1", 0] + } + }, + "4": { + "class_type": "ImageScaleBy", + "_meta": {"title": "Scale back to original resolution"}, + "inputs": { + "image": ["3", 0], + "upscale_method": "lanczos", + "scale_by": 0.25 + } + }, + "5": { + "class_type": "SaveImage", + "_meta": {"title": "Save Enhanced Photo"}, + "inputs": { + "images": ["4", 0], + "filename_prefix": "enhanced_" + } + } +} -- cgit v1.2.3