ComfyUI custom nodes for integrating with the Upsampler API to enhance and upscale images using AI.
Three different upscaling methods:
- Smart Upscale - Enhances images by intelligently regenerating at a higher resolution
- Dynamic Upscale - Preserves the overall composition while forcing new details
- Precise Upscale - Upscales and sharpens while completely preserving the original structure
-
Clone or download this repository to your ComfyUI custom_nodes directory:
cd ComfyUI/custom_nodes git clone <this-repo-url> comfyui-upsampler -
Install dependencies:
pip install -r comfyui-upsampler/requirements.txt -
Restart ComfyUI
- Visit https://upsampler.com/
- Create an account and generate an API key
- Add credits to your account for processing
The Upsampler API requires images to be accessible via public URLs. The nodes now include automatic image hosting with multiple options:
-
Get a free API key:
- Visit https://api.imgbb.com/
- Sign up and generate an API key
- Free tier: Up to 100 images/day, 32MB per image
-
Configure the API key (choose one method):
Method 1: Node Parameter
- Add your ImgBB API key to the "imgbb_api_key" field in each node
Method 2: Environment Variable
- Set environment variable:
IMGBB_API_KEY=your_api_key_here - Windows:
set IMGBB_API_KEY=your_api_key_here - Linux/Mac:
export IMGBB_API_KEY=your_api_key_here
If no ImgBB API key is provided, the nodes will automatically try:
- Catbox.moe: Up to 200MB, no API key needed, permanent storage
- 0x0.st: Simple file sharing service
- PostImages: Image hosting service
Perfect for large images (32MB-200MB) without needing any API keys!
Note: Free services may be less reliable and have usage limits.
For production use, implement your own hosting solution by modifying the _upload_image_temp() method in nodes.py.
-
Add one of the Upsampler nodes to your ComfyUI workflow:
- 🔍 Upsampler Smart Upscale
- ⚡ Upsampler Dynamic Upscale
- 🎯 Upsampler Precise Upscale
-
Connect an IMAGE input to the node
-
Configure the parameters:
- API Key: Your Upsampler API key
- ImgBB API Key (optional): Your ImgBB API key for reliable image hosting
- Input Image Type: Choose "realism", "anime", or "universal"
- Upscale Factor: How much to upscale (1.0-4.0 for Smart/Dynamic, 1.0-16.0 for Precise)
- Max Parallel Jobs: How many tiles to submit simultaneously (1-15). Leave at 1 for sequential processing.
- Additional parameters specific to each method
-
The node will:
- Upload your image to a public URL
- Submit the upscaling job to Upsampler API
- Poll for completion with progress updates
- Download and return the upscaled image
imgbb_api_key: ImgBB API key for reliable image hosting (optional)global_creativity(0-10): How much the AI can change the original imagedetail(0-10): Level of detail enhancementdescription: Text prompt to guide the upscaling processshould_enhance_faces: Better preserve and enhance facial featuresshould_preserve_blur: Preserve existing blur in the imagemax_parallel_jobs(1-15): Tiles submitted in parallel; higher values finish sooner but must stay within Upsampler rate and queue limits
imgbb_api_key: ImgBB API key for reliable image hosting (optional)global_creativity(0-10): How much the AI can change the original imageresemblance(0-10): How closely to adhere to original image structuredetail(0-10): Level of detail enhancementdescription: Text prompt to guide the upscaling processshould_enhance_faces: Better preserve and enhance facial featuresshould_preserve_hands: Better preserve hand structuresshould_preserve_blur: Preserve existing blur in the imagemax_parallel_jobs(1-15): Tiles submitted in parallel; honoursUPSAMPLER_MAX_CONCURRENCYand API queue limits
imgbb_api_key: ImgBB API key for reliable image hosting (optional)should_enhance_faces: Apply face restoration techniquesshould_preserve_blur: Preserve existing blur in the imagemax_parallel_jobs(1-15): Tiles submitted in parallel; honoursUPSAMPLER_MAX_CONCURRENCYand API queue limits
UPSAMPLER_MAX_CONCURRENCY: Optional environment override for the concurrency cap (default comes from each node'smax_parallel_jobs, clamped to 1-15).UPSAMPLER_MAX_RETRIES: Additional attempts after the initial Upsampler failure when the error is retryable (default: 2).UPSAMPLER_RETRY_DELAY: Seconds to wait before retrying a failed tile (default: 10).
These variables apply across every Upsampler node in a workflow and complement the per-node max_parallel_jobs control. Increase them gradually to stay within Upsampler's published rate and queue limits (90 POSTs/minute, 6000/hour; 240 status checks/minute).
Credits are consumed based on output image size:
- Smart/Dynamic Upscale: 1 credit per megapixel (minimum 1 credit)
- Precise Upscale: 1 credit per 4 megapixels (minimum 1 credit)
-
Image upload errors:
- Get an ImgBB API key for reliable hosting
- Check your internet connection
- Try again if free services are temporarily unavailable
-
"All free hosting services failed":
- Use ImgBB with an API key (recommended)
- Set the
IMGBB_API_KEYenvironment variable - Or add the key to the node parameter
-
API authentication errors:
- Check your Upsampler API key is correct and has credits
- Verify account status at https://upsampler.com/
-
Rate limit errors:
- The API currently allows up to 90 requests/minute (6000/hour) for upscale endpoints and 240 requests/minute for status checks
- High
max_parallel_jobsvalues can hit these limits quickly; wait before retrying or lower concurrency
-
Job failures:
- Check the error message for specific issues
- Common issues: invalid parameters or insufficient credits
- Verify image format and size constraints
For full API documentation, visit: https://upsampler.com/api
This custom node implementation is provided as-is. Please refer to Upsampler's terms of service for API usage.