-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Diffusion Transformer Training Pipeline #10843
Conversation
abd281c
to
4e22d4e
Compare
931fabc
to
8dde4b8
Compare
# limitations under the License. | ||
|
||
|
||
import math |
Check notice
Code scanning / CodeQL
Unused import Note
|
||
|
||
import math | ||
from typing import Dict, Literal, Optional |
Check notice
Code scanning / CodeQL
Unused import Note
Import of 'Literal' is not used.
Import of 'Optional' is not used.
import math | ||
from typing import Dict, Literal, Optional | ||
|
||
import numpy as np |
Check notice
Code scanning / CodeQL
Unused import Note
|
||
import numpy as np | ||
import torch | ||
import torch.nn.functional as F |
Check notice
Code scanning / CodeQL
Unused import Note
import torch.nn.functional as F | ||
from diffusers.models.embeddings import TimestepEmbedding, get_3d_sincos_pos_embed | ||
from einops import rearrange | ||
from einops.layers.torch import Rearrange |
Check notice
Code scanning / CodeQL
Unused import Note
|
||
import torch | ||
import torch.nn as nn | ||
import torch.nn.functional as F |
Check notice
Code scanning / CodeQL
Unused import Note
|
||
import importlib | ||
import warnings | ||
from dataclasses import dataclass, field |
Check notice
Code scanning / CodeQL
Unused import Note
import numpy as np | ||
import torch | ||
import torch.distributed | ||
from einops import rearrange |
Check notice
Code scanning / CodeQL
Unused import Note
def training_step( | ||
self, data_batch: dict[str, torch.Tensor], iteration: int | ||
) -> tuple[dict[str, torch.Tensor], torch.Tensor]: |
Check notice
Code scanning / CodeQL
Returning tuples with varying lengths Note
tuple of size 2
tuple of size 3
can you fix " |
Signed-off-by: Zeeshan Patel <zeeshanp@berkeley.edu>
Signed-off-by: Zeeshan Patel <zeeshanp@berkeley.edu>
Signed-off-by: Zeeshan Patel <zeeshanp@berkeley.edu>
Signed-off-by: Zeeshan Patel <zeeshanp@berkeley.edu>
Signed-off-by: Zeeshan Patel <zeeshanp@berkeley.edu>
15a23fb
to
f706757
Compare
@ethanhe42 this is fixed now, it should be ready to merge. |
from einops import rearrange | ||
from einops.layers.torch import Rearrange | ||
from megatron.core import parallel_state | ||
from megatron.core.models.common.embeddings.rotary_pos_embedding import get_pos_emb_on_this_cp_rank |
Check notice
Code scanning / CodeQL
Unused import Note
from megatron.core import parallel_state | ||
from megatron.core.models.common.embeddings.rotary_pos_embedding import get_pos_emb_on_this_cp_rank | ||
from megatron.core.transformer.module import MegatronModule | ||
from torch import nn |
Check notice
Code scanning / CodeQL
Unused import Note
seems that one is still failing "Code scanning results / CodeQL" |
What does this PR do ?
Implements end-to-end diffusion transformer (DiT) pretraining / fine-tuning.
Collection: diffusion
Changelog
Usage
Readme contains instructions on how to launch training.
GitHub Actions CI
The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.
The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".
Before your PR is "Ready for review"
Pre checks:
PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.
Who can review?
Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.
Additional Information