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

add deepfloyd model #1993

Merged
merged 12 commits into from
May 25, 2023
Merged

add deepfloyd model #1993

merged 12 commits into from
May 25, 2023

Conversation

terrancewang
Copy link
Contributor

No description provided.

Copy link
Contributor

@tancik tancik left a comment

Choose a reason for hiding this comment

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

Thanks for adding!

nerfstudio/generative/deepfloyd.py Outdated Show resolved Hide resolved
nerfstudio/generative/deepfloyd.py Show resolved Hide resolved
grad_scaler,
) -> torch.Tensor:
with torch.autocast(device_type="cuda", enabled=False):
image = F.interpolate(image.half(), (IMG_DIM, IMG_DIM), mode="bilinear", align_corners=False)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does IMG_DIM always need to be 64? If not, we might want to add it as an argument.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We're only using the first model of Deepfloyd for SDS, which is trained to generate 64x64 images. Not sure what the results would look like if we used a different image size though.

the other two models in the pipeline are the super resolution models that allow it to generate higher resolution images

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, feel free to ignore my comment

nerfstudio/generative/deepfloyd.py Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

I would make the filename just utils.py. I can imagine more generative util functions in the future, but probably few if any gradient specific utils.

@terrancewang
Copy link
Contributor Author

i tried resolving the last 3 pyright errors but im unsure how to fix the typing for them

Comment on lines 133 to 136
text_embeddings,
image,
guidance_scale,
grad_scaler,
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing types

Copy link
Contributor

@tancik tancik left a comment

Choose a reason for hiding this comment

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

Lgtm

@terrancewang terrancewang merged commit f9a88c5 into main May 25, 2023
4 checks passed
@terrancewang terrancewang deleted the add_deepfloyd branch May 25, 2023 07:14
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.

None yet

2 participants