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

Update stochastic sampler #673

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

jialusui1102
Copy link
Contributor

Modulus Pull Request

Description

Update stochastic sampler

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.
  • The CHANGELOG.md is up to date with these changes.
  • An issue is linked to this pull request.

Dependencies

@mnabian mnabian assigned mnabian and jialusui1102 and unassigned mnabian Sep 16, 2024
@dallasfoster dallasfoster added the 5 - DO NOT MERGE Hold off on merging; see PR for details label Sep 16, 2024
Copy link
Collaborator

@dallasfoster dallasfoster left a comment

Choose a reason for hiding this comment

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

Small changes requested.

Comment on lines +141 to +148
input,
img_shape_y,
img_shape_x,
patch_shape_y,
patch_shape_x,
batch_size,
overlap_pix,
boundary_pix,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we add the type hints back?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes for sure. Sorry for delay in response, the notification went to my personal email

input.shape[0], input.shape[1], padded_shape_x, padded_shape_y
).cuda()
input.shape[0], input.shape[1], padded_shape_y, padded_shape_x
).to(input.device)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we initialize on the device instead?

Comment on lines +27 to +35
input,
img_shape_y,
img_shape_x,
patch_shape_y,
patch_shape_x,
batch_size,
overlap_pix,
boundary_pix,
input_interp=None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add back type hints

Copy link
Contributor Author

@jialusui1102 jialusui1102 Nov 6, 2024

Choose a reason for hiding this comment

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

Looks good to me

Comment on lines +292 to +310
net,
latents,
img_lr,
class_labels=None,
randn_like=torch.randn_like,
img_shape=448,
patch_shape=448,
overlap_pix=4,
boundary_pix=2,
mean_hr=None,
num_steps=18,
sigma_min=0.002,
sigma_max=800,
rho=7,
S_churn=0,
S_min=0,
S_max=float("inf"),
S_noise=1,
):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Type hints

Copy link
Contributor Author

Choose a reason for hiding this comment

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

looks good to me

Comment on lines +362 to +363
# sigma_max = min(sigma_max, net.sigma_max)

Copy link
Collaborator

Choose a reason for hiding this comment

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

uncomment?

@dallasfoster dallasfoster removed the 5 - DO NOT MERGE Hold off on merging; see PR for details label Oct 29, 2024
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.

3 participants