NVIDIA / modulus

Open-source deep-learning framework for building, training, and fine-tuning deep learning models using state-of-the-art Physics-ML methods
https://developer.nvidia.com/modulus
Apache License 2.0
836 stars 190 forks source link

Patch-based CorrDiff Integration - 2 #401

Closed tge25 closed 3 months ago

tge25 commented 4 months ago

Modulus Pull Request

Description

Add the option to incorporate the regression's output as an additional conditioning of the diffusion model. Allow arbitrary length of sinusoid positional embedding. Enable learnable positional embedding. Move positional embedding to network architecture Update the config file for patch-based training and generation.

Checklist

Dependencies

mnabian commented 4 months ago

/blossom-ci

mnabian commented 4 months ago

@tge25 CI failed, please black format your code

tge25 commented 3 months ago

Thanks for adding this important feature into main @tge25.

I'm finding the flow of the configuration a bit hard to follow since there are a lot of new conditional statements added. It also seems like there is too much coupling in the code since you needed to add new if statements in the loss, training_loop and datasets.

A feature like positional encoding feature should only need to touch one place in the code ideally. I think this will be less tightly coupled, if we move more of the position encoding logic into the architecture.

Also, doesn't seem like there any new unit tests of the changes to modulus/

Thanks @nbren12 for all the comments. I have cleaned up the code and moved the positional embedding to network architecture. Some unit tests have also been added.

mnabian commented 3 months ago

/blossom-ci

tge25 commented 3 months ago

/blossom-ci

mnabian commented 3 months ago

/blossom-ci

tge25 commented 3 months ago

/blossom-ci

mnabian commented 3 months ago

/blossom-ci

tge25 commented 3 months ago

/blossom-ci

tge25 commented 3 months ago

/blossom-ci

tge25 commented 3 months ago

/blossom-ci

mnabian commented 3 months ago

/blossom-ci