Vicky0522 commited on
Commit
f0b9366
·
verified ·
1 Parent(s): 4fadfca

Upload item5/config_single_chunk.yaml with huggingface_hub

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