Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
8aa0a51
1
Parent(s):
8425ad8
fix naming stuff
Browse files
ui/src/app/api/hf-jobs/route.ts
CHANGED
|
@@ -603,18 +603,20 @@ def generate_model_card_readme(repo_id: str, config: dict, model_name: str, cura
|
|
| 603 |
is_instruction = lower_arch in instruction_arches or 'kontext' in lower_model_name
|
| 604 |
|
| 605 |
datasets_config = config.get('config', {}).get('process', [{}])[0].get('datasets', [])
|
|
|
|
| 606 |
is_video = (
|
| 607 |
'video' in lower_arch
|
| 608 |
or process_config.get('type') == 'video'
|
| 609 |
or any(isinstance(dataset, dict) and dataset.get('do_i2v') for dataset in datasets_config)
|
| 610 |
-
or
|
| 611 |
-
or 'wan21' in lower_model_name
|
| 612 |
)
|
| 613 |
|
| 614 |
-
if
|
|
|
|
|
|
|
| 615 |
tags.append("image-to-image")
|
| 616 |
elif is_video:
|
| 617 |
-
if 'i2v' in model_name.lower() or 'i2v' in lower_arch or 'i2v' in lower_model_name:
|
| 618 |
tags.append("image-to-video")
|
| 619 |
else:
|
| 620 |
tags.append("text-to-video")
|
|
|
|
| 603 |
is_instruction = lower_arch in instruction_arches or 'kontext' in lower_model_name
|
| 604 |
|
| 605 |
datasets_config = config.get('config', {}).get('process', [{}])[0].get('datasets', [])
|
| 606 |
+
is_wan_video = lower_arch.startswith('wan2') or 'wan2' in lower_model_name
|
| 607 |
is_video = (
|
| 608 |
'video' in lower_arch
|
| 609 |
or process_config.get('type') == 'video'
|
| 610 |
or any(isinstance(dataset, dict) and dataset.get('do_i2v') for dataset in datasets_config)
|
| 611 |
+
or is_wan_video
|
|
|
|
| 612 |
)
|
| 613 |
|
| 614 |
+
if lower_arch.startswith('qwen_image_edit') or 'image-edit' in lower_model_name:
|
| 615 |
+
tags.append("image-to-image")
|
| 616 |
+
elif is_instruction:
|
| 617 |
tags.append("image-to-image")
|
| 618 |
elif is_video:
|
| 619 |
+
if is_wan_video and ('i2v' in model_name.lower() or 'i2v' in lower_arch or 'i2v' in lower_model_name):
|
| 620 |
tags.append("image-to-video")
|
| 621 |
else:
|
| 622 |
tags.append("text-to-video")
|