generate.py ignores EXIF orientation when loading I2V/TI2V conditioning images
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- machine-learning
Research direction
Read generate.py around line 376, where --image is opened and converted to RGB. Check how the loaded image is used for conditioning and TI2V output-size calculation, then compare with the issue’s Pillow reproduction. Done when EXIF orientation is applied before both uses, so the portrait input gives the expected 800×1088 output at the stated size.
Written by the indexing model from the issue text.
Description
At 1ea34ff, generate.py:376 loads --image using:
Image.open(args.image).convert("RGB")
This does not apply EXIF orientation. A portrait JPEG stored with rotated pixels and Orientation=6 therefore supplies sideways conditioning and landscape dimensions.
CPU reproduction from the repository root, using Pillow:
python3 - <<'PY'
from PIL import Image, ImageOps
p = Image.open("examples/i2v_input.JPG").convert("RGB")
exif = Image.Exif()
exif[0x0112] = 6
p.rotate(90, expand=True).save(
"portrait_exif6.jpg", quality=95, exif=exif
)
raw = Image.open("portrait_exif6.jpg").convert("RGB")
upright = ImageOps.exif_transpose(
Image.open("portrait_exif6.jpg")
).convert("RGB")
print("source:", p.size)
print("generate.py loading:", raw.size)
print("orientation applied:", upright.size)
PY
Output:
source: (832, 1104)
generate.py loading: (1104, 832)
orientation applied: (832, 1104)
Expected: apply the orientation before conditioning and output-size calculation. With TI2V and --size '1280*704', these two image dimensions produce 1088×800 and 800×1088 outputs respectively.
Applying ImageOps.exif_transpose before RGB conversion would normalize the input.
Found and reproduced with AI assistance; the repro above was run by me.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Wan-Video/Wan2.2
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Community work submission: DreamX-Creator, a native audio-video system built on the Wan2.2 stackOpen
Difficulty 1/5 1-3 hours Newbie friendliness 62/100
-
Bashar1Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
-
sarah monteiroOpen
Difficulty 5/5 Over a week Newbie friendliness 1/100
-
sarah monteiroOpen
Difficulty 5/5 Over a week Newbie friendliness 1/100
All issues in Wan-Video/Wan2.2
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
MangasMango/bound-to-rot#41 · 1 comment ·
-
breaking change
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
check-skill-pages: show fixture build errors when a build failsPossibly taken @ShahadatTest claimed this today. Opengood first issue P2
Difficulty 1/5 Under an hour Newbie friendliness 85/100
coco-research/coco#439 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
IgniteRobotics/flashpoint#45 ·
Maintainers usually reply within 1 day