Skip to content

Running the example fails with various errors when using OpenAI CLIP #6

@nhatkhtn

Description

@nhatkhtn

Though OpenAI CLIP models are claimed to be supported, the example code fails to run.

Running the following command fails with various errors:

python decompose_image.py -path 000000308175.jpg -out_path image308175_decomp.txt -l1_penalty 0.25 --verbose -model clip:ViT-B/32

There are 2 reasons:

  • First, the model handlers contain the slash character, which causes a Parent directory does not exist on line 129 in splice.py.
  • Next, the OpenAI CLIP models have float16 outputs instead of float32, so the code fails with RuntimeError: expected mat1 and mat2 to have the same dtype, but got: float != c10::Half.

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