R
RunPod10mo ago
fanbing

Serverless prod cannot import name "ControlNetModel"

When I 'runpodctl project dev', it run well in dev. But when I 'runpodctl project deploy',run, it show : Traceback (most recent call last): File "/runpod-volume/a87e0d01/prod/instantid/src/handler.py", line 12, in <module> from diffusers.models import ControlNetModel ImportError: cannot import name 'ControlNetModel' from 'diffusers.models' (/runpod-volume/a87e0d01/prod/venv/lib/python3.10/site-packages/diffusers/models/init.py) . But in this dir, it does has controlnet.py .
No description
4 Replies
ashleyk
ashleyk10mo ago
Sounds like a problem with your venv. Your venv in development and within serverless needs to be exactly the same because the path is hard-coded into the venv itself.
fanbing
fanbingOP10mo ago
Thanks, understood now. Another issue is like this , which indicates that the ./checkpoints directory cannot be located in prod. The checkpoints directory, along with the substantial models it encompasses, should not be installed solely within the dev directory. Instead, it should be placed in a higher-level directory that is common to both environments.
ashleyk
ashleyk10mo ago
Sounds like something @Merrell may need to look into.
fanbing
fanbingOP10mo ago
I move cheakpoints to project volume, then it work well.
Want results from more Discord servers?
Add your server