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

Opensora-PKU v1.3.0 : merge to v0.3.0-dev #847

Open
wants to merge 4 commits into
base: v0.3.0-dev
Choose a base branch
from

Conversation

wtomin
Copy link
Collaborator

@wtomin wtomin commented Feb 24, 2025

The purpose of this PR is to merge the Opensora-PKU v1.3.0 code into the branch v0.3.0-dev.

I directly copied the opensora_pku/ folder from the master branch to the corresponding folder of the v0.3.0-dev branch. Three additional files required for test are listed as: prompt_list_opendv_16, train_t2v_stage3_finetune_opendv_16.sh, sample_opendv_16.sh.

I have run all steps in the testing procedures with this PR. All scripts have passed. I made a minor modification to train_t2v_diffusers.py:

        params_func = inspect.signature(prepare_train_network).parameters
        if "optimizer_parallel_group" in params_func:
            kwargs = {"optimizer_parallel_group": GlobalComm.WORLD_COMM_GROUP}
        elif "op_group" in params_func:
            kwargs = {"op_group": GlobalComm.WORLD_COMM_GROUP}
        else:
            kwargs = {}
        net_with_grads = prepare_train_network(
            latent_diffusion_with_loss,
            optimizer,
            zero_stage=args.zero_stage,
            comm_fusion=comm_fusion_dict,
            scale_sense=loss_scaler,
            drop_overflow_update=args.drop_overflow_update,
            gradient_accumulation_steps=args.gradient_accumulation_steps,
            clip_grad=args.clip_grad,
            clip_norm=args.max_grad_norm,
            ema=ema,
            **kwargs,
        )

This is because pretrain_train_network from mindone/trainers/zero.py has updated its key arguments names: in master branch, it's optimizer_parallel_group, but in 0.3.0-dev branch, it's op_group.

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.

1 participant