Spaces:
Running
on
Zero
Space not working
Hey, you created a great space where we can easily remove bg from videos. Unfortunately it has not been working recently. This is what I get:
runtime error
background/backbones/SwinTransformer.py", line 13, in
from timm.models.layers import DropPath, to_2tuple, trunc_normal
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 1395, in script
fn = torch._C._jit_script_compile(
File "/usr/local/lib/python3.10/site-packages/torch/jit/annotations.py", line 115, in get_signature
signature = try_real_annotations(fn, loc)
File "/usr/local/lib/python3.10/site-packages/torch/jit/annotations.py", line 345, in try_real_annotations
arg_types = [ann_to_type(p.annotation, loc) for p in sig.parameters.values()]
File "/usr/local/lib/python3.10/site-packages/torch/jit/annotations.py", line 345, in
arg_types = [ann_to_type(p.annotation, loc) for p in sig.parameters.values()]
File "/usr/local/lib/python3.10/site-packages/torch/jit/annotations.py", line 513, 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
Container logs:
===== Application Startup at 2024-05-05 21:38:00 =====
Traceback (most recent call last):
File "/home/user/app/app.py", line 8, in
from transparent_background import Remover
File "/usr/local/lib/python3.10/site-packages/transparent_background/init.py", line 1, in
from transparent_background.Remover import Remover, console
File "/usr/local/lib/python3.10/site-packages/transparent_background/Remover.py", line 23, in
from transparent_background.InSPyReNet import InSPyReNet_SwinB
File "/usr/local/lib/python3.10/site-packages/transparent_background/InSPyReNet.py", line 17, in
from transparent_background.backbones.SwinTransformer import SwinB
File "/usr/local/lib/python3.10/site-packages/transparent_background/backbones/SwinTransformer.py", line 13, in
from timm.models.layers import DropPath, to_2tuple, trunc_normal_
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 1395, in script
fn = torch._C._jit_script_compile(
File "/usr/local/lib/python3.10/site-packages/torch/jit/annotations.py", line 115, in get_signature
signature = try_real_annotations(fn, loc)
File "/usr/local/lib/python3.10/site-packages/torch/jit/annotations.py", line 345, in try_real_annotations
arg_types = [ann_to_type(p.annotation, loc) for p in sig.parameters.values()]
File "/usr/local/lib/python3.10/site-packages/torch/jit/annotations.py", line 345, in
arg_types = [ann_to_type(p.annotation, loc) for p in sig.parameters.values()]
File "/usr/local/lib/python3.10/site-packages/torch/jit/annotations.py", line 513, 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
I'd greatly appreciate a fix. Thanks!
thanks you hysts, the issue is now gone and everything is up now.