-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Description
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
Labels
No labels