Spaces:
Running
on
Zero
Running
on
Zero
flash attn fix
Browse files
utils.py
CHANGED
@@ -4,7 +4,7 @@ from transformers.dynamic_module_utils import get_imports
|
|
4 |
|
5 |
def fixed_get_imports(filename: str | os.PathLike) -> list[str]:
|
6 |
"""Workaround for flash_attn import issue."""
|
7 |
-
if not str(filename).endswith(("
|
8 |
return get_imports(filename)
|
9 |
imports = get_imports(filename)
|
10 |
if "flash_attn" in imports:
|
|
|
4 |
|
5 |
def fixed_get_imports(filename: str | os.PathLike) -> list[str]:
|
6 |
"""Workaround for flash_attn import issue."""
|
7 |
+
if not str(filename).endswith(("/modeling_florence2.py", "configuration_florence2.py")):
|
8 |
return get_imports(filename)
|
9 |
imports = get_imports(filename)
|
10 |
if "flash_attn" in imports:
|