From 69c83a60dbbcc837c985d34ee5aa23b606d6d156 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Wed, 4 Mar 2026 01:30:40 +0200 Subject: [PATCH] Small fixes --- comfy/supported_models.py | 3 +++ comfy_extras/nodes_rtdetr.py | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/comfy/supported_models.py b/comfy/supported_models.py index 9bc628bc2..6606d27e4 100644 --- a/comfy/supported_models.py +++ b/comfy/supported_models.py @@ -1746,6 +1746,9 @@ class RT_DETR_v4(supported_models_base.BASE): out = model_base.RT_DETR_v4(self, device=device) return out + def clip_target(self, state_dict={}): + return None + models = [LotusD, Stable_Zero123, SD15_instructpix2pix, SD15, SD20, SD21UnclipL, SD21UnclipH, SDXL_instructpix2pix, SDXLRefiner, SDXL, SSD1B, KOALA_700M, KOALA_1B, Segmind_Vega, SD_X4Upscaler, Stable_Cascade_C, Stable_Cascade_B, SV3D_u, SV3D_p, SD3, StableAudio, AuraFlow, PixArtAlpha, PixArtSigma, HunyuanDiT, HunyuanDiT1, FluxInpaint, Flux, LongCatImage, FluxSchnell, GenmoMochi, LTXV, LTXAV, HunyuanVideo15_SR_Distilled, HunyuanVideo15, HunyuanImage21Refiner, HunyuanImage21, HunyuanVideoSkyreelsI2V, HunyuanVideoI2V, HunyuanVideo, CosmosT2V, CosmosI2V, CosmosT2IPredict2, CosmosI2VPredict2, ZImagePixelSpace, ZImage, Lumina2, WAN22_T2V, WAN21_T2V, WAN21_I2V, WAN21_FunControl2V, WAN21_Vace, WAN21_Camera, WAN22_Camera, WAN22_S2V, WAN21_HuMo, WAN22_Animate, WAN21_FlowRVS, WAN21_SCAIL, Hunyuan3Dv2mini, Hunyuan3Dv2, Hunyuan3Dv2_1, HiDream, Chroma, ChromaRadiance, ACEStep, ACEStep15, Omnigen2, QwenImage, Flux2, Kandinsky5Image, Kandinsky5, Anima, RT_DETR_v4] models += [SVD_img2vid] diff --git a/comfy_extras/nodes_rtdetr.py b/comfy_extras/nodes_rtdetr.py index 60c3c9b92..61307e268 100644 --- a/comfy_extras/nodes_rtdetr.py +++ b/comfy_extras/nodes_rtdetr.py @@ -82,16 +82,18 @@ class DrawBBoxes(io.ComfyNode): @classmethod def execute(cls, bboxes, image=None) -> io.NodeOutput: - # Normalise bboxes to a list-of-lists (one list of detections per image). - # It may arrive as: a bare dict, a flat list of dicts, or a list of lists. + # Normalise to list[list[dict]], then fit to batch size B. B = image.shape[0] if image is not None else 1 if isinstance(bboxes, dict): - bboxes = [[bboxes]] * B - elif not isinstance(bboxes, list) or len(bboxes) == 0: - bboxes = [[]] * B - elif not isinstance(bboxes[0], list): - # flat list of dicts: same detections for every image - bboxes = [bboxes] * B + bboxes = [[bboxes]] + elif not isinstance(bboxes, list) or not bboxes: + bboxes = [[]] + elif isinstance(bboxes[0], dict): + bboxes = [bboxes] # flat list → same detections for every image + + if len(bboxes) == 1: + bboxes = bboxes * B + bboxes = (bboxes + [[]] * B)[:B] if image is None: B = len(bboxes)