vinesmsuic commited on
Commit
aab9d8e
1 Parent(s): ab46857

mapping on imagenhub and videogenhub implementation

Browse files
arena_elo/update_elo_rating.sh CHANGED
File without changes
model/models/__init__.py CHANGED
@@ -29,9 +29,10 @@ VIDEO_GENERATION_MODELS = ['fal_AnimateDiff_text2video',
29
  'fal_StableVideoDiffusion_text2video',
30
  'fal_CogVideoX-5B_text2video']
31
 
 
32
  MAP_NAMES_VIDEOGENHUB = {"CogVideoX-2B": "CogVideoX"}
33
 
34
- MUSEUM_UNSUPPORTED_MODELS = ['videogenhub_OpenSoraPlan_generation']
35
  DESIRED_APPEAR_MODEL = ['videogenhub_T2VTurbo_generation','fal_StableVideoDiffusion_text2video']
36
 
37
  ALL_MODELS = IMAGE_GENERATION_MODELS + IMAGE_EDITION_MODELS + VIDEO_GENERATION_MODELS
@@ -53,14 +54,18 @@ def load_pipeline(model_name):
53
  # TODO ^Support model_name that contains _ in the name
54
  print("model_source, model_name, model_type =", model_source, model_name, model_type)
55
  if model_source == "imagenhub":
 
 
 
56
  pipe = load_imagenhub_model(model_name, model_type)
57
  elif model_source == "playground":
58
  pipe = load_playground_model(model_name)
59
  elif model_source == "fal":
60
  pipe = load_fal_model(model_name, model_type)
61
  elif model_source == "videogenhub":
62
- if model_name in MAP_NAMES_VIDEOGENHUB.keys():
63
- model_name = MAP_NAMES_VIDEOGENHUB[model_name]
 
64
  pipe = load_videogenhub_model(model_name)
65
  else:
66
  raise ValueError(f"Model source {model_source} not supported")
 
29
  'fal_StableVideoDiffusion_text2video',
30
  'fal_CogVideoX-5B_text2video']
31
 
32
+ MAP_NAMES_IMAGENHUB = {}
33
  MAP_NAMES_VIDEOGENHUB = {"CogVideoX-2B": "CogVideoX"}
34
 
35
+ MUSEUM_UNSUPPORTED_MODELS = ['fal_CogVideoX-5B_text2video']
36
  DESIRED_APPEAR_MODEL = ['videogenhub_T2VTurbo_generation','fal_StableVideoDiffusion_text2video']
37
 
38
  ALL_MODELS = IMAGE_GENERATION_MODELS + IMAGE_EDITION_MODELS + VIDEO_GENERATION_MODELS
 
54
  # TODO ^Support model_name that contains _ in the name
55
  print("model_source, model_name, model_type =", model_source, model_name, model_type)
56
  if model_source == "imagenhub":
57
+ # This approach uses get() to try to fetch the value associated with model_name. If model_name isn't found in the dictionary,
58
+ # it defaults to the current value of model_name,
59
+ model_name = MAP_NAMES_IMAGENHUB.get(model_name, model_name)
60
  pipe = load_imagenhub_model(model_name, model_type)
61
  elif model_source == "playground":
62
  pipe = load_playground_model(model_name)
63
  elif model_source == "fal":
64
  pipe = load_fal_model(model_name, model_type)
65
  elif model_source == "videogenhub":
66
+ # This approach uses get() to try to fetch the value associated with model_name. If model_name isn't found in the dictionary,
67
+ # it defaults to the current value of model_name,
68
+ model_name = MAP_NAMES_VIDEOGENHUB.get(model_name, model_name)
69
  pipe = load_videogenhub_model(model_name)
70
  else:
71
  raise ValueError(f"Model source {model_source} not supported")