Commit ·
e000df2
1
Parent(s): 66fad2f
Add weights option to BiRefNet trained in all different settings.
Browse files58 unmodified lines59606162636458 unmodified lines# Load BiRefNet with chosen weights_weights_file = '/'.join(('zhengpeng7', usage_to_weights_file[weights_file] if weights_file is not None else 'BiRefNet'))print('Change weights to:', _weights_file)birefnet = AutoModelForImageSegmentation.from_pretrained(_weights_file, trust_remote_code=True)birefnet.to(device)birefnet.eval()58 unmodified lines5960616263646558 unmodified lines# Load BiRefNet with chosen weights_weights_file = '/'.join(('zhengpeng7', usage_to_weights_file[weights_file] if weights_file is not None else 'BiRefNet'))print('Change weights to:', _weights_file)print('\t', weights_file, weights_path)birefnet = AutoModelForImageSegmentation.from_pretrained(_weights_file, trust_remote_code=True)birefnet.to(device)birefnet.eval()
app.py+1