Skip to content

InfinityOutPainting example from README throws error #359

@Blubbaa

Description

@Blubbaa

The example for how to use the template classes, e.g. InfinityOutPainting from the README does not work and throws an error:

Thanks to @ShengmingYin and @thebestannie for providing a template example in InfinityOutPainting class (see the following gif)

Firstly, run python visual_chatgpt.py --load "ImageCaptioning_cuda:0,ImageEditing_cuda:1,VisualQuestionAnswering_cuda:2"

1260 │   │   # Load Basic Foundation Models                                                    │1261 │   │   for class_name, device in load_dict.items():                                      │
│   1262 │   │   │   print(class_name)                                                             │
│ ❱ 1263 │   │   │   self.models[class_name] = globals()[class_name](device=device)                │
│   1264 │   │                                                                                     │
│   1265 │   │   # Load Template Foundation Models                                                 │1266 │   │   for class_name, module in globals().items():                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: __init__() got an unexpected keyword argument 'device'

To me it seems there is a missing (potentially undocumented) piece on how to use these template classes, since they do not have a constructor with the device for initalization and thus fail to be used with the --load commandline parameter. Could you provide more information on how one should use this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions