From 9a02c21a6af44c17c41b0559b94bf118b628d658 Mon Sep 17 00:00:00 2001 From: Apple Date: Mon, 24 Jun 2024 17:25:52 +0530 Subject: [PATCH] bypassing photoroom node --- photoroom.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/photoroom.py b/photoroom.py index a55fe18..9a9d60d 100644 --- a/photoroom.py +++ b/photoroom.py @@ -36,7 +36,9 @@ class TRI3D_photoroom_bgremove_api: dotenv.load_dotenv() # Read the API key from the environment variable - PHOTOROOM_API_KEY = os.getenv('PHOTOROOM_API_KEY') + PHOTOROOM_API_KEY = os.getenv('PHOTOROOM_API_KEY','EMPTY') + if PHOTOROOM_API_KEY == 'EMPTY': + return images def tensor_to_cv2_img(tensor, remove_alpha=False): i = 255. * tensor.cpu().numpy() # This will give us (H, W, C) img = np.clip(i, 0, 255).astype(np.uint8)