Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,6 +23,7 @@ MODELS = {
|
|
| 23 |
"clip_prefix": "mmproj-SmolVLM2-256M-Video-Instruct",
|
| 24 |
"model_variants": ["f16", "Q8_0", "Q2_K", "Q4_K_M"],
|
| 25 |
"clip_variants": ["Q8_0", "f16"],
|
|
|
|
| 26 |
},
|
| 27 |
"450M": {
|
| 28 |
"model_repo": "LiquidAI/LFM2-VL-450M-GGUF",
|
|
@@ -31,6 +32,7 @@ MODELS = {
|
|
| 31 |
"clip_prefix": "mmproj-LFM2-VL-450M",
|
| 32 |
"model_variants": ["F16", "Q4_0", "Q8_0"],
|
| 33 |
"clip_variants": ["F16", "Q8_0"],
|
|
|
|
| 34 |
},
|
| 35 |
"500M": {
|
| 36 |
"model_repo": "mradermacher/SmolVLM2-500M-Video-Instruct-GGUF",
|
|
@@ -39,19 +41,21 @@ MODELS = {
|
|
| 39 |
"clip_prefix": "mmproj-SmolVLM2-500M-Video-Instruct",
|
| 40 |
"model_variants": ["f16", "Q4_K_M", "Q8_0", "Q2_K"],
|
| 41 |
"clip_variants": ["Q8_0", "f16"],
|
|
|
|
| 42 |
},
|
| 43 |
"1B": {
|
| 44 |
"model_repo": "bartowski/OpenGVLab_InternVL3_5-1B-GGUF",
|
| 45 |
-
"clip_repo": "bartowski/OpenGVLab_InternVL3_5-1B-GGUF",
|
| 46 |
-
"model_prefix": "
|
| 47 |
-
"clip_prefix": "mmproj-OpenGVLab_InternVL3_5-1B",
|
| 48 |
"model_variants": [
|
| 49 |
"bf16", "Q8_0", "Q6_K_L", "Q5_K_L", "Q6_K", "Q4_K_L",
|
| 50 |
"Q3_K_XL", "Q5_K_M", "Q5_K_S", "Q4_1", "Q2_K_L", "Q4_K_M",
|
| 51 |
"Q4_K_S", "Q4_0", "IQ4_NL", "IQ4_XS", "Q3_K_L", "Q3_K_M",
|
| 52 |
"IQ3_M", "Q3_K_S", "IQ3_XS", "IQ3_XXS", "Q2_K", "IQ2_M"
|
| 53 |
],
|
| 54 |
-
"clip_variants": ["bf16", "f16"],
|
|
|
|
| 55 |
},
|
| 56 |
"2.2B": {
|
| 57 |
"model_repo": "mradermacher/SmolVLM2-2.2B-Instruct-GGUF",
|
|
@@ -60,6 +64,7 @@ MODELS = {
|
|
| 60 |
"clip_prefix": "mmproj-SmolVLM2-2.2B-Instruct",
|
| 61 |
"model_variants": ["f16", "Q4_K_M", "Q8_0", "Q2_K"],
|
| 62 |
"clip_variants": ["Q8_0", "f16"],
|
|
|
|
| 63 |
},
|
| 64 |
}
|
| 65 |
|
|
@@ -125,8 +130,11 @@ def update_llm(size, model_file, clip_file, verbose_mode, n_threads):
|
|
| 125 |
# Build weight filename lists
|
| 126 |
def get_weight_files(size):
|
| 127 |
cfg = MODELS[size]
|
| 128 |
-
|
| 129 |
-
|
|
|
|
|
|
|
|
|
|
| 130 |
return model_files, clip_files
|
| 131 |
|
| 132 |
# Caption using cached llm with real-time debug logs
|
|
|
|
| 23 |
"clip_prefix": "mmproj-SmolVLM2-256M-Video-Instruct",
|
| 24 |
"model_variants": ["f16", "Q8_0", "Q2_K", "Q4_K_M"],
|
| 25 |
"clip_variants": ["Q8_0", "f16"],
|
| 26 |
+
"model_separator": ".", # Dot for SmolVLM model files
|
| 27 |
},
|
| 28 |
"450M": {
|
| 29 |
"model_repo": "LiquidAI/LFM2-VL-450M-GGUF",
|
|
|
|
| 32 |
"clip_prefix": "mmproj-LFM2-VL-450M",
|
| 33 |
"model_variants": ["F16", "Q4_0", "Q8_0"],
|
| 34 |
"clip_variants": ["F16", "Q8_0"],
|
| 35 |
+
"model_separator": "-", # Dash for LiquidAI model files
|
| 36 |
},
|
| 37 |
"500M": {
|
| 38 |
"model_repo": "mradermacher/SmolVLM2-500M-Video-Instruct-GGUF",
|
|
|
|
| 41 |
"clip_prefix": "mmproj-SmolVLM2-500M-Video-Instruct",
|
| 42 |
"model_variants": ["f16", "Q4_K_M", "Q8_0", "Q2_K"],
|
| 43 |
"clip_variants": ["Q8_0", "f16"],
|
| 44 |
+
"model_separator": ".", # Dot for SmolVLM model files
|
| 45 |
},
|
| 46 |
"1B": {
|
| 47 |
"model_repo": "bartowski/OpenGVLab_InternVL3_5-1B-GGUF",
|
| 48 |
+
"clip_repo": "bartowski/OpenGVLab_InternVL3_5-1B-GGUF",
|
| 49 |
+
"model_prefix": "OpenGVLab_InternVL3_5-1B", # Corrected prefix
|
| 50 |
+
"clip_prefix": "mmproj-OpenGVLab_InternVL3_5-1B",
|
| 51 |
"model_variants": [
|
| 52 |
"bf16", "Q8_0", "Q6_K_L", "Q5_K_L", "Q6_K", "Q4_K_L",
|
| 53 |
"Q3_K_XL", "Q5_K_M", "Q5_K_S", "Q4_1", "Q2_K_L", "Q4_K_M",
|
| 54 |
"Q4_K_S", "Q4_0", "IQ4_NL", "IQ4_XS", "Q3_K_L", "Q3_K_M",
|
| 55 |
"IQ3_M", "Q3_K_S", "IQ3_XS", "IQ3_XXS", "Q2_K", "IQ2_M"
|
| 56 |
],
|
| 57 |
+
"clip_variants": ["bf16", "f16"],
|
| 58 |
+
"model_separator": "-", # Dash for InternVL3 model files
|
| 59 |
},
|
| 60 |
"2.2B": {
|
| 61 |
"model_repo": "mradermacher/SmolVLM2-2.2B-Instruct-GGUF",
|
|
|
|
| 64 |
"clip_prefix": "mmproj-SmolVLM2-2.2B-Instruct",
|
| 65 |
"model_variants": ["f16", "Q4_K_M", "Q8_0", "Q2_K"],
|
| 66 |
"clip_variants": ["Q8_0", "f16"],
|
| 67 |
+
"model_separator": ".", # Dot for SmolVLM model files
|
| 68 |
},
|
| 69 |
}
|
| 70 |
|
|
|
|
| 130 |
# Build weight filename lists
|
| 131 |
def get_weight_files(size):
|
| 132 |
cfg = MODELS[size]
|
| 133 |
+
# Use model_separator for model files (default to '.' if not specified)
|
| 134 |
+
model_sep = cfg.get("model_separator", ".")
|
| 135 |
+
model_files = [f"{cfg['model_prefix']}{model_sep}{v}.gguf" for v in cfg['model_variants']]
|
| 136 |
+
# CLIP files always use dash separator
|
| 137 |
+
clip_files = [f"{cfg['clip_prefix']}-{v}.gguf" for v in cfg['clip_variants']]
|
| 138 |
return model_files, clip_files
|
| 139 |
|
| 140 |
# Caption using cached llm with real-time debug logs
|