inkos commited on
Commit
264e2fd
·
verified ·
1 Parent(s): f3d1e9a

Upload folder using huggingface_hub

Browse files
adapter_config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": null,
5
+ "bias": "none",
6
+ "corda_config": null,
7
+ "eva_config": null,
8
+ "exclude_modules": null,
9
+ "fan_in_fan_out": false,
10
+ "inference_mode": false,
11
+ "init_lora_weights": true,
12
+ "layer_replication": null,
13
+ "layers_pattern": null,
14
+ "layers_to_transform": null,
15
+ "loftq_config": {},
16
+ "lora_alpha": 48,
17
+ "lora_bias": false,
18
+ "lora_dropout": 0.0,
19
+ "megatron_config": null,
20
+ "megatron_core": "megatron.core",
21
+ "modules_to_save": null,
22
+ "peft_type": "LORA",
23
+ "r": 48,
24
+ "rank_pattern": {},
25
+ "revision": null,
26
+ "target_modules": [
27
+ "ffn.0",
28
+ "v",
29
+ "q",
30
+ "o",
31
+ "k",
32
+ "ffn.2"
33
+ ],
34
+ "task_type": null,
35
+ "trainable_token_indices": null,
36
+ "use_dora": false,
37
+ "use_rslora": false
38
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:08f75e871f448c45369de1963e36c708bbcc80911bd2882fac87fe1555d5b4b1
3
+ size 131309776
main_example.toml ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Output path for training runs. Each training run makes a new directory in here.
2
+ output_dir = '/data/diffusion_pipe_training_runs/852'
3
+
4
+ # Dataset config file.
5
+ dataset = '/data/shiv/diffusion-pipe/examples/852_dataset.toml'
6
+ # You can have separate eval datasets. Give them a name for Tensorboard metrics.
7
+ # eval_datasets = [
8
+ # {name = 'something', config = 'path/to/eval_dataset.toml'},
9
+ # ]
10
+
11
+ # training settings
12
+
13
+ # I usually set this to a really high value because I don't know how long I want to train.
14
+ epochs = 1000
15
+ # Batch size of a single forward/backward pass for one GPU.
16
+ micro_batch_size_per_gpu = 16
17
+ # Pipeline parallelism degree. A single instance of the model is divided across this many GPUs.
18
+ pipeline_stages = 1
19
+ # Number of micro-batches sent through the pipeline for each training step.
20
+ # If pipeline_stages > 1, a higher GAS means better GPU utilization due to smaller pipeline bubbles (where GPUs aren't overlapping computation).
21
+ gradient_accumulation_steps = 8
22
+ # Grad norm clipping.
23
+ gradient_clipping = 1.0
24
+ # Learning rate warmup.
25
+ warmup_steps = 5
26
+
27
+ # Block swapping is supported for Wan, HunyuanVideo, Flux, and Chroma. This value controls the number
28
+ # of blocks kept offloaded to RAM. Increasing it lowers VRAM use, but has a performance penalty. The
29
+ # exactly performance penalty depends on the model and the type of training you are doing (e.g. images vs video).
30
+ # Block swapping only works for LoRA training, and requires pipeline_stages=1.
31
+ blocks_to_swap = 24
32
+
33
+ # eval settings
34
+
35
+ eval_every_n_epochs = 1
36
+ eval_before_first_step = false
37
+ # Might want to set these lower for eval so that less images get dropped (eval dataset size is usually much smaller than training set).
38
+ # Each size bucket of images/videos is rounded down to the nearest multiple of the global batch size, so higher global batch size means
39
+ # more dropped images. Usually doesn't matter for training but the eval set is much smaller so it can matter.
40
+ eval_micro_batch_size_per_gpu = 1
41
+ eval_gradient_accumulation_steps = 1
42
+ # If using block swap, you can disable it for eval. Eval uses less memory, so depending on block swapping amount you can maybe get away with
43
+ # doing this, and then eval is much faster.
44
+ disable_block_swap_for_eval = true
45
+
46
+ # misc settings
47
+
48
+ # 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.
49
+ save_every_n_epochs = 1
50
+ # Can checkpoint the training state every n number of epochs or minutes. Set only one of these. You can resume from checkpoints using the --resume_from_checkpoint flag.
51
+ #checkpoint_every_n_epochs = 1
52
+ checkpoint_every_n_minutes = 60
53
+ # Always set to true unless you have a huge amount of VRAM.
54
+ # This can also be 'unsloth' to reduce VRAM even more, with a slight performance hit.
55
+ activation_checkpointing = true
56
+
57
+ # Controls how Deepspeed decides how to divide layers across GPUs. Probably don't change this.
58
+ partition_method = 'parameters'
59
+ # Alternatively you can use 'manual' in combination with partition_split, which specifies the split points for dividing
60
+ # layers between GPUs. For example, with two GPUs, partition_split=[10] puts layers 0-9 on GPU 0, and the rest on GPU 1.
61
+ # With three GPUs, partition_split=[10, 20] puts layers 0-9 on GPU 0, layers 10-19 on GPU 1, and the rest on GPU 2.
62
+ # Length of partition_split must be pipeline_stages-1.
63
+ #partition_split = [N]
64
+
65
+ # dtype for saving the LoRA or model, if different from training dtype
66
+ save_dtype = 'bfloat16'
67
+ # If experiencing CUDA OOM errors with memory fragmentation, set this env var: PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
68
+ # Batch size for caching latents and text embeddings. Increasing can lead to higher GPU utilization during caching phase but uses more memory.
69
+ caching_batch_size = 8
70
+ # How often deepspeed logs to console.
71
+ steps_per_print = 100
72
+ # How to extract video clips for training from a single input video file.
73
+ # 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
74
+ # number of frames for that bucket.
75
+ # single_beginning: one clip starting at the beginning of the video
76
+ # single_middle: one clip from the middle of the video (cutting off the start and end equally)
77
+ # multiple_overlapping: extract the minimum number of clips to cover the full range of the video. They might overlap some.
78
+ # default is single_beginning
79
+ video_clip_mode = 'single_beginning'
80
+
81
+ # This is how you configure HunyuanVideo. Other models will be different. See docs/supported_models.md for
82
+ # details on the configuration and options for each model.
83
+ [model]
84
+ type = 'wan'
85
+ ckpt_path = '/data/shiv/diffusion-pipe/models/wan1.3'
86
+ # Base dtype used for all models.
87
+ dtype = 'bfloat16'
88
+ # Wan supports fp8 for the transformer when training LoRA.
89
+ # transformer_dtype = 'float8'
90
+ # How to sample timesteps to train on. Can be logit_normal or uniform.
91
+ timestep_sample_method = 'logit_normal'
92
+
93
+ # For models that support full fine tuning, simply delete or comment out the [adapter] table to FFT.
94
+ [adapter]
95
+ type = 'lora'
96
+ # Dtype for the LoRA weights you are training.
97
+ dtype = 'bfloat16'
98
+ # LoRA rank - determines capacity to learn (higher = more capacity, more VRAM usage)
99
+ rank = 48
100
+
101
+ # Higher rank = more capacity to learn but uses more VRAM and may overfit
102
+ # The alpha value (scaling factor) is automatically set equal to rank in this codebase
103
+ # You can initialize the lora weights from a previously trained lora.
104
+ init_from_existing = '/data/diffusion_pipe_training_runs/852/20250411_21-03-36/epoch3'
105
+
106
+ [optimizer]
107
+ # AdamW from the optimi library is a good default since it automatically uses Kahan summation when training bfloat16 weights.
108
+ # Look at train.py for other options. You could also easily edit the file and add your own.
109
+ type = 'adamw_optimi'
110
+ lr = 1e-5
111
+ betas = [0.9, 0.99]
112
+ weight_decay = 0.01