Skip to content

Conversation

msoolee
Copy link

@msoolee msoolee commented Jun 26, 2025

1. Description of the Change

This pull request addresses a minor inconsistency in the demo script (demo_zero_shot_edit.ipynb).

The autoregressive_infer_cfg_with_mask function was being called with a hardcoded value more_smooth=True, which ignores the more_smooth configuration variable defined at the top of the script. This change replaces the hardcoded literal with the variable, allowing the script's behavior to be controlled by the configuration as intended.

2. Reason for the Change

The current implementation can cause confusion for users. Even if a user sets more_smooth = False to experiment with the model's output, the generation process would still use more_smooth=True. This leads to results that do not match the user's configuration.

This fix ensures the code is more intuitive and behaves as expected, improving the user experience for anyone testing the model.

3. How to Test

  1. In demo_zero_shot_edit.ipynb, set the variable more_smooth = False.
  2. Run the script.
  3. Observe that the model now correctly uses the False value during generation (e.g., by inspecting the model's internal state or observing the output difference).
  4. Set more_smooth = True and confirm that the True value is used.

Thank you for the excellent research and for making the code available to the community!

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.

1 participant