Spaces:
Running
on
Zero
Running
on
Zero
Update app_3.py
Browse files
app_3.py
CHANGED
@@ -151,7 +151,7 @@ vae = AutoencoderKL.from_pretrained(sd15_name, subfolder="vae")
|
|
151 |
unet = UNet2DConditionModel.from_pretrained(sd15_name, subfolder="unet")
|
152 |
# Load model directly
|
153 |
from transformers import AutoModelForImageSegmentation
|
154 |
-
rmbg = AutoModelForImageSegmentation.from_pretrained("
|
155 |
rmbg = rmbg.to(device=device, dtype=torch.float32) # Keep this as float32
|
156 |
|
157 |
# remove bg
|
|
|
151 |
unet = UNet2DConditionModel.from_pretrained(sd15_name, subfolder="unet")
|
152 |
# Load model directly
|
153 |
from transformers import AutoModelForImageSegmentation
|
154 |
+
rmbg = AutoModelForImageSegmentation.from_pretrained("RMBG-2.0", trust_remote_code=True)#, token=os.getenv('token'))
|
155 |
rmbg = rmbg.to(device=device, dtype=torch.float32) # Keep this as float32
|
156 |
|
157 |
# remove bg
|