ValueError: list.remove(x): x not in list

#9
by Yosun - opened

configuration_florence2.py: 0%| | 0.00/15.1k [00:00<?, ?B/s]
configuration_florence2.py: 100%|██████████| 15.1k/15.1k [00:00<00:00, 129MB/s]
A new version of the following files was downloaded from https://huggingface.co/microsoft/Florence-2-base:

  • configuration_florence2.py
    . Make sure to double-check they do not contain any added malicious code. To avoid downloading new versions of the code file, you can pin a revision.

modeling_florence2.py: 0%| | 0.00/127k [00:00<?, ?B/s]
modeling_florence2.py: 100%|██████████| 127k/127k [00:00<00:00, 3.05MB/s]
Traceback (most recent call last):
File "/home/user/app/app.py", line 70, in
FLORENCE_MODEL, FLORENCE_PROCESSOR = load_florence_model(device=DEVICE)
File "/home/user/app/utils/florence.py", line 31, in load_florence_model
model = AutoModelForCausalLM.from_pretrained(
File "/usr/local/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 558, in from_pretrained
model_class = get_class_from_dynamic_module(
File "/usr/local/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 558, in get_class_from_dynamic_module
final_module = get_cached_module_file(
File "/usr/local/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 383, in get_cached_module_file
modules_needed = check_imports(resolved_module_file)
File "/usr/local/lib/python3.10/site-packages/transformers/dynamic_module_utils.py", line 199, in check_imports
imports = get_imports(filename)
File "/home/user/app/utils/florence.py", line 23, in fixed_get_imports
imports.remove("flash_attn")
ValueError: list.remove(x): x not in list

Sign up or log in to comment