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

Stable Diffusion V2 with torch FX #2289

Closed
wants to merge 6 commits into from

Conversation

anzr299
Copy link

@anzr299 anzr299 commented Aug 14, 2024

Created a new example notebook which Converts the unet model to an Fx graph and quantized it.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@daniil-lyakhov
Copy link
Contributor

@anzr299, let's finish this notebook up!
As it was found by a performance check, unet should work ok in following conditions:

As my tests shows, int8 version of unet is indeed faster, we could showcase that

@anzr299
Copy link
Author

anzr299 commented Aug 22, 2024

@anzr299, let's finish this notebook up! As it was found by a performance check, unet should work ok in following conditions:

As my tests shows, int8 version of unet is indeed faster, we could showcase that

Sounds good! and yeah I did suspect point #2 since it was always the linear layers which caused the issue but could not find out why it does that. About point #1, are we not supposed to use torch.compile with torch fx models as well?

@daniil-lyakhov
Copy link
Contributor

Please do

  • capture_pre_autograd_graph to capture the GraphModule
  • Quantize model with the ignored scope
  • Compile it the same way it done for fp32 model (torch.compile(..., backend="openvino"))

@anzr299
Copy link
Author

anzr299 commented Aug 22, 2024

Please do

  • capture_pre_autograd_graph to capture the GraphModule
  • Quantize model with the ignored scope
  • Compile it the same way it done for fp32 model (torch.compile(..., backend="openvino"))

Alright

Copy link
Contributor

This PR will be closed in a week because of 2 weeks of no activity.

@github-actions github-actions bot added the Stale label Sep 20, 2024
@github-actions github-actions bot removed the Stale label Sep 25, 2024
Copy link
Contributor

This PR will be closed in a week because of 2 weeks of no activity.

@github-actions github-actions bot added the Stale label Oct 10, 2024
Copy link
Contributor

This PR was closed because it has been stalled for 2 week with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants