發表文章

目前顯示的是有「快取清理」標籤的文章

[AI] PowerShell 腳本筆記: Whisper 模型快取檔案

圖片
PowerShell 腳本筆記:清除 Whisper 模型快取檔案 Whisper / WhisperX 模型會快取在 C:\Users\你的帳號\.cache\huggingface 中,可能佔用大量磁碟空間。 以下腳本可自動掃描快取目錄中與 Whisper 相關的模型,列出清單並可手動選擇刪除,有助於釋放磁碟空間。 📜 腳本內容 # PowerShell script to find and optionally delete cached Whisper model directories from Hugging Face $cacheDir = Join-Path $Env:USERPROFILE '.cache\huggingface\hub' if (-not (Test-Path $cacheDir)) { Write-Host "Hugging Face cache directory not found." return } # Get all model cache directories under the hub that contain "whisper" $whisperDirs = Get-ChildItem -Path $cacheDir -Directory | Where-Object { $_.Name -like '*whisper*' } | Sort-Object Name if ($whisperDirs.Count -eq 0) { Write-Host "No Whisper model caches found." return } # List found model caches with their sizes Write-Host "Whisper model caches found:" $index = 1 foreach ($dir in $whisperDirs) { # Extract model name from directory (everything after the second ...