Merge pull request #40 from PozzettiAndrea/dev

Sync dev to main
This commit is contained in:
Andrea Pozzetti
2026-05-09 18:10:58 +02:00
committed by GitHub
3 changed files with 28 additions and 2 deletions
+26
View File
@@ -15,6 +15,31 @@ from comfy_api.latest import io
log = logging.getLogger("sharp")
def _comfy_tqdm():
"""tqdm that shows download progress in ComfyUI's UI."""
try:
import comfy.utils
import tqdm as _tqdm_mod
except ImportError:
return None
holder = {"pbar": None, "total": 0, "done": 0}
class _T(_tqdm_mod.tqdm):
def __init__(self, *a, **kw):
super().__init__(*a, **kw)
if self.total and self.total > 0 and holder["pbar"] is None:
holder["total"] = self.total
holder["done"] = 0
holder["pbar"] = comfy.utils.ProgressBar(self.total)
def update(self, n=1):
ret = super().update(n)
if n and holder["pbar"] and holder["total"] > 0:
holder["done"] = min(holder["done"] + n, holder["total"])
holder["pbar"].update_absolute(holder["done"], holder["total"])
return ret
return _T
# Try to get ComfyUI models directory
try:
import folder_paths
@@ -165,6 +190,7 @@ class LoadSharpModel(io.ComfyNode):
repo_id=SHARP_REPO_ID,
filename=SHARP_FILENAME,
local_dir=MODELS_DIR,
tqdm_class=_comfy_tqdm(),
)
log.info(f"SHARP config: precision={precision} -> dtype={dtype_str}, path={model_path}")
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "comfyui-sharp"
description = "ComfyUI wrapper around Apple's latest SHARP model (ml-sharp). Monocular 3D Gaussian Splatting in under 1 second. Generate 3D Gaussians from a single image using Apple's SHARP model."
version = "0.1.7"
version = "0.1.8"
license = {file = "LICENSE"}
+1 -1
View File
@@ -1,2 +1,2 @@
comfy-env==0.3.75
comfy-env==0.3.78
comfy-3d-viewers==0.2.44