Vicky0522 commited on
Commit
35bb48a
1 Parent(s): a5fad9c

Upload item6/config_single_chunk.yaml with huggingface_hub

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