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