Skip to content

Commit 5ca5bb2

Browse files
fix: update to comfy-env and fix unicode characters
- Replace comfyui-isolation with comfy-env in requirements.txt - Update install.py references from comfyui-isolation to comfy-env - Fix smart quotes in masked_sdpa.py for Windows compatibility - Update comfy-env.toml comment
1 parent 9d8aa90 commit 5ca5bb2

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

comfy-env.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SAM3D Objects - Isolated Environment Configuration
22
#
33
# This file defines the isolated Python environment for SAM3D inference.
4-
# The comfyui-isolation library auto-discovers and loads this file.
4+
# The comfy-env library auto-discovers and loads this file.
55

66
[env]
77
name = "sam3dobjects"

install.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
required for SAM 3D Objects. The environment is completely isolated from
77
ComfyUI's main environment, preventing any dependency conflicts.
88
9-
Uses comfyui-isolation package for environment management.
9+
Uses comfy-env package for environment management.
1010
"""
1111

1212
import sys
@@ -152,20 +152,20 @@ def ensure_vcredist():
152152
# =============================================================================
153153

154154
def ensure_comfy_env():
155-
"""Install comfyui-isolation package if not already installed."""
155+
"""Install comfy-env package if not already installed."""
156156
try:
157157
import comfy_env
158158
return True
159159
except ImportError:
160-
print("[SAM3DObjects] Installing comfyui-isolation package...")
160+
print("[SAM3DObjects] Installing comfy-env package...")
161161
try:
162162
subprocess.check_call([
163163
sys.executable, "-m", "pip", "install",
164-
"git+https://github.com/PozzettiAndrea/comfyui-isolation"
164+
"comfy-env"
165165
])
166166
return True
167167
except subprocess.CalledProcessError as e:
168-
print(f"[SAM3DObjects] Failed to install comfyui-isolation: {e}")
168+
print(f"[SAM3DObjects] Failed to install comfy-env: {e}")
169169
return False
170170

171171

@@ -176,9 +176,9 @@ def main():
176176
print("[SAM3DObjects] WARNING: VC++ Redistributable installation failed.")
177177
print("[SAM3DObjects] Some features may not work. Continuing anyway...")
178178

179-
# Ensure comfyui-isolation is installed
179+
# Ensure comfy-env is installed
180180
if not ensure_comfy_env():
181-
print("[SAM3DObjects] Cannot continue without comfyui-isolation package.")
181+
print("[SAM3DObjects] Cannot continue without comfy-env package.")
182182
return 1
183183

184184
from comfy_env import IsolatedEnvManager, discover_env_config

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ numpy>=1.24.0,<2.0
4747
lightning>=2.0.0
4848

4949
# Process isolation for ComfyUI nodes
50-
comfyui-isolation>=0.2.1
50+
comfy-env>=0.0.11
5151

5252
# Visualization
5353
seaborn>=0.13.0

vendor/sam3d_objects/model/backbone/tdfy_dit/modules/sparse/attention/masked_sdpa.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ def masked_sdpa(q, k, v, q_seqlen, kv_seqlen):
3737
q_seqlen, kv_seqlen, device=q.device, dtype=q.dtype
3838
)
3939

40-
# PyTorchs scaled_dot_product_attention expects a mask broadcastable to
40+
# PyTorch's scaled_dot_product_attention expects a mask broadcastable to
4141
# [batch_size, n_heads, q_len, kv_len]. For a single batch, single head:
4242
attn_mask_4d = attn_mask_2d.unsqueeze(0).unsqueeze(0)
4343
q = q.permute(0, 2, 1, 3) # [N, H, L, C]
4444
k = k.permute(0, 2, 1, 3) # [N, H, L, C]
4545
v = v.permute(0, 2, 1, 3) # [N, H, L, C]
4646

47-
# Now call PyTorch 2.0s built-in SDPA
47+
# Now call PyTorch 2.0's built-in SDPA
4848
# By default, it will automatically apply the "1/sqrt(dim)" scaling internally.
4949
out = F.scaled_dot_product_attention(
5050
query=q,

0 commit comments

Comments
 (0)