Spaces:
Runtime error
Runtime error
kundaja-green
commited on
Commit
·
a723a7c
1
Parent(s):
00496ae
Update start.sh to use correct model filenames from dedicated repo
Browse files
start.sh
CHANGED
@@ -1,45 +1,57 @@
|
|
1 |
#!/bin/bash
|
|
|
2 |
|
3 |
-
# --- Final Definitive Startup Script (v21 - Points directly to the single DiT file) ---
|
4 |
-
|
5 |
-
# Exit immediately if a command exits with a non-zero status.
|
6 |
set -e
|
7 |
-
|
8 |
echo "--- Startup Script Initialized ---"
|
9 |
-
echo "--- Models are mounted from two separate repositories. ---"
|
10 |
|
11 |
-
# --- Define
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
OUTPUT_DIR="/data/output"
|
15 |
|
|
|
|
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
|
24 |
-
|
25 |
-
echo "VAE
|
26 |
-
|
27 |
-
|
28 |
-
echo "
|
|
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
34 |
fi
|
35 |
|
36 |
if [ ! -f "$T5_PATH" ]; then
|
37 |
-
echo "
|
38 |
-
|
|
|
|
|
|
|
39 |
fi
|
40 |
|
41 |
-
echo "--- All
|
42 |
-
|
|
|
|
|
43 |
accelerate launch wan_train_network.py \
|
44 |
--task="i2v-lora" \
|
45 |
--dit="$DIT_PATH" \
|
|
|
1 |
#!/bin/bash
|
2 |
+
# --- Final Definitive Startup Script (v23.2 - Uses USER-VERIFIED filenames) ---
|
3 |
|
|
|
|
|
|
|
4 |
set -e
|
|
|
5 |
echo "--- Startup Script Initialized ---"
|
|
|
6 |
|
7 |
+
# --- Define where models will be downloaded ---
|
8 |
+
MODELS_DIR="/data/models"
|
9 |
+
mkdir -p $MODELS_DIR # Create the directory if it doesn't exist
|
10 |
+
|
11 |
+
# --- Define paths to the model files with CORRECTED names ---
|
12 |
+
DIT_PATH="$MODELS_DIR/wan2.1_i2v_720p_14B_fp8_e4m3fn.safetensors"
|
13 |
+
VAE_PATH="$MODELS_DIR/Wan2.1_VAE.pth"
|
14 |
+
CLIP_PATH="$MODELS_DIR/models_clip_open-clip-xlm-roberta-large-vit-huge-14.pth" # CORRECTED FILENAME
|
15 |
+
T5_PATH="$MODELS_DIR/models_t5_umt5-xxl-enc-bf16.pth" # CORRECTED FILENAME
|
16 |
OUTPUT_DIR="/data/output"
|
17 |
|
18 |
+
# --- Download models from our dedicated model repo IF they don't already exist ---
|
19 |
+
echo "--- Checking for model files... ---"
|
20 |
|
21 |
+
if [ ! -f "$DIT_PATH" ]; then
|
22 |
+
echo "Downloading DiT model from jujutechnology/WANfortraining..."
|
23 |
+
huggingface-cli download jujutechnology/WANfortraining wan2.1_i2v_720p_14B_fp8_e4m3fn.safetensors --local-dir $MODELS_DIR --local-dir-use-symlinks False
|
24 |
+
else
|
25 |
+
echo "DiT model already exists."
|
26 |
+
fi
|
27 |
|
28 |
+
if [ ! -f "$VAE_PATH" ]; then
|
29 |
+
echo "Downloading VAE model from jujutechnology/WANfortraining..."
|
30 |
+
huggingface-cli download jujutechnology/WANfortraining Wan2.1_VAE.pth --local-dir $MODELS_DIR --local-dir-use-symlinks False
|
31 |
+
else
|
32 |
+
echo "VAE model already exists."
|
33 |
+
fi
|
34 |
|
35 |
+
if [ ! -f "$CLIP_PATH" ]; then
|
36 |
+
echo "Downloading CLIP model from jujutechnology/WANfortraining..."
|
37 |
+
# CORRECTED FILENAME in download command
|
38 |
+
huggingface-cli download jujutechnology/WANfortraining models_clip_open-clip-xlm-roberta-large-vit-huge-14.pth --local-dir $MODELS_DIR --local-dir-use-symlinks False
|
39 |
+
else
|
40 |
+
echo "CLIP model already exists."
|
41 |
fi
|
42 |
|
43 |
if [ ! -f "$T5_PATH" ]; then
|
44 |
+
echo "Downloading T5 model from jujutechnology/WANfortraining..."
|
45 |
+
# CORRECTED FILENAME in download command
|
46 |
+
huggingface-cli download jujutechnology/WANfortraining models_t5_umt5-xxl-enc-bf16.pth --local-dir $MODELS_DIR --local-dir-use-symlinks False
|
47 |
+
else
|
48 |
+
echo "T5 model already exists."
|
49 |
fi
|
50 |
|
51 |
+
echo "--- All models are present. Starting training... ---"
|
52 |
+
ls -lh $MODELS_DIR # List the downloaded files to confirm
|
53 |
+
|
54 |
+
# --- Run the training command ---
|
55 |
accelerate launch wan_train_network.py \
|
56 |
--task="i2v-lora" \
|
57 |
--dit="$DIT_PATH" \
|