Use fake_score features for DMD2 discriminator losses#17
Open
wlaud1001 wants to merge 1 commit intoNVlabs:mainfrom
Open
Use fake_score features for DMD2 discriminator losses#17wlaud1001 wants to merge 1 commit intoNVlabs:mainfrom
wlaud1001 wants to merge 1 commit intoNVlabs:mainfrom
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I really appreciate the amazing work of bringing together multiple distillation methods into a single unified framework.
While looking through the DMD2 implementation in FastGen, I noticed what seems to be a slight discrepancy from the original paper and reference implementation, so I wanted to submit this PR.
This PR updates DMD2 so that GAN losses use fake_score features instead of teacher features.
Changes:
fake_scorefeatures for generator GAN lossfake_scorefeatures for discriminator real/fake inputsfake_scorefeatures in the R1 perturbation pathfake_scorebackboneteacherremains responsible for producing the x0 target used by VSD.This change is motivated by the DMD2 paper and its reference implementations.
In Section 4.3 of Improved Distribution Matching Distillation for Fast Image Synthesis (NeurIPS 2024), the authors write:
This is also consistent with existing implementations:
fake_unetbottleneck features:https://github.com/tianweiy/DMD2/blob/8d8fa55633d47cfb81bbc7a892e7248f9518763f/main/edm/edm_guidance.py#L185
fake_scoreintermediate features:https://github.com/nvidia-cosmos/cosmos-predict2.5/blob/7e5ffc83fefb2ae1c105c1185cdeb239efb1325c/cosmos_predict2/_src/predict2/distill/models/video2world_model_distill_dmd2.py#L244
If the current use of
teacherfeatures was intentional, I’d appreciate clarification on the intended design.