From efbab3a1415f4ce154caec2d217b8fec55ec0639 Mon Sep 17 00:00:00 2001 From: Bryce Date: Wed, 17 Apr 2024 19:04:18 -0700 Subject: [PATCH] fix: be forgiving of - vs _ in video decoder model name Addresses https://github.com/brycedrennan/imaginAIry/issues/485 --- imaginairy/api/video_sample.py | 2 ++ imaginairy/cli/videogen.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/imaginairy/api/video_sample.py b/imaginairy/api/video_sample.py index 0d3e17a..972fdf5 100644 --- a/imaginairy/api/video_sample.py +++ b/imaginairy/api/video_sample.py @@ -94,6 +94,8 @@ def generate_video( output_fps = default(output_fps, fps_id) + model_name = model_name.lower().replace("_", "-") + video_model_config = config.MODEL_WEIGHT_CONFIG_LOOKUP.get(model_name, None) if video_model_config is None: msg = f"Version {model_name} does not exist." diff --git a/imaginairy/cli/videogen.py b/imaginairy/cli/videogen.py index 9f3a45a..c6cb52b 100644 --- a/imaginairy/cli/videogen.py +++ b/imaginairy/cli/videogen.py @@ -20,7 +20,7 @@ logger = logging.getLogger(__name__) @click.option( "--model", default="svd", - help="Model to use. One of: svd, svd_xt, svd_image_decoder, svd_xt_image_decoder", + help="Model to use. One of: svd, svd-xt, svd-image-decoder, svd-xt-image-decoder", ) @click.option( "--fps", default=6, type=int, help="FPS for the AI to target when generating video"