open-mmlab / mmagic

OpenMMLab Multimodal Advanced, Generative, and Intelligent Creation Toolbox. Unlock the magic 🪄: Generative-AI (AIGC), easy-to-use APIs, awsome model zoo, diffusion models, for text-to-image generation, image/video restoration/enhancement, etc.
https://mmagic.readthedocs.io/en/latest/
Apache License 2.0
6.89k stars 1.06k forks source link

[Bug] Error when running PowerPaint: Entry Not Found for facenet.pth URL #2091

Open pjhpeter opened 9 months ago

pjhpeter commented 9 months ago

Prerequisite

Task

I have modified the scripts/configs, or I'm working on my own tasks/models/datasets.

Branch

main branch https://github.com/open-mmlab/mmagic

Environment

dockerfile:

FROM nvidia/cuda:11.8.0-base-ubuntu22.04
RUN apt-get update && \
    apt-get install -y \
        python3-pip \
        python3-setuptools \
        git

RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple && \
        pip config set install.trusted-host mirrors.aliyun.com

RUN --mount=type=cache,target=/root/.cache/pip pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

WORKDIR /app/

RUN git clone https://github.com/comfyanonymous/ComfyUI.git

WORKDIR /app/ComfyUI/custom_nodes

RUN git clone --depth 1 https://github.com/ssitu/ComfyUI_UltimateSDUpscale --recursive && \
    git clone --depth 1 https://github.com/evanspearman/ComfyMath.git && \
    git clone --depth 1 https://github.com/marhensa/sdxl-recommended-res-calc.git && \
    git clone --depth 1 https://github.com/Fannovel16/comfyui_controlnet_aux.git && \
    git clone --depth 1 https://github.com/ltdrdata/ComfyUI-Impact-Pack.git && \
    git clone --depth 1 https://github.com/shadowcz007/comfyui-mixlab-nodes.git && \
    git clone --depth 1 https://github.com/ltdrdata/ComfyUI-Manager.git

RUN --mount=type=cache,target=/root/.cache/pip pip3 install -r /app/ComfyUI/requirements.txt &&\
    pip3 install -r ComfyMath/requirements.txt && \
    pip3 install -r comfyui_controlnet_aux/requirements.txt && \
    pip3 install -r ComfyUI-Impact-Pack/requirements.txt && \
    pip3 install -r comfyui-mixlab-nodes/requirements.txt && \
    pip3 install -r ComfyUI-Manager/requirements.txt

WORKDIR /app/ComfyUI

Reproduces the problem - code sample

openpose = OpenposeDetector.from_pretrained('lllyasviel/ControlNet')

Reproduces the problem - command or script

openpose = OpenposeDetector.from_pretrained('lllyasviel/ControlNet')

Reproduces the problem - error message

Entry Not Found for url: https://huggingface.co/lllyasviel/Annotators/resolve/main/annotator/ckpts/facenet.pth.

Additional information

Hello,

I've encountered an issue when trying to run the PowerPaint project within the custom-nodes section of the comfyui repository. It seems there is a missing file that the project depends on. I'm providing details below and any assistance would be much appreciated.

Issue Description: Upon launching the PowerPaint app, I'm faced with an error regarding a missing entry for a required resource:

Entry Not Found for url: https://huggingface.co/lllyasviel/Annotators/resolve/main/annotator/ckpts/facenet.pth.
liuwenran commented 9 months ago

Hi, It seems like the address of facenet.pth is changed, which is https://huggingface.co/lllyasviel/Annotators/blob/main/facenet.pth. Please check your controlnet_aux version. We use controlnet-aux==0.0.3 in PowerPaint.

pjhpeter commented 9 months ago

Hello,

Thank you for your response. I've discovered the issue—it was a version conflict within the ComfyUi environment where controlnet_aux used https://github.com/Fannovel16/comfyui_controlnet_aux. I've made some adaptations to the original code of comfyui_controlnet_aux, and now the problem has been resolved.

Best regards,