From 963df746d44c0a86cdc2d51e870209b21861702f Mon Sep 17 00:00:00 2001 From: "Mr. For Example" <62230687+MrForExample@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:50:28 -0600 Subject: [PATCH] Fix ComfyUI-Manager Install error --- Gen_3D_Modules/InstantMesh/utils/infer_util.py | 2 +- Gen_3D_Modules/StableFast3D/sf3d/utils.py | 2 +- Gen_3D_Modules/TriplaneGaussian/utils/ops.py | 1 - pyproject.toml | 2 +- requirements.txt | 1 + 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gen_3D_Modules/InstantMesh/utils/infer_util.py b/Gen_3D_Modules/InstantMesh/utils/infer_util.py index f2faf2b..ddc8eb1 100644 --- a/Gen_3D_Modules/InstantMesh/utils/infer_util.py +++ b/Gen_3D_Modules/InstantMesh/utils/infer_util.py @@ -1,6 +1,5 @@ import os import imageio -import rembg import torch import numpy as np import PIL.Image @@ -13,6 +12,7 @@ def remove_background(image: PIL.Image.Image, force: bool = False, **rembg_kwargs, ) -> PIL.Image.Image: + import rembg do_remove = True if image.mode == "RGBA" and image.getextrema()[3][0] < 255: do_remove = False diff --git a/Gen_3D_Modules/StableFast3D/sf3d/utils.py b/Gen_3D_Modules/StableFast3D/sf3d/utils.py index 8f6ea97..044cd9b 100644 --- a/Gen_3D_Modules/StableFast3D/sf3d/utils.py +++ b/Gen_3D_Modules/StableFast3D/sf3d/utils.py @@ -1,7 +1,6 @@ from typing import Any import numpy as np -import rembg import torch from PIL import Image @@ -41,6 +40,7 @@ def remove_background( force: bool = False, **rembg_kwargs, ) -> Image: + import rembg do_remove = True if image.mode == "RGBA" and image.getextrema()[3][0] < 255: do_remove = False diff --git a/Gen_3D_Modules/TriplaneGaussian/utils/ops.py b/Gen_3D_Modules/TriplaneGaussian/utils/ops.py index e1530d2..4a47d80 100644 --- a/Gen_3D_Modules/TriplaneGaussian/utils/ops.py +++ b/Gen_3D_Modules/TriplaneGaussian/utils/ops.py @@ -5,7 +5,6 @@ import torch import torch.nn.functional as F from torch.autograd import Function from torch.amp import custom_bwd, custom_fwd -from pytorch3d import io from pytorch3d.renderer import ( PointsRasterizationSettings, PointsRasterizer) diff --git a/pyproject.toml b/pyproject.toml index c879a64..ddcf166 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-3d-pack" description = "Make ComfyUI generates 3D assets as good & convenient as it generates image/video!" -version = "0.1.3.alpha" +version = "0.1.3" license = { file = "LICENSE" } dynamic = ["dependencies"] [tool.setuptools.dynamic] diff --git a/requirements.txt b/requirements.txt index 926f81b..4f1293e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -31,6 +31,7 @@ peft # for process images & videos rembg +onnxruntime imageio imageio-ffmpeg matplotlib