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

Reorg OSS Diffusion Components to diffusion_labs folder #480

Closed
wants to merge 1 commit into from

Conversation

pbontrager
Copy link
Contributor

Summary:
Based on this proposal to reorganize diffusion components and models under a new diffusion_labs. This is the first in a stack of diffs. This one only reorganizes what's already been moved to OSS.

This is primarily moving files with a couple of changes based on the proposal:

  • predictors.py is split into a separate file per predictor
  • adm is moved out of dalle2 to be it's own model adm_unet
  • Dalle2ImageTransform is moved to dalle2 out of transforms
  • schedule.py is renamed to discrete_guassian_schedule.py and an abstract DIffusionSchedule class was added
  • An abstract adapter class was added to be a generic type and enforce the forward signature
  • An abstract sampler class was added to be a generic type and enforce the forward and generator signature
  • A new dalle2_model unit test was added

Reviewed By: abhinavarora

Differential Revision: D49790849

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 10, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49790849

@codecov-commenter
Copy link

Codecov Report

Attention: 21 lines in your changes are missing coverage. Please review.

Comparison is base (5a0952c) 72.16% compared to head (e98e2cf) 72.58%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #480      +/-   ##
==========================================
+ Coverage   72.16%   72.58%   +0.41%     
==========================================
  Files         187      195       +8     
  Lines       13143    13248     +105     
==========================================
+ Hits         9485     9616     +131     
+ Misses       3658     3632      -26     
Files Coverage Δ
tests/diffusion_labs/test_adapter_cfguidance.py 100.00% <100.00%> (ø)
tests/diffusion_labs/test_adm.py 100.00% <100.00%> (ø)
tests/diffusion_labs/test_adm_blocks.py 100.00% <100.00%> (ø)
tests/diffusion_labs/test_adm_crossattention.py 100.00% <100.00%> (ø)
tests/diffusion_labs/test_common_util.py 100.00% <100.00%> (ø)
tests/diffusion_labs/test_dalle2.py 100.00% <100.00%> (ø)
tests/diffusion_labs/test_diffusion_losses.py 100.00% <100.00%> (ø)
tests/diffusion_labs/test_diffusion_transform.py 100.00% <100.00%> (ø)
tests/diffusion_labs/test_discrete_schedule.py 100.00% <100.00%> (ø)
tests/diffusion_labs/test_predictors.py 100.00% <100.00%> (ø)
... and 32 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@facebook-github-bot
Copy link
Contributor

@pbontrager has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Summary:
Based on this [proposal](https://docs.google.com/document/d/1GtN2urD8PiRr1X4COzvbVbNE8LWRrcoYkAO4v2aogO8/edit) to reorganize diffusion components and models under a new `diffusion_labs`. This is the first in a stack of diffs. This one only reorganizes what's already been moved to OSS.

This is primarily moving files with a couple of changes based on the proposal:
- predictors.py is split into a separate file per predictor
- adm is moved out of dalle2 to be it's own model adm_unet
- Dalle2ImageTransform is moved to dalle2 out of transforms
- schedule.py is renamed to discrete_guassian_schedule.py and an abstract DIffusionSchedule class was added
- An abstract adapter class was added to be a generic type and enforce the `forward` signature
- An abstract sampler class was added to be a generic type and enforce the `forward` and `generator` signature
- A new dalle2_model unit test was added

Differential Revision: D49790849

Pulled By: pbontrager
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49790849

facebook-github-bot pushed a commit that referenced this pull request Oct 11, 2023
Summary:
Based on this [proposal](https://docs.google.com/document/d/1GtN2urD8PiRr1X4COzvbVbNE8LWRrcoYkAO4v2aogO8/edit) to reorganize diffusion components and models under a new `diffusion_labs`. This is the first in a stack of diffs. This one only reorganizes what's already been moved to OSS.

This is primarily moving files with a couple of changes based on the proposal:
- predictors.py is split into a separate file per predictor
- adm is moved out of dalle2 to be it's own model adm_unet
- Dalle2ImageTransform is moved to dalle2 out of transforms
- schedule.py is renamed to discrete_guassian_schedule.py and an abstract DIffusionSchedule class was added
- An abstract adapter class was added to be a generic type and enforce the `forward` signature
- An abstract sampler class was added to be a generic type and enforce the `forward` and `generator` signature
- A new dalle2_model unit test was added

Differential Revision: D49790849

Pulled By: pbontrager

fbshipit-source-id: 98fe40c2418dc542cced940dc761a9cd602b0398
@pbontrager
Copy link
Contributor Author

Already committed but didn't auto close.

@pbontrager pbontrager closed this Oct 11, 2023
@facebook-github-bot facebook-github-bot deleted the export-D49790849 branch November 11, 2023 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants