georg
georg
RRunPod
Created by georg on 4/2/2024 in #⛅|pods
Clone a Runpod Networkvolume
Hi! Is there some way to clone a Network Volume in the Runpod interface or is this something i have to do via some scp magic? Thanks in advance!
2 replies
RRunPod
Created by georg on 12/31/2023 in #⚡|serverless
Import PIL (pillow image library) in rp_handler.py
Hey everyone, i try to use a tool from the PIL module to process my generated image before sending back in the handler. Unfortunately i get a
Module no found Error
Module no found Error
although the library is installed in my network volume and is written in my requirements.txt of the handler. when i connect to my handler via web terminal and start in the command line python, i also cannot import PIL. So is it necessary to link some python libraries manually from my network volume to my handler or what is the best practice here?
5 replies
RRunPod
Created by georg on 12/29/2023 in #⚡|serverless
Image is generated successfully, but cant not found for sending back
Hey everyone, i call my ComfyUI backend and recieve the message in the logs:
{"requestId": null, "message": "Images generated successfully for prompt: 5cf0fe28-0abd-4eb1-8d6d-f2bad258baa5", "level": "INFO"}
{"requestId": null, "message": "Images generated successfully for prompt: 5cf0fe28-0abd-4eb1-8d6d-f2bad258baa5", "level": "INFO"}
But as a overall response i get:
{"error_type": "<class 'FileNotFoundError'>", "error_message": "[Errno 2] No such file or directory: '/runpod-volume/ComfyUI/output/ComfyUI_temp_ugpqc_00001_.png'", "error_traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.10/dist-packages/runpod/serverless/modules/rp_job.py\", line 134, in run_job\n handler_return = handler(job)\n File \"/rp_handler.py\", line 219, in handler\n with open(image_path, 'rb') as image_file:\nFileNotFoundError: [Errno 2] No such file or directory: '/runpod-volume/ComfyUI/output/ComfyUI_temp_ugpqc_00001_.png'\n", "hostname": "4om962zlz99dn7-64410fdb", "worker_id": "4om962zlz99dn7", "runpod_version": "1.4.2"}
{"error_type": "<class 'FileNotFoundError'>", "error_message": "[Errno 2] No such file or directory: '/runpod-volume/ComfyUI/output/ComfyUI_temp_ugpqc_00001_.png'", "error_traceback": "Traceback (most recent call last):\n File \"/usr/local/lib/python3.10/dist-packages/runpod/serverless/modules/rp_job.py\", line 134, in run_job\n handler_return = handler(job)\n File \"/rp_handler.py\", line 219, in handler\n with open(image_path, 'rb') as image_file:\nFileNotFoundError: [Errno 2] No such file or directory: '/runpod-volume/ComfyUI/output/ComfyUI_temp_ugpqc_00001_.png'\n", "hostname": "4om962zlz99dn7-64410fdb", "worker_id": "4om962zlz99dn7", "runpod_version": "1.4.2"}
whats happend here? Is this a fault in my workflow? The workflow is working locally fine.
14 replies
RRunPod
Created by georg on 12/28/2023 in #⚡|serverless
Custom Handler Error Logging
I try to add errorlogging to my custom rp_handler.py and use the runpod library for that
from runpod.serverless.modules.rp_logger import RunPodLogger
logger = RunPodLogger

# then use
logger.info(test)
from runpod.serverless.modules.rp_logger import RunPodLogger
logger = RunPodLogger

# then use
logger.info(test)
as far as i understand i get these messages in the Logs from my Runpod Worker (Logs -> Container Logs) This is true for some of the logger.info messages, they are working in the main function. But if i try to use this inside my
handler(event)
handler(event)
function, there are not shown. Also when i try to use
print()
print()
statements, its not getting recognized. How to log correctly in custom handlers?
19 replies
RRunPod
Created by georg on 12/28/2023 in #⚡|serverless
Runpod Custom API request and rp_handler.py
I try to deploy a runpod worker with a network volume for ComfyUI. The handler should be able to process a minimal request and enhance it to a full-on comfyUI API request. Example Request:
prompt_text = {"img" : "someBase64", "positive_prompt" : "pos", "negative_prompt" : "neg", "flow_id" : 1 }
prompt_text = {"img" : "someBase64", "positive_prompt" : "pos", "negative_prompt" : "neg", "flow_id" : 1 }
this should be posted to the serverless endpoint. after this it should be going to the handler function as event and is processed there further. Unfortunately it get caught as Error by the get_job() function from the rp_job.py module of the runpod python library and throws a Error:
{"requestId": null, "message": "Job has missing field(s): input.", "level": "ERROR"}
{"requestId": null, "message": "Job has missing field(s): input.", "level": "ERROR"}
. Is there a way to implement my idea in this way or should i try a other way or skip the error handling in the get_job() function?
7 replies