Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding hunyuan hf (support lora finetuning); unified hunyuan hf inference with quantization #135

Merged
merged 47 commits into from
Jan 14, 2025

Conversation

BrianChen1129
Copy link
Collaborator

adding hunyuan hf (support lora finetuning); unified hunyuan hf inference with quantization

initialize_sequence_parallel_state(world_size)


def inference(args):
Copy link
Collaborator

@jzhang38 jzhang38 Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why separate inference and inference quantization functions?

# print("2222222222222222222222222222222222222222222222")
# print(type(latents_attention_mask))
# print(latents_attention_mask)
training_guidance = torch.tensor([1000.0],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

training guidance only works with Hunyuan. Adding this would make Mochi mal function,

@@ -46,6 +45,14 @@ def save_checkpoint_optimizer(model,
"diffusion_pytorch_model.safetensors")
save_file(cpu_state, weight_path)
config_dict = dict(model.config)
config_dict.pop('dtype')
# dtype = config_dict['dtype']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete commented lines?

@@ -1,19 +1,19 @@
#!/bin/bash

num_gpus=1
export MODEL_BASE="data/FastHunyuan-diffusers"
export MODEL_BASE="data/FastHunyuan"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be FastHunyuan-diffusers?

--pretrained_model_name_or_path data/hunyuan_diffusers \
--model_type hunyuan_hf \
--cache_dir data/.cache \
--data_json_path data/Image-Vid-Finetune-HunYuan/videos2caption.json \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This dataset path should be set to the 22 videos?

--cfg 0.0 \
--ema_decay 0.999 \
--log_validation \
--output_dir data/outputs/HSH-Taylor-Finetune-Hunyuan \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

incorrect name.

@jzhang38 jzhang38 merged commit 218449c into main Jan 14, 2025
3 of 4 checks passed
bobboli pushed a commit to bobboli/FastVideo that referenced this pull request Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants