fix: 🐛 bg upscaler in gfpgan
I was just not returning from tensor2np 🦀☠️
This commit is contained in:
+2
-1
@@ -6,4 +6,5 @@ ifnude==0.0.3
|
||||
insightface==0.7.3
|
||||
mmcv==2.0.0
|
||||
mmdet==3.0.0
|
||||
rembg==2.0.37
|
||||
rembg==2.0.37
|
||||
facexlib==0.3.0
|
||||
@@ -73,14 +73,7 @@ def np2tensor(img_np):
|
||||
|
||||
|
||||
def tensor2np(tensor: torch.Tensor) -> np.ndarray:
|
||||
np.clip(255.0 * tensor.cpu().numpy().squeeze(), 0, 255).astype(np.uint8)
|
||||
return np.clip(255.0 * tensor.cpu().numpy().squeeze(), 0, 255).astype(np.uint8)
|
||||
|
||||
|
||||
|
||||
|
||||
def img_tensor_to_np(img_tensor):
|
||||
img_tensor = img_tensor.clone()
|
||||
img_tensor = img_tensor * 255.0
|
||||
return img_tensor.squeeze(0).numpy().astype(np.float32)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user