Spaces:
Runtime error
Runtime error
kundaja-green
commited on
Commit
·
3287bb5
1
Parent(s):
97d39bb
FIX: Add safe.directory config for git to resolve ownership error
Browse files
start.sh
CHANGED
|
@@ -1,12 +1,22 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
# --- Final Definitive Startup Script (
|
| 3 |
|
| 4 |
set -e
|
| 5 |
echo "--- Startup Script Initialized ---"
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
MODELS_DIR="/data/models"
|
| 8 |
OUTPUT_DIR="/data/output"
|
| 9 |
-
|
| 10 |
mkdir -p $MODELS_DIR
|
| 11 |
mkdir -p $OUTPUT_DIR
|
| 12 |
|
|
@@ -28,17 +38,8 @@ fi
|
|
| 28 |
if [ ! -f "$T5_PATH" ]; then
|
| 29 |
huggingface-cli download jujutechnology/WANfortraining models_t5_umt5-xxl-enc-bf16.pth --local-dir $MODELS_DIR --local-dir-use-symlinks False
|
| 30 |
fi
|
| 31 |
-
echo "--- Models are present. ---"
|
| 32 |
-
|
| 33 |
-
# --- CRITICAL STEP: Force checkout of Git LFS files in the repo ---
|
| 34 |
-
echo "--- Ensuring all dataset images are fully downloaded (git lfs pull)... ---"
|
| 35 |
-
git lfs pull
|
| 36 |
-
echo "--- LFS checkout complete. Verifying file sizes: ---"
|
| 37 |
-
ls -lh /code/dataset/ebPhotos-001/ # This will now show megabyte-sized files
|
| 38 |
-
|
| 39 |
-
echo "--- Starting training... ---"
|
| 40 |
|
| 41 |
-
# --- Run the training command ---
|
| 42 |
accelerate launch wan_train_network.py \
|
| 43 |
--task="i2v-14B" \
|
| 44 |
--dit="$DIT_PATH" \
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
# --- Final Definitive Startup Script (v25 - Fixes git 'dubious ownership' error) ---
|
| 3 |
|
| 4 |
set -e
|
| 5 |
echo "--- Startup Script Initialized ---"
|
| 6 |
|
| 7 |
+
# --- FIX for 'dubious ownership' error ---
|
| 8 |
+
# This tells Git that the /code directory is safe to use, even with different user ownership.
|
| 9 |
+
echo "--- Applying Git security exception for /code directory... ---"
|
| 10 |
+
git config --global --add safe.directory /code
|
| 11 |
+
|
| 12 |
+
# --- CRITICAL STEP: Force checkout of Git LFS files in the repo ---
|
| 13 |
+
echo "--- Ensuring all dataset images are fully downloaded (git lfs pull)... ---"
|
| 14 |
+
git lfs pull
|
| 15 |
+
echo "--- LFS checkout complete. Verifying file sizes: ---"
|
| 16 |
+
ls -lh /code/dataset/ebPhotos-001/
|
| 17 |
+
|
| 18 |
MODELS_DIR="/data/models"
|
| 19 |
OUTPUT_DIR="/data/output"
|
|
|
|
| 20 |
mkdir -p $MODELS_DIR
|
| 21 |
mkdir -p $OUTPUT_DIR
|
| 22 |
|
|
|
|
| 38 |
if [ ! -f "$T5_PATH" ]; then
|
| 39 |
huggingface-cli download jujutechnology/WANfortraining models_t5_umt5-xxl-enc-bf16.pth --local-dir $MODELS_DIR --local-dir-use-symlinks False
|
| 40 |
fi
|
| 41 |
+
echo "--- Models are present. Starting training... ---"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
|
|
|
| 43 |
accelerate launch wan_train_network.py \
|
| 44 |
--task="i2v-14B" \
|
| 45 |
--dit="$DIT_PATH" \
|