Guest User

anima_train_CivChan.bat

a guest
Feb 18th, 2026
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1.  
  2. SET VERSION=1
  3. SET DIM=32
  4. SET ALPHA=32
  5. SET LORA_NAME=CivChan_uWu
  6.  
  7. SET UNET_ONLY=0
  8. SET MAX_EPOCH=10
  9.  
  10. SET OUTPUT_DIR=E:\AI\Lora\Anima\train
  11. SET DATASET_CONFIG=D:\AI\train_lora\dataset_CivChan.toml
  12.  
  13. SET LOGGING_DIR=D:\AI\train_lora\log
  14.  
  15.  
  16. SET RESUME=1
  17. SET RESUME_EPOCH=4
  18.  
  19. SET ARGS=
  20.  
  21.  
  22. IF %RESUME%==1 (
  23. setlocal EnableDelayedExpansion
  24. set "padded=0000000000%RESUME_EPOCH%"
  25. set "RESUME_EPOCH_FORMATED=!padded:~-6!"
  26. endlocal
  27. set ARGS=%ARGS% --resume %OUTPUT_DIR%\%LORA_NAME%-%RESUME_EPOCH_FORMATED%-state
  28. )
  29.  
  30. IF %UNET_ONLY%==1 (
  31. echo 1
  32. SET ARGS=%ARGS% --network_train_unet_only
  33. )
  34.  
  35.  
  36. SET FULL_LORA_NAME=%LORA_NAME%_v%VERSION%_n%DIM%-a%ALPHA%
  37.  
  38.  
  39.  
  40. chdir D:\AI\sd-scripts\
  41. call .\venv\Scripts\activate.bat
  42.  
  43. accelerate.exe launch anima_train_network.py ^
  44. --dit_path E:\AI\models\Anima-2b\models\anima.safetensors ^
  45. --vae_path E:\AI\models\Anima-2b\vae\qwen_image_vae.safetensors ^
  46. --qwen3_path E:\AI\models\Anima-2b\clip\qwen_3_06b_base.safetensors ^
  47. --dataset_config %DATASET_CONFIG% ^
  48. --output_name %FULL_LORA_NAME% ^
  49. --network_dim %DIM% ^
  50. --network_alpha %ALPHA% ^
  51. --clip_skip 2 ^
  52. --output_dir %OUTPUT_DIR% ^
  53. --logging_dir %LOGGING_DIR% ^
  54. --max_train_epochs %MAX_EPOCH% ^
  55. --log_with="tensorboard" ^
  56. --network_module networks.lora_anima ^
  57. --learning_rate 1e-4 ^
  58. --mixed_precision="bf16" ^
  59. --optimizer_type="AdamW8Bit" ^
  60. --lr_scheduler="cosine_with_restarts" ^
  61. --save_state ^
  62. --save_state_on_train_end ^
  63. --save_every_n_epochs=1 ^
  64. --save_precision="bf16" ^
  65. --cache_text_encoder_outputs ^
  66. --cache_latents ^
  67. --gradient_checkpointing ^
  68. --train_batch_size=2 ^
  69. --gradient_accumulation_steps=2 ^
  70. --blocks_to_swap 10 ^
  71. --xformers ^
  72. --seed=42 ^
  73. %ARGS%
  74.  
  75. pause
  76.  
Advertisement
Add Comment
Please, Sign In to add comment