GenAI-Arena / model /imagenhub_utils.py
tianleliphoebe's picture
Reinitialize
e368cec
raw
history blame
330 Bytes
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)