Overview
This node executes workflows for the HjhComfyUIScale service, which appears to be a system for processing image upscaling or related image transformations via a remote API. It sends a JSON workflow definition to the service, optionally using configured Hjh services, and can wait for the workflow execution to complete before returning results.
Common scenarios include:
- Automating image upscaling or enhancement tasks in an n8n workflow.
- Integrating custom HjhComfyUIScale workflows defined in JSON format.
- Using multiple Hjh service endpoints with failover.
- Retrieving processed images (upscaled, print-quality, thumbnails) after workflow completion.
Practical example:
- A user provides a JSON workflow describing how to upscale an image.
- The node sends this workflow to the HjhComfyUIScale API.
- If "Wait For Result" is enabled, it polls the API until the workflow finishes.
- The node outputs URLs or paths to the resulting images for further use in the workflow.
Properties
| Name | Meaning |
|---|---|
| Use Hjh Services | Whether to use specified Hjh services in the workflow (boolean). |
| Hjh Services | JSON string listing one or more Hjh service URLs, comma-separated. |
| Hjh Workflow JSON | JSON string defining the HjhComfyUIScale workflow to execute (required). |
| Wait For Result | Whether to wait for the workflow to complete before returning results (boolean). |
| Timeout | Maximum time in seconds to wait for workflow completion before timing out (number). |
Output
The node outputs a JSON array with one object containing:
code: HTTP-like status code (e.g., 200 for success).message: Status message ("ok" on success).description: Additional description of the result.files: Array of file paths to images returned by the workflow.images: Object with keys:upscale: Path to the upscaled image.print: Path to the print-quality image.thumb: Path to the thumbnail image.
promptResult: Full raw response from the workflow execution status.promptId: Identifier of the submitted prompt/workflow.
If "Wait For Result" is false, the output contains minimal info with empty files and promptResult but includes the promptId.
If an error occurs, the output contains an error code (e.g., 500), message, and description with error details.
The node does not output binary data directly; instead, it returns file paths/URLs to images.
Dependencies
- Requires access to one or more HjhComfyUIScale API endpoints.
- Optionally uses an API key credential for authentication (passed as Bearer token).
- The node expects the API to expose
/system_stats,/prompt, and/history/{prompt_id}endpoints. - Network connectivity and proper API URL configuration are necessary.
- No other external dependencies beyond standard n8n helpers and request capabilities.
Troubleshooting
- No available service: The node tries each provided service URL and fails if none respond within 1 second. Ensure the URLs are correct and services are reachable.
- Failed to get prompt ID: The POST to
/promptdid not return a prompt ID. Check that the workflow JSON is valid and the API is functioning. - Execution timeout: If waiting for results, the node polls until the timeout expires. Increase the timeout or check the API's processing speed.
- Workflow execution failed: The API returned an error status. Inspect the workflow JSON and API logs.
- No outputs found: The workflow completed but returned no images. Verify the workflow produces outputs.
- Authentication issues: If using API key, ensure it is valid and has required permissions.
- JSON parsing errors: The "Hjh Services" and "Hjh Workflow JSON" fields must contain valid JSON strings.
Links and References
- No direct links provided in the source code.
- Refer to your HjhComfyUIScale API documentation for endpoint details and workflow JSON schema.
- n8n documentation on creating custom nodes and using credentials: https://docs.n8n.io/
- General REST API usage and troubleshooting tips.