Skip to content

Conversation

@try1233
Copy link

@try1233 try1233 commented Jan 16, 2026

Description

Added flux2 compatibility to fora, as well as fora torch compile logic. Added CFG logic to fora.

Related Issue

Fixes #(issue number)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Ran it with flux 1dev, flux2klein 4b and flux2klein 4b base to test backwards compatibility, and the compatibility of the backbone_calls_per_step with all three models.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Additional Notes

test_fora_flux2klein.ipynb

@try1233 try1233 requested a review from minettekaum January 16, 2026 17:32
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

model.vae = compile_callable(model.vae, smash_config)
#model.text_encoder = compile_callable(model.text_encoder, smash_config)
#model.text_encoder_2 = compile_callable(model.text_encoder_2, smash_config)
#model.vae = compile_callable(model.vae, smash_config)
Copy link

Choose a reason for hiding this comment

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

Accidentally committed commented-out compilation code

Medium Severity

The compilation of text_encoder, text_encoder_2, and vae in fora_logic has been commented out rather than deleted. The analogous deepcache_logic function still compiles these components (lines 332-333). This appears to be debugging code that was accidentally left in, reducing the optimization benefits of torch_compile when used with FORA-enabled models. The PR description doesn't mention intentionally removing this compilation.

Fix in Cursor Fix in Web

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

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.

2 participants