Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] cannot import name 'IMG_EXTENSIONS' from 'tools.caption.utils' #356

Closed
eastoc opened this issue Apr 30, 2024 · 3 comments
Closed

[BUG] cannot import name 'IMG_EXTENSIONS' from 'tools.caption.utils' #356

eastoc opened this issue Apr 30, 2024 · 3 comments
Labels

Comments

@eastoc
Copy link
Contributor

eastoc commented Apr 30, 2024

When we run

torchrun --nproc_per_node 1 --standalone -m tools.caption.caption_llava meta_info_fmin1.csv --dp-size 1 --tp-size 1 --model-path llava-v1.6-mistral-7b --prompt video

a error occurs:

cannot import name 'IMG_EXTENSIONS' from 'tools.caption.utils'

We found that the error is an package import error that happened in tools/caption/caption_llava.py

 from .utils import IMG_EXTENSIONS, PROMPTS, VID_EXTENSIONS, Timer, VideoTextDataset, collate_fn

“IMG_EXTENSIONS” and "VID_EXTENSIONS" should be imported from ../datasets/utils.py

The correct revision in caption_llava.py is shown

from .utils import PROMPTS, Timer, VideoTextDataset, collate_fn
from ..datasets.utils import IMG_EXTENSIONS, VID_EXTENSIONS

That had been verified on my machine.

@eastoc
Copy link
Contributor Author

eastoc commented Apr 30, 2024

This bug solved at my fork

https://github.com/eastoc/Open-Sora/blob/main/tools/caption/caption_llava.py

Copy link

github-actions bot commented May 8, 2024

This issue is stale because it has been open for 7 days with no activity.

@github-actions github-actions bot added the stale label May 8, 2024
@zhengzangw
Copy link
Collaborator

fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants