fix: different device error on SEGSPaste
This commit is contained in:
@@ -2,7 +2,7 @@ import configparser
|
||||
import os
|
||||
|
||||
|
||||
version_code = [4, 83, 2]
|
||||
version_code = [4, 83, 3]
|
||||
version = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')
|
||||
|
||||
dependency_version = 20
|
||||
|
||||
@@ -177,6 +177,12 @@ class SEGSPaste:
|
||||
|
||||
mask = tensor_gaussian_blur_mask(mask, feather) * (alpha/255)
|
||||
x, y, *_ = seg.crop_region
|
||||
|
||||
# ensure same device
|
||||
mask.cpu()
|
||||
image_i.cpu()
|
||||
ref_image.cpu()
|
||||
|
||||
tensor_paste(image_i, ref_image, (x, y), mask)
|
||||
|
||||
if result is None:
|
||||
|
||||
Reference in New Issue
Block a user