File size: 330 Bytes
e368cec
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import imagen_hub

class ImagenHubModel():
    def __init__(self, model_name):
        self.model = imagen_hub.load(model_name)
    
    def __call__(self, *args, **kwargs):
        return self.model.infer_one_image(*args, **kwargs)
    
def load_imagenhub_model(model_name, model_type=None):
    return ImagenHubModel(model_name)