ZhengPeng7 commited on
Commit
1badd0f
·
1 Parent(s): 7d10348

Fix the bug by latest transformers and update req.txt.

Browse files
Files changed (2) hide show
  1. birefnet.py +2 -1
  2. requirements.txt +16 -0
birefnet.py CHANGED
@@ -2,9 +2,10 @@
2
 
3
  import os
4
  import math
 
5
 
6
 
7
- class Config():
8
  def __init__(self) -> None:
9
  # PATH settings
10
  self.sys_home_dir = os.path.expanduser('~') # Make up your file system as: SYS_HOME_DIR/codes/dis/BiRefNet, SYS_HOME_DIR/datasets/dis/xx, SYS_HOME_DIR/weights/xx
 
2
 
3
  import os
4
  import math
5
+ from transformers import PretrainedConfig
6
 
7
 
8
+ class Config(PretrainedConfig):
9
  def __init__(self) -> None:
10
  # PATH settings
11
  self.sys_home_dir = os.path.expanduser('~') # Make up your file system as: SYS_HOME_DIR/codes/dis/BiRefNet, SYS_HOME_DIR/datasets/dis/xx, SYS_HOME_DIR/weights/xx
requirements.txt ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ torch==2.5.1
2
+ torchvision
3
+ numpy<2
4
+ opencv-python
5
+ timm
6
+ scipy
7
+ scikit-image
8
+ kornia
9
+ einops
10
+
11
+ tqdm
12
+ prettytable
13
+
14
+ transformers
15
+ huggingface-hub>0.25
16
+ accelerate