INNER CODE UNIT · Python
upload_images
runpod-workers/worker-comfyui · handler.py:329
def upload_images(images):
"""
Upload a list of base64 encoded images to the ComfyUI server using the /upload/image endpoint.
Args:
images (list): A list of dictionaries, each containing the 'name' of the image and the 'image' as a base64 encoded string.
Returns:
dict: A dictionary indicating success or error.
"""
if not images:
return {"status": "success", "message": "No images to upload", "details": []}
responses = []
upload_errors = []
print(f"worker-comfyui - Uploading {len(images)} image(s)...")