Skip to content

Add square-symmetry augmentations and sampling fixes#8

Merged
JiamingPan merged 2 commits into
mainfrom
codex/augmentations
Jun 12, 2026
Merged

Add square-symmetry augmentations and sampling fixes#8
JiamingPan merged 2 commits into
mainfrom
codex/augmentations

Conversation

@JiamingPan

Copy link
Copy Markdown
Collaborator

Summary:

  • add RandomRot90 and RandomDihedral2D augmentations for square-symmetry physics augmentation
  • keep RandomFlip config dims as a tuple and add augmentation unit tests
  • make sampling compatible with schedulers whose step() does not accept generator, avoid duplicate EMA symlink failures, and unwrap synthesized EMA models before sampling

Notes:

  • This is intended for CAMELS-style scalar maps where rotations/flips are physical symmetries and should not change the field distribution.
  • I could not run full pytest locally because this machine lacks torch/pytest; please run the existing test suite in the normal cosmo_diffusion environment or CI before merging.

@JiamingPan JiamingPan requested a review from nkern May 17, 2026 18:17
@nkern nkern marked this pull request as ready for review May 18, 2026 02:14
@nkern

nkern commented May 18, 2026

Copy link
Copy Markdown
Owner

thanks for the addition jiaming--will have a look and give comments. fyi--the CI automatically runs pytest and can import torch, and it looks like it passes! but will leave some comments before we merge

Comment thread scripts/cosmodiff_sample.py Outdated

@nkern nkern left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

looks fine to me--just a quick question about the ema_model, otherwise looks good!

@JiamingPan JiamingPan merged commit 1827e11 into main Jun 12, 2026
2 checks passed
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