Spaces:
Running
on
Zero
Running
on
Zero
DongfuJiang
commited on
Commit
•
513e628
1
Parent(s):
835bec4
update
Browse files
model/models/__init__.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
from .imagenhub_models import load_imagenhub_model
|
2 |
from .playground_api import load_playground_model
|
|
|
3 |
|
4 |
IMAGE_GENERATION_MODELS = ['imagenhub_LCM_generation','imagenhub_SDXLTurbo_generation','imagenhub_SDXL_generation', 'imagenhub_PixArtAlpha_generation',
|
5 |
'imagenhub_OpenJourney_generation','imagenhub_SDXLLightning_generation', 'imagenhub_StableCascade_generation',
|
@@ -22,6 +23,8 @@ def load_pipeline(model_name):
|
|
22 |
pipe = load_imagenhub_model(model_name, model_type)
|
23 |
elif model_source == "playground":
|
24 |
pipe = load_playground_model(model_name)
|
|
|
|
|
25 |
else:
|
26 |
raise ValueError(f"Model source {model_source} not supported")
|
27 |
return pipe
|
|
|
1 |
from .imagenhub_models import load_imagenhub_model
|
2 |
from .playground_api import load_playground_model
|
3 |
+
from .fal_api_models import load_fal_model
|
4 |
|
5 |
IMAGE_GENERATION_MODELS = ['imagenhub_LCM_generation','imagenhub_SDXLTurbo_generation','imagenhub_SDXL_generation', 'imagenhub_PixArtAlpha_generation',
|
6 |
'imagenhub_OpenJourney_generation','imagenhub_SDXLLightning_generation', 'imagenhub_StableCascade_generation',
|
|
|
23 |
pipe = load_imagenhub_model(model_name, model_type)
|
24 |
elif model_source == "playground":
|
25 |
pipe = load_playground_model(model_name)
|
26 |
+
elif model_source == "fal":
|
27 |
+
raise NotImplementedError("FAL models are not supported yet")
|
28 |
else:
|
29 |
raise ValueError(f"Model source {model_source} not supported")
|
30 |
return pipe
|
model/models/fal_api_models.py
CHANGED
@@ -42,6 +42,8 @@ class FalModel():
|
|
42 |
|
43 |
result = handler.get()
|
44 |
return result
|
|
|
|
|
45 |
else:
|
46 |
raise ValueError("model_type must be text2image or image2image")
|
47 |
|
|
|
42 |
|
43 |
result = handler.get()
|
44 |
return result
|
45 |
+
elif self.model_type == "text2video":
|
46 |
+
raise NotImplementedError("text2video model is not implemented yet")
|
47 |
else:
|
48 |
raise ValueError("model_type must be text2image or image2image")
|
49 |
|