ComfyUI > Nodes > ComfyUI_RH_APICall > RH Image Uploader

ComfyUI Node: RH Image Uploader

Class Name

RH_ImageUploaderNode

Category
RunningHub
Author
shahkoorosh (Account age: 86days)
Extension
ComfyUI_RH_APICall
Latest Updated
2025-02-07
Github Stars
0.03K

How to Install ComfyUI_RH_APICall

Install this extension via the ComfyUI Manager by searching for ComfyUI_RH_APICall
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_RH_APICall in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

RH Image Uploader Description

Facilitates seamless image uploading to server, abstracting technical details for AI artists and developers.

RH Image Uploader:

The RH_ImageUploaderNode is a powerful tool designed to facilitate the seamless uploading of images to a server, returning the filename as provided by the server. This node is particularly beneficial for AI artists and developers who need to integrate image uploading capabilities into their workflows without delving into the complexities of server communication. By abstracting the technical details of HTTP requests and server interactions, the node allows you to focus on creative tasks, ensuring that your images are efficiently uploaded and managed. The node's primary function is to process an input image, convert it into a suitable format, and handle the communication with the server using the provided API configuration. This ensures that the image is correctly uploaded, and the server's response is parsed to extract the filename, which can then be used for further processing or reference.

RH Image Uploader Input Parameters:

apiConfig

The apiConfig parameter is a structured input that contains essential configuration details required for the API call. It must include an apiKey and a base_url, which are crucial for authenticating the request and specifying the server endpoint, respectively. The apiKey acts as a security measure to ensure that only authorized requests are processed, while the base_url determines the server's address where the image will be uploaded. This parameter does not have default values, as it is mandatory to provide valid API credentials and server information for the node to function correctly. Proper configuration of this parameter is vital for successful image uploads and accurate server responses.

image

The image parameter is the input image tensor that you wish to upload to the server. This tensor can have various shapes, such as [C, H, W], [H, W, C], or even a batch dimension like [B, C, H, W]. The node processes this tensor to ensure it is in the correct format for uploading, typically converting it to a NumPy array and adjusting its shape to [H, W, C] if necessary. This parameter is crucial as it directly affects the content being uploaded, and any issues with the image format or data type can lead to errors during processing. There are no default values for this parameter, as it is required to provide a valid image tensor for the node to operate.

RH Image Uploader Output Parameters:

filename

The filename output parameter is a string that represents the name of the file as returned by the server after a successful upload. This filename is essential for tracking and referencing the uploaded image in subsequent operations or workflows. It provides a way to verify that the image has been correctly uploaded and can be used to access or manipulate the image on the server. The accuracy and reliability of this output are crucial for maintaining a smooth workflow, as it ensures that the uploaded image can be easily identified and retrieved when needed.

RH Image Uploader Usage Tips:

  • Ensure that the apiConfig parameter is correctly set up with a valid apiKey and base_url to avoid authentication errors and ensure successful communication with the server.
  • Before uploading, verify that the input image tensor is in the correct format and shape to prevent processing errors. The node will handle common formats, but ensuring compatibility can save time and reduce errors.
  • Use the returned filename to keep track of uploaded images, especially if you plan to perform further operations on them or need to reference them later.

RH Image Uploader Common Errors and Solutions:

Failed to connect to the server: <error_message>

  • Explanation: This error occurs when the node is unable to establish a connection with the server, possibly due to incorrect base_url or network issues.
  • Solution: Verify that the base_url in the apiConfig is correct and that your network connection is stable. Ensure that the server is reachable and not experiencing downtime.

Upload failed with status code <status_code>

  • Explanation: The server returned a non-200 status code, indicating that the upload request was not successful.
  • Solution: Check the server's response for more details on the failure. Ensure that the apiKey is valid and that the server is configured to accept image uploads.

Failed to parse JSON response from the server

  • Explanation: The server's response could not be parsed as JSON, possibly due to an unexpected response format.
  • Solution: Inspect the server's response to ensure it is in JSON format. If the issue persists, contact the server administrator for assistance.

Upload succeeded but 'fileName' not found in the response

  • Explanation: The upload was successful, but the expected fileName field was not present in the server's response.
  • Solution: Verify the server's response format and ensure that it includes the fileName field. If necessary, update the server-side code to include this information.

RH Image Uploader Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_RH_APICall
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.