Fix: Use config variable for 'more_smooth' parameter to avoid hard-co… #168
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 valuemore_smooth=True
, which ignores themore_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 usemore_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
demo_zero_shot_edit.ipynb
, set the variablemore_smooth = False
.False
value during generation (e.g., by inspecting the model's internal state or observing the output difference).more_smooth = True
and confirm that theTrue
value is used.Thank you for the excellent research and for making the code available to the community!