Install error

#9
by Fucius - opened

It seems that inference[yolo-world]==0.9.13 cannot be installed using requirements.txt. However, after copying the source code to my project, another error has occurred:

File "/home/user/app/src/efficientvit/models/nn/init.py", line 6, in
from .drop import *
File "/home/user/app/src/efficientvit/models/nn/drop.py", line 9, in
from src.efficientvit.apps.trainer.run_config import Scheduler
File "/home/user/app/src/efficientvit/apps/trainer/init.py", line 5, in
from .base import *
File "/home/user/app/src/efficientvit/apps/trainer/base.py", line 10, in
from src.efficientvit.apps.data_provider import DataProvider, parse_image_size
File "/home/user/app/src/efficientvit/apps/data_provider/init.py", line 5, in
from .augment import *
File "/home/user/app/src/efficientvit/apps/data_provider/augment/init.py", line 6, in
from .color_aug import *
File "/home/user/app/src/efficientvit/apps/data_provider/augment/color_aug.py", line 8, in
from timm.data.auto_augment import rand_augment_transform
File "/usr/local/lib/python3.10/site-packages/timm/init.py", line 2, in
from .layers import is_scriptable, is_exportable, set_scriptable, set_exportable
File "/usr/local/lib/python3.10/site-packages/timm/layers/init.py", line 7, in
from .classifier import ClassifierHead, create_classifier, NormMlpClassifierHead
File "/usr/local/lib/python3.10/site-packages/timm/layers/classifier.py", line 14, in
from .create_act import get_act_layer
File "/usr/local/lib/python3.10/site-packages/timm/layers/create_act.py", line 8, in
from .activations_me import *
File "/usr/local/lib/python3.10/site-packages/timm/layers/activations_me.py", line 105, in
def hard_sigmoid_jit_bwd(x, grad_output):
File "/usr/local/lib/python3.10/site-packages/torch/jit/_script.py", line 1341, in script
fn = torch._C._jit_script_compile(
File "/usr/local/lib/python3.10/site-packages/torch/jit/annotations.py", line 71, in get_signature
signature = try_real_annotations(fn, loc)
File "/usr/local/lib/python3.10/site-packages/torch/jit/annotations.py", line 278, in try_real_annotations
arg_types = [ann_to_type(p.annotation, loc)
File "/usr/local/lib/python3.10/site-packages/torch/jit/annotations.py", line 278, in
arg_types = [ann_to_type(p.annotation, loc)
File "/usr/local/lib/python3.10/site-packages/torch/jit/annotations.py", line 422, in ann_to_type
raise ValueError(f"Unknown type annotation: '{ann}' at {loc.highlight()}")
ValueError: Unknown type annotation: 'Any' at File "/usr/local/lib/python3.10/site-packages/timm/layers/activations_me.py", line 106
@torch .jit.script
def hard_sigmoid_jit_bwd(x, grad_output):
m = torch.ones_like(x) * ((x >= -3.) & (x <= 3.)) / 6.
~~~~~~~~~~~~~~~ <--- HERE
return grad_output * m

Can you help me?

ZeroGPU Explorers org

Hi @Fucius , at the moment, ZeroGPU is not compatible with torch.jit or torch.compile.
If torch.jit.script can't be disabled you can hack things like :

app.py:

import torch
torch.jit.script = lambda f: f
# The rest of your app

Hi @Fucius , at the moment, ZeroGPU is not compatible with torch.jit or torch.compile.
If torch.jit.script can't be disabled you can hack things like :

app.py:

import torch
torch.jit.script = lambda f: f
# The rest of your app

Thanks for the very quick response, it resolved my major trouble. !!!

Sign up or log in to comment