Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -56,7 +56,7 @@ random_seed = 42
|
|
56 |
video_length = 201
|
57 |
W = 1024
|
58 |
H = W
|
59 |
-
device = "cpu"
|
60 |
|
61 |
def get_pipe_image_and_video_predictor():
|
62 |
vae = AutoencoderKLWan.from_pretrained("./model/vae", torch_dtype=torch.float16)
|
@@ -189,7 +189,8 @@ def inference_and_return_video(dilation_iterations, num_inference_steps, video_s
|
|
189 |
images = np.array(images)
|
190 |
masks = np.array(masks)
|
191 |
img_tensor, mask_tensor = preprocess_for_removal(images, masks)
|
192 |
-
mask_tensor
|
|
|
193 |
|
194 |
if mask_tensor.shape[1] < mask_tensor.shape[2]:
|
195 |
height = 480
|
|
|
56 |
video_length = 201
|
57 |
W = 1024
|
58 |
H = W
|
59 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
60 |
|
61 |
def get_pipe_image_and_video_predictor():
|
62 |
vae = AutoencoderKLWan.from_pretrained("./model/vae", torch_dtype=torch.float16)
|
|
|
189 |
images = np.array(images)
|
190 |
masks = np.array(masks)
|
191 |
img_tensor, mask_tensor = preprocess_for_removal(images, masks)
|
192 |
+
print(mask_tensor.shape)
|
193 |
+
mask_tensor = mask_tensor[:,:,:]
|
194 |
|
195 |
if mask_tensor.shape[1] < mask_tensor.shape[2]:
|
196 |
height = 480
|