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

Models needing flash_attn aren't working #261

Open
StableLlama opened this issue Aug 14, 2024 · 1 comment
Open

Models needing flash_attn aren't working #261

StableLlama opened this issue Aug 14, 2024 · 1 comment

Comments

@StableLlama
Copy link

Error message:

Loading microsoft/Florence-2-large-ft...
Traceback (most recent call last):
File "/home/abc/StableDiffusion/taggui/taggui/auto_captioning/captioning_thread.py", line 145, in run
raise exception
File "/home/abc/StableDiffusion/taggui/taggui/auto_captioning/captioning_thread.py", line 141, in run
self.run_captioning()
File "/home/abc/StableDiffusion/taggui/taggui/auto_captioning/captioning_thread.py", line 88, in run_captioning
model.load_processor_and_model()
File "/home/abc/StableDiffusion/taggui/taggui/auto_captioning/auto_captioning_model.py", line 143, in load_processor_and_model
self.model = self.get_model()
File "/home/abc/StableDiffusion/taggui/taggui/auto_captioning/auto_captioning_model.py", line 104, in get_model
model = self.transformers_model_class.from_pretrained(
File "/home/abc/StableDiffusion/taggui/venv/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 550, in from_pretrained
model_class = get_class_from_dynamic_module(
File "/home/abc/StableDiffusion/taggui/venv/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 501, in get_class_from_dynamic_module
final_module = get_cached_module_file(
File "/home/abc/StableDiffusion/taggui/venv/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 326, in get_cached_module_file
modules_needed = check_imports(resolved_module_file)
File "/home/abc/StableDiffusion/taggui/venv/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 181, in check_imports
raise ImportError(
ImportError
:
This modeling file requires the following packages that were not found in your environment: flash_attn. Run `pip install flash_attn`

but flash_attn is already installed:

$ pip install flash-attn --no-build-isolation
Requirement already satisfied: flash-attn in ./venv/lib/python3.10/site-packages (2.6.3)
...

Same problem happens with other models that require flash_attn as well.

@leszekhanusz
Copy link

Is it related to transformers issue #28459?

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

No branches or pull requests

2 participants