Skip to content

Title: CLIP model parameters missing when running via Gradio (works with command-line) #49

@Z1LLIAX

Description

@Z1LLIAX

I'm trying to reproduce your UniPose project, but encountered an issue when using the Gradio interface. Here's the details:
Problem Description:
When running via command line (inference_on_a_image.py), the model works correctly and generates results as expected.
However, when running via Gradio (app.py), the interface loads successfully, but after uploading an image and clicking "Run", no results are generated (it stays stuck indefinitely).
Error Log:
The terminal shows an _IncompatibleKeys error indicating missing CLIP model parameters when loading the checkpoint:

_IncompatibleKeys(missing_keys=['clip_model.positional_embedding', 'clip_model.text_projection', 'clip_model.logit_scale', ... (many CLIP transformer parameters) ...], unexpected_keys=[])

I confirmed that the CLIP model structure is correctly built (terminal shows "CLIP 模型是否存在: True"), but the required parameters are missing from the checkpoint file.
Steps to Reproduce:
Clone the repository and install dependencies
Download the checkpoint file unipose_swint.pth and place it in ./weights/
Run python app.py and access the Gradio interface at http://127.0.0.1:7860
Upload an image, set instance prompt to "hand", and click "Run"
No output is generated, and the above error appears in the terminal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions