[FIX] correct "pixel shuffle" → "pixel unshuffle" (typo)
This pull request fix the typo in the configuration and usage of the pixel shuffle operation across the InternVL codebase, renaming it to "pixel unshuffle" for clarity and consistency.
According to Issue #727, the original name "pixel shuffle" was a typo — InternVL actually performs unshuffle, consistent with the behavior of PyTorch’s PixelUnshuffle.
This update standardizes argument names, method names, and logging messages, and adds backward-compatibility support to ensure older scripts continue to work seamlessly.
Refactoring and Renaming
- Renamed the argument and configuration field
ps_versiontopixel_unshuffle_versionacross the entire codebase — including model configuration classes, training scripts, and shell scripts — for better clarity and alignment with the actual operation. - Renamed the method
pixel_shuffletopixel_unshuffle, and updated all internal references, logging, and warnings accordingly.
Backward Compatibility and Migration
- Added a deprecated alias
ps_versionforpixel_unshuffle_versionin all relevant training scripts’ argument classes. - Implemented a migration step in
main()that automatically maps the old argument to the new one while issuing a deprecation warning. This ensures that existing configuration files and shell scripts will continue to work without breaking.
Shell Script Updates
- Updated all shell scripts to use
--pixel_unshuffle_versioninstead of--ps_version, ensuring consistent naming between scripts and Python code.
Model Configuration
- Verified that model configuration and instantiation now use
pixel_unshuffle_versionconsistently — both when constructing models from pretrained weights and when building new configurations from scratch.
Logging and Documentation
- Updated all logging statements and messages to reflect the new
pixel_unshuffle_versionfield. - Clarified comments and docstrings to accurately describe the operation as pixel unshuffle.
Summary
These changes collectively improve code clarity, reduce potential confusion around the operation performed, and maintain full backward compatibility for existing users and scripts.
⚠️ Note on Pre-Commit Linting
According to the contribution manual, I should run the pre-commit linter before submission. However, the current repository is not consistently linted — running pre-commit modifies many unrelated files. Please review this before merging, as I’ve intentionally avoided unrelated formatting changes to keep this PR clean and focused.