Add model management and cache control features

parent 48215e18
...@@ -233,6 +233,11 @@ Add to Claude Desktop config (`~/Library/Application Support/Claude/claude_deskt ...@@ -233,6 +233,11 @@ Add to Claude Desktop config (`~/Library/Application Support/Claude/claude_deskt
| `videogen_update_models` | Update model database | | `videogen_update_models` | Update model database |
| `videogen_search_models` | Search HuggingFace | | `videogen_search_models` | Search HuggingFace |
| `videogen_add_model` | Add model to database | | `videogen_add_model` | Add model to database |
| `videogen_disable_model` | Disable model from auto selection |
| `videogen_enable_model` | Enable model for auto selection |
| `videogen_list_cached_models` | List cached models with sizes |
| `videogen_remove_cached_model` | Remove specific cached model |
| `videogen_clear_cache` | Clear entire local cache |
| `videogen_list_tts_voices` | List TTS voices | | `videogen_list_tts_voices` | List TTS voices |
### Skill Documentation ### Skill Documentation
...@@ -312,6 +317,25 @@ python3 videogen --add-model stabilityai/stable-video-diffusion-img2vid-xt-1.1 - ...@@ -312,6 +317,25 @@ python3 videogen --add-model stabilityai/stable-video-diffusion-img2vid-xt-1.1 -
# Show model details # Show model details
python3 videogen --show-model 1 python3 videogen --show-model 1
# Disable a model from auto selection
python3 videogen --disable-model <ID_or_name>
# Enable a model for auto selection
python3 videogen --enable-model <ID_or_name>
```
## Cache Management
```bash
# List cached models with sizes and last accessed times
python3 videogen --list-cached-models
# Remove specific cached model
python3 videogen --remove-cached-model <model_id>
# Clear entire cache
python3 videogen --clear-cache
``` ```
--- ---
......
...@@ -74,10 +74,15 @@ python3 videogen --show-model <model_id_or_name> ...@@ -74,10 +74,15 @@ python3 videogen --show-model <model_id_or_name>
| V2I | `--video input.mp4 --extract-keyframes` | Extract frames from video | | V2I | `--video input.mp4 --extract-keyframes` | Extract frames from video |
| 3D | `--video input.mp4 --convert-3d-sbs` | Convert 2D to 3D | | 3D | `--video input.mp4 --convert-3d-sbs` | Convert 2D to 3D |
### Model Filters ### Model Management
#### List and Manage Models
```bash ```bash
# List models by type # List all available models (with auto mode status)
python3 videogen --model-list
# Filter models
python3 videogen --model-list --t2v-only # Text-to-Video models python3 videogen --model-list --t2v-only # Text-to-Video models
python3 videogen --model-list --i2v-only # Image-to-Video models python3 videogen --model-list --i2v-only # Image-to-Video models
python3 videogen --model-list --t2i-only # Text-to-Image models python3 videogen --model-list --t2i-only # Text-to-Image models
...@@ -86,14 +91,29 @@ python3 videogen --model-list --v2i-only # Video-to-Image models ...@@ -86,14 +91,29 @@ python3 videogen --model-list --v2i-only # Video-to-Image models
python3 videogen --model-list --3d-only # 2D-to-3D models python3 videogen --model-list --3d-only # 2D-to-3D models
python3 videogen --model-list --tts-only # TTS models python3 videogen --model-list --tts-only # TTS models
python3 videogen --model-list --audio-only # Audio models python3 videogen --model-list --audio-only # Audio models
# List by VRAM requirement
python3 videogen --model-list --low-vram # ≤16GB VRAM python3 videogen --model-list --low-vram # ≤16GB VRAM
python3 videogen --model-list --high-vram # >30GB VRAM python3 videogen --model-list --high-vram # >30GB VRAM
python3 videogen --model-list --huge-vram # >55GB VRAM python3 videogen --model-list --huge-vram # >55GB VRAM
# List NSFW-friendly models
python3 videogen --model-list --nsfw-friendly python3 videogen --model-list --nsfw-friendly
# Disable a model from auto selection
python3 videogen --disable-model <ID_or_name>
# Enable a model for auto selection
python3 videogen --enable-model <ID_or_name>
```
#### Cache Management
```bash
# List cached models
python3 videogen --list-cached-models
# Remove specific cached model
python3 videogen --remove-cached-model <model_id>
# Clear entire cache
python3 videogen --clear-cache
``` ```
### Auto Mode ### Auto Mode
......
This diff is collapsed.
...@@ -653,6 +653,69 @@ async def list_tools() -> list: ...@@ -653,6 +653,69 @@ async def list_tools() -> list:
} }
), ),
Tool(
name="videogen_disable_model",
description="Disable a model from auto-selection.",
inputSchema={
"type": "object",
"properties": {
"model": {
"type": "string",
"description": "Model ID (number), name, or HuggingFace ID to disable"
}
},
"required": ["model"]
}
),
Tool(
name="videogen_enable_model",
description="Enable a model for auto-selection.",
inputSchema={
"type": "object",
"properties": {
"model": {
"type": "string",
"description": "Model ID (number), name, or HuggingFace ID to enable"
}
},
"required": ["model"]
}
),
Tool(
name="videogen_list_cached_models",
description="List locally cached HuggingFace models with their sizes.",
inputSchema={
"type": "object",
"properties": {}
}
),
Tool(
name="videogen_remove_cached_model",
description="Remove a specific model from the local HuggingFace cache.",
inputSchema={
"type": "object",
"properties": {
"model_id": {
"type": "string",
"description": "HuggingFace model ID to remove from cache (e.g., stabilityai/stable-video-diffusion-img2vid-xt-1.1)"
}
},
"required": ["model_id"]
}
),
Tool(
name="videogen_clear_cache",
description="Clear the entire local HuggingFace cache.",
inputSchema={
"type": "object",
"properties": {}
}
),
Tool( Tool(
name="videogen_list_tts_voices", name="videogen_list_tts_voices",
description="List all available TTS voices for audio generation.", description="List all available TTS voices for audio generation.",
...@@ -1118,6 +1181,31 @@ async def call_tool(name: str, arguments: dict) -> list: ...@@ -1118,6 +1181,31 @@ async def call_tool(name: str, arguments: dict) -> list:
output, code = run_videogen_command(args) output, code = run_videogen_command(args)
return [TextContent(type="text", text=output)] return [TextContent(type="text", text=output)]
elif name == "videogen_disable_model":
args = ["--disable-model", arguments["model"]]
output, code = run_videogen_command(args)
return [TextContent(type="text", text=output)]
elif name == "videogen_enable_model":
args = ["--enable-model", arguments["model"]]
output, code = run_videogen_command(args)
return [TextContent(type="text", text=output)]
elif name == "videogen_list_cached_models":
args = ["--list-cached-models"]
output, code = run_videogen_command(args)
return [TextContent(type="text", text=output)]
elif name == "videogen_remove_cached_model":
args = ["--remove-cached-model", arguments["model_id"]]
output, code = run_videogen_command(args)
return [TextContent(type="text", text=output)]
elif name == "videogen_clear_cache":
args = ["--clear-cache"]
output, code = run_videogen_command(args)
return [TextContent(type="text", text=output)]
elif name == "videogen_list_tts_voices": elif name == "videogen_list_tts_voices":
args = ["--tts-list"] args = ["--tts-list"]
output, code = run_videogen_command(args) output, code = run_videogen_command(args)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment