Skip to content

Refactor the frontend and serving pipeline, add SoulX turn detection, and expand docs #30

Refactor the frontend and serving pipeline, add SoulX turn detection, and expand docs

Refactor the frontend and serving pipeline, add SoulX turn detection, and expand docs #30

Workflow file for this run

name: Block Large Model Files
on: [pull_request]
jobs:
check-model-file-size:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check model file sizes
run: |
echo "🔍 Checking model file sizes..."
model_files=$(git diff --name-only HEAD^ HEAD | grep -E '\.(ckpt|pt|bin|safetensors|onnx|pb|h5|tflite)$' || true)
if [ -z "$model_files" ]; then
echo "✔ No model files found."
exit 0
fi
echo "📁 Found model files:"
echo "$model_files"
for f in $model_files; do
if [ -f "$f" ]; then
size=$(stat -c%s "$f")
echo "➡ File: $f ($size bytes)"
# 1MB = 1 * 1024 * 1024 = 1048576 bytes
if [ "$size" -ge 1048576 ]; then
echo "❌ ERROR: $f is too large (>1MB). Uploading prohibited."
exit 1
fi
fi
done
echo "✔ All model files are smaller than 1MB."