You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
load_image fails on file:// URIs and async_load_image mishandles percent-encoded paths and #, ?, ; in file names #22190
Both functions load the file. ImageMediaIO.load_file and load_audio / async_load_audio already resolve local sources with _normalize_file_uri (strip file://, unquote). The cosmos3 action code (_torch/visual_gen/models/cosmos3/action.py, comment at lines 349-351) also relies on load_image handling file:// URIs.
actual behavior
FileNotFoundError as shown. load_image hands the raw URI string to PIL; async_load_image uses urlparse(...).path without unquoting, which also cuts a bare path at #, ? or ;. default_multimodal_input_loader calls load_image for local image strings, so an offline request with a file:// image fails.
additional notes
A fix with a unit test is ready; PR to follow. No existing issue or PR found (searched load_image, _normalize_file_uri, file:// URI). Open PR #17168 touches the data-URI branch of the same file but not these lines.
Before submitting a new issue...
Make sure you already searched for relevant issues, and checked the documentation and examples for answers to frequently asked questions.
Activity
[#22190][fix] Resolve file:// URIs and special characters in load_ima…