main
Remote Upscale for ComfyUI
Offload image upscaling to a remote server with a dedicated GPU. Useful when your main ComfyUI machine has limited VRAM or when you want to use a different GPU for upscaling tasks.
Features
- Remote upscaling via HTTP API
- Real-time progress bar in ComfyUI
- Support for
.pth,.pt, and.safetensorsupscale models - Configurable tile size for memory management
- Model caching on server for faster subsequent runs
Installation
ComfyUI Node (Client)
- Copy the
remote_upscalefolder to your ComfyUIcustom_nodesdirectory - Restart ComfyUI
- The "Remote Upscale" node will appear in the "image/upscaling" category
Upscale Server
- Copy the
serverfolder to your remote machine - Install dependencies:
pip install -r requirements.txt - Install PyTorch with CUDA/ROCm support appropriate for your GPU
- Set the models path and run:
export UPSCALE_MODELS_PATH="/path/to/your/upscale_models" python server.py
The server will start on port 8189 by default.
Usage
- Start the upscale server on your remote machine
- In ComfyUI, add the "Remote Upscale" node
- Set the
server_urlto your server address (e.g.,http://192.168.1.100:8189) - Select a model from the dropdown
- Connect an image input and run the workflow
Node Parameters
- server_url: URL of the remote upscale server
- model_name: Upscale model to use (fetched from server)
- tile_size: Tile size for processing large images (default: 512)
- show_progress: Enable progress bar during upscaling
Refresh Models
Use the "Refresh Remote Models" node to update the model list from the server.
Server API
| Endpoint | Method | Description |
|---|---|---|
/models |
GET | List available models |
/upscale |
POST | Upscale image (no progress) |
/upscale_stream |
POST | Upscale with SSE progress |
/result/{id} |
GET | Fetch result after streaming |
/health |
GET | Server health check |
Requirements
Client (ComfyUI)
- requests
Server
- fastapi
- uvicorn
- python-multipart
- torch (with CUDA or ROCm)
- torchvision
- spandrel
- pillow
- numpy
License
MIT
Languages
Python
98.1%
Shell
1.9%