#Microsoft Florence-2 model in serverless container doesn't work

12 messages · Page 1 of 1 (latest)

rugged trout
#

I'm trying to use Florence 2 models in ComfyUI workflow with serverless container and it returns with error:
raise RuntimeError(f'{node_type}: {exception_message}')\nRuntimeError: DownloadAndLoadFlorence2Model: Using `low_cpu_mem_usage=True` or a `device_map` requires Accelerate: `pip install accelerate

Accelerate library already installed in venv in network storage where comfyui runs, also I installed it in docker container. Maybe anyone know how to solve this problem? Thanks in advance

modern crater
rugged trout
# modern crater Is accelerate listed in the requirements.txt file? If not you will need to add ...

I added accelerate to requirements.txt, rebuild image and create endpoint and got the same result:

{
"delayTime": 5722,
"error": "Traceback (most recent call last):\n File "/rp_handler.py", line 317, in handler\n raise RuntimeError(f'{node_type}: {exception_message}')\nRuntimeError: DownloadAndLoadFlorence2Model: Using low_cpu_mem_usage=True or a device_map requires Accelerate: pip install accelerate\n",
"executionTime": 34016,
"id": "df70ffee-8bf7-4304-9cdd-f6ef9349139c-u1",
"status": "FAILED",
"workerId": "7l3v5ol024c0kb"
}

modern crater
#

Does your handler have

import accelerate

in the Python source code?

rugged trout
modern crater
rugged trout
#

I added some code lines for debug inside a container

modern crater
chrome epoch
#

nope its cause venv path mismatch

rugged trout
round edge
#

responded to zendesk ticket