Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -33,6 +33,15 @@ for fn in ("_prepare_4d_attention_mask_for_sdpa", "_prepare_4d_causal_attention_
|
|
33 |
if not hasattr(mask_utils, fn):
|
34 |
setattr(mask_utils, fn, lambda *a, **k: None)
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
REVISION = "ceaf371f01ef66192264811b390bccad475a4f02"
|
37 |
|
38 |
# Florence-2 로드
|
|
|
33 |
if not hasattr(mask_utils, fn):
|
34 |
setattr(mask_utils, fn, lambda *a, **k: None)
|
35 |
|
36 |
+
cfg_mod = importlib.import_module("transformers.configuration_utils")
|
37 |
+
_PrC = cfg_mod.PretrainedConfig
|
38 |
+
_orig_getattr = _PrC.__getattribute__
|
39 |
+
def _getattr(self, name):
|
40 |
+
if name == "_attn_implementation":
|
41 |
+
return None
|
42 |
+
return _orig_getattr(self, name)
|
43 |
+
_PrC.__getattribute__ = _getattr
|
44 |
+
|
45 |
REVISION = "ceaf371f01ef66192264811b390bccad475a4f02"
|
46 |
|
47 |
# Florence-2 로드
|