fix: be forgiving of - vs _ in video decoder model name

Addresses https://github.com/brycedrennan/imaginAIry/issues/485
This commit is contained in:
Bryce 2024-04-17 19:04:18 -07:00 committed by Bryce Drennan
parent 3a9a3974ce
commit efbab3a141
2 changed files with 3 additions and 1 deletions

View File

@ -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."

View File

@ -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"