Guest User

Untitled

a guest
Apr 18th, 2025
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.78 KB | None | 0 0
  1. # Output path for training runs. Each training run makes a new directory in here.
  2. output_dir = '/workspace/output/'
  3. dataset = 'dataset.toml'
  4.  
  5.  
  6. # I usually set this to a really high value because I don't know how long I want to train.
  7. epochs = 1000
  8. micro_batch_size_per_gpu = 2
  9. pipeline_stages = 1
  10. gradient_accumulation_steps = 2
  11. gradient_clipping = 1.0
  12. warmup_steps = 25
  13. #blocks_to_swap = 30
  14.  
  15. # Block swapping is supported for Wan, HunyuanVideo, Flux, and Chroma. This value controls the number
  16. # of blocks kept offloaded to RAM. Increasing it lowers VRAM use, but has a performance penalty. The
  17. # exactly performance penalty depends on the model and the type of training you are doing (e.g. images vs video).
  18. # Block swapping only works for LoRA training, and requires pipeline_stages=1.
  19. #blocks_to_swap = 20
  20.  
  21. # eval settings
  22.  
  23. eval_every_n_epochs = 1
  24. eval_before_first_step = true
  25. eval_micro_batch_size_per_gpu = 1
  26. eval_gradient_accumulation_steps = 1
  27. #disable_block_swap_for_eval = true
  28.  
  29. # misc settings
  30.  
  31. # Probably want to set this a bit higher if you have a smaller dataset so you don't end up with a million saved models.
  32. save_every_n_epochs = 2
  33. #checkpoint_every_n_epochs = 1
  34. checkpoint_every_n_minutes = 60
  35. activation_checkpointing = true
  36.  
  37. # Controls how Deepspeed decides how to divide layers across GPUs. Probably don't change this.
  38. partition_method = 'parameters'
  39.  
  40.  
  41.  
  42. save_dtype = 'bfloat16'
  43. caching_batch_size = 1
  44. steps_per_print = 1
  45. # How to extract video clips for training from a single input video file.
  46. # The video file is first assigned to one of the configured frame buckets, but then we must extract one or more clips of exactly the right
  47. # number of frames for that bucket.
  48. # single_beginning: one clip starting at the beginning of the video
  49. # single_middle: one clip from the middle of the video (cutting off the start and end equally)
  50. # multiple_overlapping: extract the minimum number of clips to cover the full range of the video. They might overlap some.
  51. # default is single_beginning
  52. video_clip_mode = 'single_beginning'
  53.  
  54. # This is how you configure HunyuanVideo. Other models will be different. See docs/supported_models.md for
  55. # details on the configuration and options for each model.
  56. [model]
  57. # type = 'chroma'
  58. # diffusers_path = '/mnt/d/models/flux.dev'
  59. # transformer_path = '/mnt/d/models/chroma-unlocked-v23.safetensors'
  60. # dtype = 'bfloat16'
  61. # # You can optionally load the transformer in fp8 when training LoRAs.
  62. # transformer_dtype = 'float8'
  63. # flux_shift = true
  64. type = 'hidream'
  65. diffusers_path = '/workspace/models/hidream'
  66. llama3_path = '/workspace/models/llama31'
  67. llama3_4bit = true
  68. dtype = 'bfloat16'
  69. transformer_dtype = 'float8'
  70. max_llama3_sequence_length = 128
  71. # Can use a resolution-dependent timestep shift, like Flux. Unsure if results are better.
  72. #flux_shift = true
  73.  
  74. # For models that support full fine tuning, simply delete or comment out the [adapter] table to FFT.
  75. [adapter]
  76. type = 'lora'
  77. rank = 32
  78. # Dtype for the LoRA weights you are training.
  79. dtype = 'bfloat16'
  80. #init_from_existing = '/data/diffusion_pipe_training_runs/something/epoch50'
  81.  
  82. [optimizer]
  83. # AdamW from the optimi library is a good default since it automatically uses Kahan summation when training bfloat16 weights.
  84. # Look at train.py for other options. You could also easily edit the file and add your own.
  85. type = 'adamw_optimi'
  86. lr = 1e-4
  87. betas = [0.9, 0.99]
  88. weight_decay = 0.01
  89. eps = 1e-8
  90.  
  91. # Can use this optimizer for a bit less memory usage.
  92. # [optimizer]
  93. # type = 'AdamW8bitKahan'
  94. # lr = 2e-5
  95. # betas = [0.9, 0.99]
  96. # weight_decay = 0.01
  97. # stabilize = false
  98.  
  99. # Any optimizer not explicitly supported will be dynamically loaded from the pytorch-optimizer library.
  100. # [optimizer]
  101. # type = 'Prodigy'
  102. # lr = 1
  103. # betas = [0.9, 0.99]
  104. # weight_decay = 0.01
  105.  
Advertisement
Add Comment
Please, Sign In to add comment