You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#11085 added a test for checking if there's any graph break or recompilation issue for torch.compiled model.
We should add this test to the most impactful models to ensure our code is torch.compile friendly and has the potential to benefit from it. So far, we test it for FluxTransformer2DModel. Below are some models I have in mind where this test should be added:
HiDreamImageTransformer2DModel (currently doesn't have a test class like other models from src/diffusers/models)
Run the tests locally with RUN_SLOW=1 RUN_COMPILE=1 pytest tests/<PATH_TO_TEST_FILE> -k "test_torch_compile_recompilation_and_graph_break". Make sure the machine has a GPU. Please confirm that this test is passing when opening the PR. In case it doesn't pass let us know.
#11085 added a test for checking if there's any graph break or recompilation issue for
torch.compiled model.We should add this test to the most impactful models to ensure our code is
torch.compilefriendly and has the potential to benefit from it. So far, we test it forFluxTransformer2DModel. Below are some models I have in mind where this test should be added:HiDreamImageTransformer2DModel(currently doesn't have a test class like other models from)src/diffusers/modelsHunyuanVideoTransformer3DTestsWanTransformer3DTestsUNet2DConditionModelTestsSteps to contribute
TorchCompileTesterMixinto the respective model testing file. Like:diffusers/tests/models/transformers/test_models_transformer_flux.py
Line 81 in fb29132
RUN_SLOW=1 RUN_COMPILE=1 pytest tests/<PATH_TO_TEST_FILE> -k "test_torch_compile_recompilation_and_graph_break". Make sure the machine has a GPU. Please confirm that this test is passing when opening the PR. In case it doesn't pass let us know.torch.compile()for impactful models #11430). Tag @sayakpaul and @DN6 for a review. Don't hesitate to ask for guidance/help if needed.@DN6 any model classes I am missing?