This commit is contained in:
PozzettiAndrea
2026-03-10 23:56:09 +01:00
parent dc5e8c4601
commit dd3a7acb2e
4 changed files with 4 additions and 5 deletions
-2
View File
@@ -1,6 +1,4 @@
[pypi-dependencies]
numpy = ">=1.21.0"
pillow = ">=9.0.0"
plyfile = "*"
pillow-heif = ">=0.10.0"
huggingface_hub = ">=0.16.0"
+2 -1
View File
@@ -10,7 +10,6 @@ from pathlib import Path
import numpy as np
import torch
from plyfile import PlyData, PlyElement
from comfy_api.latest import io
@@ -22,6 +21,7 @@ def load_ply_simple(path: str) -> dict:
Returns dict with arrays: positions, colors, scales, rotations, opacities
"""
from plyfile import PlyData
plydata = PlyData.read(path)
vertex = plydata['vertex']
@@ -102,6 +102,7 @@ def save_merged_ply(
elements['rot_2'] = rotations[:, 2]
elements['rot_3'] = rotations[:, 3]
from plyfile import PlyData, PlyElement
el = PlyElement.describe(elements, 'vertex')
PlyData([el]).write(output_path)
+1 -1
View File
@@ -12,7 +12,6 @@ from typing import Any, Literal, NamedTuple
import numpy as np
import torch
from plyfile import PlyData
from . import color_space as cs_utils
from . import linalg
@@ -208,6 +207,7 @@ def convert_rgb_to_spherical_harmonics(rgb: torch.Tensor) -> torch.Tensor:
def load_ply(path: Path) -> tuple[Gaussians3D, SceneMetaData]:
"""Loads a ply from a file."""
from plyfile import PlyData
plydata = PlyData.read(path)
vertices = next(filter(lambda x: x.name == "vertex", plydata.elements))
+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.1"
version = "0.1.2"
license = {file = "LICENSE"}