Closed apolinario closed 2 years ago
here's a crazy idea: maybe we add a separate mechanism for wrapping the loader to mock the clip module (rather than the class). so like:
ldr = REGISTRY.find(id='my-model")
clip = MockClipModule(ldr)
tokenizer = clip.tokenize
model, preprocess_image = clip.load('my-model')
This was useful to do for integrating MMC with Princess Generator. I know this makes the Mock API go beyond its scope, but:
That said not sure if the way I did it here is the best to go about it - almost sure it's not