mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-06-25 01:09:24 +08:00
Fix linting
This commit is contained in:
parent
1294041778
commit
4be55acbe4
@ -9,8 +9,7 @@ from torchvision.ops import roi_align
|
||||
|
||||
from comfy.ldm.modules.attention import optimized_attention
|
||||
from comfy.ldm.sam3.tracker import SAM3Tracker, SAM31Tracker
|
||||
from comfy.ldm.sam3.sam import SAM3VisionBackbone # noqa: used in __init__
|
||||
from comfy.ldm.sam3.sam import MLP, PositionEmbeddingSine
|
||||
from comfy.ldm.sam3.sam import SAM3VisionBackbone, MLP, PositionEmbeddingSine
|
||||
|
||||
TRACKER_CLASSES = {"SAM3": SAM3Tracker, "SAM31": SAM31Tracker}
|
||||
from comfy.ops import cast_to_input
|
||||
|
||||
@ -443,17 +443,23 @@ def _capsule_mesh_local(
|
||||
# omit them entirely.
|
||||
cap_r = 0.0
|
||||
body_r = W
|
||||
if n_cap_lat is None: n_cap_lat = 0
|
||||
if n_body is None: n_body = 0
|
||||
if n_lon is None: n_lon = 16
|
||||
if n_cap_lat is None:
|
||||
n_cap_lat = 0
|
||||
if n_body is None:
|
||||
n_body = 0
|
||||
if n_lon is None:
|
||||
n_lon = 16
|
||||
elif str(shape) == "ellipsoid":
|
||||
end_frac = float(min(0.95, max(0.05, end_width_frac)))
|
||||
cap_r = max(1e-7, W * end_frac)
|
||||
body_r = W
|
||||
# Ellipsoid defaults: more body rings to sample the sin(π·u) curve.
|
||||
if n_cap_lat is None: n_cap_lat = 3
|
||||
if n_body is None: n_body = 7
|
||||
if n_lon is None: n_lon = 12
|
||||
if n_cap_lat is None:
|
||||
n_cap_lat = 3
|
||||
if n_body is None:
|
||||
n_body = 7
|
||||
if n_lon is None:
|
||||
n_lon = 12
|
||||
else:
|
||||
raise ValueError(
|
||||
f"_capsule_mesh_local: unknown shape={shape!r} "
|
||||
|
||||
@ -9,6 +9,7 @@ the DWPose face slot).
|
||||
Output: (H, W, 3) fp32 torch.Tensor in [0, 1].
|
||||
"""
|
||||
|
||||
import logging
|
||||
from typing import Any, Dict, Optional, Tuple
|
||||
|
||||
import numpy as np
|
||||
@ -178,7 +179,7 @@ def render_pose_data_openpose(
|
||||
if use_rig_only:
|
||||
face_vert_ids = face_vert_ids[_EYES_MOUTH_IDX]
|
||||
except Exception as e:
|
||||
print(f"[SAM3DBody] face landmarks disabled - {e}")
|
||||
logging.warning(f"[SAM3DBody] face landmarks disabled - {e}")
|
||||
face_vert_ids = None
|
||||
|
||||
hand_dot_color = (
|
||||
|
||||
@ -10,7 +10,6 @@ from comfy.ldm.sam3d_body.model.model import SAM3DBody
|
||||
|
||||
|
||||
import comfy.model_management
|
||||
from comfy_api.latest import io
|
||||
import comfy.utils
|
||||
|
||||
from tqdm import tqdm
|
||||
|
||||
Loading…
Reference in New Issue
Block a user