blib-la / runpod-worker-comfy

ComfyUI as a serverless API on RunPod
GNU Affero General Public License v3.0
301 stars 205 forks source link

Type Error When ENV vars are set via Runpod Template #64

Open jelling opened 2 months ago

jelling commented 2 months ago

https://github.com/blib-la/runpod-worker-comfy/blob/0db21afc7f6b4d394967412db4063552782de951/src/rp_handler.py#L333

When defining a template on Runpod, there is an option to manually set environment variables. These variables seem to be interpolated as strings at run-time. That causes this division statement to fail as it can't divide a string.

Apologies for not PR'ing the fix for here and other places, but I've got a fork and then a subtree from that and I don't have my tooling setup well yet.

mikedegeofroy commented 1 month ago

I've just faced the same issue, when setting COMFY_POLLING_MAX_RETRIES

https://github.com/blib-la/runpod-worker-comfy/blob/0db21afc7f6b4d394967412db4063552782de951/src/rp_handler.py#L324-L326

Error waiting for image generation: '<' not supported between instances of 'int' and 'str'