-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
171 additions
and
46 deletions.
There are no files selected for viewing
115 changes: 115 additions & 0 deletions
115
examples/hunyuanvideo/configs/train/stage1_t2i_256px.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
env: | ||
mode: 0 | ||
jit_level: O0 | ||
seed: 42 | ||
distributed: False | ||
debug: False | ||
|
||
model: | ||
name: "HYVideo-T/2-cfgdistill" | ||
in_channels: 16 | ||
pretrained_model_path: | ||
zero_stage: 3 | ||
text_states_dim: 4096 | ||
text_states_dim_2: 768 | ||
enable_ms_amp: True | ||
amp_level: O2 | ||
factor_kwargs: | ||
dtype: bf16 | ||
use_conv2d_patchify: True | ||
attn_mode: flash | ||
use_recompute: True | ||
num_no_recompute: 0 | ||
|
||
vae: | ||
vae_type: "884-16c-hy" | ||
vae_precision: fp16 | ||
vae_tiling: True | ||
|
||
dataset: | ||
csv_path: CSV_PATH | ||
video_folder: VIDEO_FOLDER | ||
text_emb_folder: | ||
ul2: UL2_FOLDER | ||
byt5: BYT5_FOLDER | ||
empty_text_emb: | ||
ul2: EMPTY_TEXT_EMB | ||
byt5: EMPTY_TEXT_EMB | ||
deterministic_sample: False | ||
text_drop_prob: 0.2 | ||
target_size: [ 256, 455 ] | ||
apply_transforms_dataset: True | ||
output_columns: [ "video", "ul2_caption", "byt5_caption" ] | ||
|
||
dataloader: | ||
batch_size: 70 | ||
shuffle: True | ||
num_workers_dataset: 4 | ||
|
||
train: | ||
steps: 30000 | ||
output_path: ../../output/stage1_t2i_256px # the path is relative to this config | ||
|
||
sequence_parallel: | ||
shards: 1 | ||
|
||
lr_scheduler: | ||
name: constant | ||
lr: 1.0e-4 | ||
warmup_steps: 1000 | ||
|
||
lr_reduce_on_plateau: | ||
factor: 0.5 | ||
patience: 50 # in the number of validation steps, i.e., valid.frequency * patience steps | ||
mode: min | ||
min_delta: 0.01 | ||
min_lr: 1.0e-6 | ||
|
||
optimizer: | ||
name: adamw_re | ||
eps: 1e-15 | ||
betas: [ 0.9, 0.999 ] | ||
weight_decay: 0.1 | ||
|
||
loss_scaler: | ||
class_path: mindspore.nn.FixedLossScaleUpdateCell # or DynamicLossScaleUpdateCell in FP16 | ||
init_args: | ||
loss_scale_value: 1 | ||
|
||
ema: | ||
ema_decay: 0.9999 | ||
offloading: True | ||
|
||
settings: | ||
zero_stage: 0 | ||
gradient_accumulation_steps: 1 | ||
clip_grad: True | ||
clip_norm: 1.0 | ||
|
||
save: | ||
ckpt_save_policy: top_k | ||
monitor_metric: eval_loss_smoothed | ||
ckpt_save_interval: &save_interval 500 | ||
ckpt_max_keep: 10 | ||
log_interval: 1 | ||
save_ema_only: False | ||
record_lr: False | ||
|
||
valid: | ||
sampling_steps: 10 | ||
frequency: *save_interval # train.save.ckpt_save_interval should be divisible by the frequency | ||
|
||
dataset: | ||
csv_path: CSV_PATH | ||
video_folder: VIDEO_FOLDER | ||
text_emb_folder: | ||
ul2: UL2_FOLDER | ||
byt5: BYT5_FOLDER | ||
target_size: [ 256, 256 ] | ||
apply_transforms_dataset: True | ||
output_columns: [ "video", "ul2_caption", "byt5_caption" ] | ||
|
||
dataloader: | ||
batch_size: 50 | ||
shuffle: False | ||
num_workers_dataset: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters