Spaces:
Paused
Paused
quick fix in init_state
Browse files
app.py
CHANGED
|
@@ -174,8 +174,6 @@ def preprocess_video_in(
|
|
| 174 |
input_labels,
|
| 175 |
inference_state,
|
| 176 |
):
|
| 177 |
-
predictor.to("cpu")
|
| 178 |
-
inference_state["device"] = predictor.device
|
| 179 |
if video_path is None:
|
| 180 |
return (
|
| 181 |
gr.update(open=True), # video_in_drawer
|
|
@@ -229,6 +227,7 @@ def preprocess_video_in(
|
|
| 229 |
input_points = []
|
| 230 |
input_labels = []
|
| 231 |
|
|
|
|
| 232 |
inference_state = predictor.init_state(
|
| 233 |
offload_video_to_cpu=True,
|
| 234 |
offload_state_to_cpu=True,
|
|
|
|
| 174 |
input_labels,
|
| 175 |
inference_state,
|
| 176 |
):
|
|
|
|
|
|
|
| 177 |
if video_path is None:
|
| 178 |
return (
|
| 179 |
gr.update(open=True), # video_in_drawer
|
|
|
|
| 227 |
input_points = []
|
| 228 |
input_labels = []
|
| 229 |
|
| 230 |
+
predictor.to("cpu")
|
| 231 |
inference_state = predictor.init_state(
|
| 232 |
offload_video_to_cpu=True,
|
| 233 |
offload_state_to_cpu=True,
|