Vicky0522 commited on
Commit
ca4cb06
1 Parent(s): 9ced8b5

Upload item3/config_single_chunk.yaml with huggingface_hub

Browse files
Files changed (1) hide show
  1. item3/config_single_chunk.yaml +153 -0
item3/config_single_chunk.yaml ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Pretrained diffusers model path.
2
+ pretrained_model_path: "ckpts/stable-video-diffusion-img2vid"
3
+ # The folder where your training outputs will be placed.
4
+ output_dir: "./sig_girl"
5
+ seed: 23
6
+ num_steps: 25
7
+ # Xformers must be installed for best memory savings and performance (< Pytorch 2.0)
8
+ enable_xformers_memory_efficient_attention: True
9
+ # Use scaled dot product attention (Only available with >= Torch 2.0)
10
+ enable_torch_2_attn: True
11
+
12
+ use_sarp: true
13
+
14
+ use_motion_lora: true
15
+ train_motion_lora_only: false
16
+ retrain_motion_lora: false
17
+
18
+ use_inversed_latents: true
19
+ use_attention_matching: true
20
+ use_consistency_attention_control: false
21
+ dtype: fp16
22
+
23
+ visualize_attention_store: false
24
+ visualize_attention_store_steps: [0, 5, 10, 15, 20, 24]
25
+
26
+ save_last_frames: True
27
+ load_from_last_frames_latents:
28
+
29
+ # data_params
30
+ data_params:
31
+ video_path: "../datasets/svdedit/item3/source.mp4"
32
+ keyframe_paths:
33
+ - "../datasets/svdedit/item3/cyberpunk.png"
34
+ - "../datasets/svdedit/item3/hat.png"
35
+ - "../datasets/svdedit/item3/shinkai.png"
36
+ - "../datasets/svdedit/item3/tshirt.png"
37
+ start_t: 0
38
+ end_t: -1
39
+ sample_fps: 7
40
+ chunk_size: 16
41
+ overlay_size: 1
42
+ normalize: true
43
+ output_fps: 7
44
+ save_sampled_frame: true
45
+ output_res: [576, 1024]
46
+ pad_to_fit: false
47
+ begin_clip_id: 0
48
+ end_clip_id: 1
49
+
50
+ train_motion_lora_params:
51
+ cache_latents: true
52
+ cached_latent_dir: null #/path/to/cached_latents
53
+ lora_rank: 32
54
+ # Use LoRA for the UNET model.
55
+ use_unet_lora: True
56
+ # LoRA Dropout. This parameter adds the probability of randomly zeros out elements. Helps prevent overfitting.
57
+ # See: https://pytorch.org/docs/stable/generated/torch.nn.Dropout.html
58
+ lora_unet_dropout: 0.1
59
+ # The only time you want this off is if you're doing full LoRA training.
60
+ save_pretrained_model: False
61
+ # Learning rate for AdamW
62
+ learning_rate: 5e-4
63
+ # Weight decay. Higher = more regularization. Lower = closer to dataset.
64
+ adam_weight_decay: 1e-2
65
+ # Maximum number of train steps. Model is saved after training.
66
+ max_train_steps: 250
67
+ # Saves a model every nth step.
68
+ checkpointing_steps: 250
69
+ # How many steps to do for validation if sample_preview is enabled.
70
+ validation_steps: 300
71
+ # Whether or not we want to use mixed precision with accelerate
72
+ mixed_precision: "fp16"
73
+ # Trades VRAM usage for speed. You lose roughly 20% of training speed, but save a lot of VRAM.
74
+ # If you need to save more VRAM, it can also be enabled for the text encoder, but reduces speed x2.
75
+ gradient_checkpointing: True
76
+ image_encoder_gradient_checkpointing: True
77
+
78
+ train_data:
79
+ # The width and height in which you want your training data to be resized to.
80
+ width: 896
81
+ height: 512
82
+ # This will find the closest aspect ratio to your input width and height.
83
+ # For example, 512x512 width and height with a video of resolution 1280x720 will be resized to 512x256
84
+ use_data_aug: ~ #"controlnet"
85
+ pad_to_fit: false
86
+
87
+ validation_data:
88
+ # Whether or not to sample preview during training (Requires more VRAM).
89
+ sample_preview: True
90
+ # The number of frames to sample during validation.
91
+ num_frames: 14
92
+ # Height and width of validation sample.
93
+ width: 1024
94
+ height: 576
95
+ pad_to_fit: false
96
+ # scale of spatial LoRAs, default is 0
97
+ spatial_scale: 0
98
+ # scale of noise prior, i.e. the scale of inversion noises
99
+ noise_prior:
100
+ #- 0.0
101
+ - 1.0
102
+
103
+ sarp_params:
104
+ sarp_noise_scale: 0.005
105
+
106
+ attention_matching_params:
107
+ best_checkpoint_index: 250
108
+ lora_scale: 1.0
109
+ # lora path
110
+ lora_dir: "./cache/item3/train_motion_lora/"
111
+ max_guidance_scale: 2.0
112
+ disk_store: True
113
+ load_attention_store: "./cache/item3/attention_store"
114
+ load_consistency_attention_store: "./cache/item3/consistency_attention_store"
115
+ registered_modules:
116
+ BasicTransformerBlock:
117
+ - "attn1"
118
+ #- "attn2"
119
+ TemporalBasicTransformerBlock:
120
+ - "attn1"
121
+ #- "attn2"
122
+ control_mode:
123
+ spatial_self: "masked_copy"
124
+ temporal_self: "copy_v2"
125
+ cross_replace_steps: 0.0
126
+ temporal_self_replace_steps: 1.0
127
+ spatial_self_replace_steps: 1.0
128
+ spatial_attention_chunk_size: 1
129
+
130
+ params:
131
+ edit0:
132
+ temporal_step_thr: [0.4, 0.5]
133
+ mask_thr: [0.35, 0.35]
134
+ edit1:
135
+ temporal_step_thr: [0.5, 0.8]
136
+ mask_thr: [0.35, 0.35]
137
+ edit2:
138
+ temporal_step_thr: [0.5, 0.8]
139
+ mask_thr: [0.35, 0.35]
140
+ edit3:
141
+ temporal_step_thr: [0.5, 0.8]
142
+ mask_thr: [0.35, 0.35]
143
+
144
+ long_video_params:
145
+ mode: "skip-interval"
146
+ registered_modules:
147
+ BasicTransformerBlock:
148
+ #- "attn1"
149
+ #- "attn2"
150
+ TemporalBasicTransformerBlock:
151
+ - "attn1"
152
+ #- "attn2"
153
+