Sergey004 commited on
Commit
1db90bf
·
verified ·
1 Parent(s): 5f66b58

Add files using upload-large-folder tool

Browse files
Minecraft_Villager_Illustrious/Run_Minecraft_Villager.sh ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # (Необязательно, но хорошая практика)
3
+
4
+ # --- Активация окружения ---
5
+ # Убедитесь, что путь к вашему venv правильный!
6
+ # source ./Loras/lora_env/bin/activate || exit 1 # Пример с выходом при ошибке
7
+
8
+ echo "Starting LoRA Style Training Pipeline..."
9
+ echo "Ensure your virtual environment is activated."
10
+ echo "Using Python version: $(python --version)"
11
+ echo "Using GPU: $(nvidia-smi --query-gpu=name --format=csv,noheader)"
12
+
13
+ python master_train.py \
14
+ --project_name "Minecraft_Villager_Illustrious" \
15
+ --base_dir "./Loras" \
16
+ --run_steps "tag,curate,config,train" \
17
+ \
18
+ --base_model "/mnt/e/stable-diffusion-webui/models/Stable-diffusion/SDXL/Ilust/illustriousXL_v01.safetensors" \
19
+ --base_vae "stabilityai/sdxl-vae" \
20
+ \
21
+ --overwrite_tags \
22
+ --tagging_method "wd14" \
23
+ --tagger_threshold 0.45 \
24
+ --tagger_batch_size 16 \
25
+ --tagger_blacklist "nsfw, lowres, bad anatomy, signature, watermark, text, artist name, virtual youtuber, parody, poorly drawn, amateur drawing, sketch" \
26
+ --caption_extension ".txt" \
27
+ --activation_tag "Minecraft_Villager, long nose, unibrow, male focus, 1boy" \
28
+ --remove_tags "solo, duo, group, simple background, white background, grey background, gradient background, abstract background, looking at viewer, upper body, full body, portrait, absurdres, highres, bad quality, normal quality, signature, artist name, text, watermark, logo, copyright, traditional media, scan, photo, official art, fanart, commission, request, meme, joke, parody, nsfw, sfw, child, loli, shota, bear, chubby, fat" \
29
+ --remove_duplicate_tags \
30
+ --sort_tags_alpha \
31
+ \
32
+ --resolution 1024 \
33
+ --keep_tokens 1 \
34
+ --preferred_unit "Epochs" \
35
+ --how_many 10 \
36
+ --save_every_n_epochs 1 \
37
+ --keep_only_last_n_epochs 10 \
38
+ --auto_repeats \
39
+ \
40
+ --unet_lr 3e-4 \
41
+ --text_encoder_lr 6e-5 \
42
+ --lr_scheduler "cosine_with_restarts" \
43
+ --lr_scheduler_num_cycles 3 \
44
+ --lr_warmup_ratio 0.05 \
45
+ --min_snr_gamma 5.0 \
46
+ \
47
+ --lora_type "LoRA" \
48
+ --network_dim 32 \
49
+ --network_alpha 16 \
50
+ \
51
+ --optimizer "AdaFactor" \
52
+ --optimizer_args "scale_parameter=False relative_step=False warmup_init=False" \
53
+ --train_batch_size 4 \
54
+ --precision "bf16" \
55
+ --cross_attention "sdpa" \
56
+ --cache_latents \
57
+ --auto_vram_params \
58
+ --cache_latents_to_disk \
59
+ --gradient_checkpointing \
60
+ --seed 42 \
61
+ --max_bucket_reso 4096 \
62
+ --num_cpu_threads 12
63
+
64
+ # --- Проверка завершения ---
65
+ EXIT_CODE=$?
66
+ if [ $EXIT_CODE -eq 0 ]; then
67
+ echo "Master script finished successfully."
68
+ else
69
+ echo "Master script failed with exit code $EXIT_CODE."
70
+ fi