mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-21 00:53:45 +08:00
Fix typo
This commit is contained in:
parent
0258521e57
commit
630793cdb2
@ -51,7 +51,7 @@ import comfy.ldm.qwen_image.model
|
|||||||
import comfy.ldm.kandinsky5.model
|
import comfy.ldm.kandinsky5.model
|
||||||
import comfy.ldm.anima.model
|
import comfy.ldm.anima.model
|
||||||
import comfy.ldm.ace.ace_step15
|
import comfy.ldm.ace.ace_step15
|
||||||
import comfy.ldm.rf_detr.rfdetr_v4
|
import comfy.ldm.rt_detr.rtdetr_v4
|
||||||
|
|
||||||
import comfy.model_management
|
import comfy.model_management
|
||||||
import comfy.patcher_extension
|
import comfy.patcher_extension
|
||||||
@ -1920,6 +1920,6 @@ class Kandinsky5Image(Kandinsky5):
|
|||||||
def concat_cond(self, **kwargs):
|
def concat_cond(self, **kwargs):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
class RF_DETR_v4(BaseModel):
|
class RT_DETR_v4(BaseModel):
|
||||||
def __init__(self, model_config, model_type=ModelType.FLOW, device=None):
|
def __init__(self, model_config, model_type=ModelType.FLOW, device=None):
|
||||||
super().__init__(model_config, model_type, device=device, unet_model=comfy.ldm.rf_detr.rfdetr_v4.RTv4)
|
super().__init__(model_config, model_type, device=device, unet_model=comfy.ldm.rt_detr.rtdetr_v4.RTv4)
|
||||||
|
|||||||
@ -675,9 +675,9 @@ def detect_unet_config(state_dict, key_prefix, metadata=None):
|
|||||||
dit_config["audio_model"] = "ace1.5"
|
dit_config["audio_model"] = "ace1.5"
|
||||||
return dit_config
|
return dit_config
|
||||||
|
|
||||||
if '{}encoder.pan_blocks.1.cv4.conv.weight'.format(key_prefix) in state_dict_keys: # RF-DETR_v4
|
if '{}encoder.pan_blocks.1.cv4.conv.weight'.format(key_prefix) in state_dict_keys: # RT-DETR_v4
|
||||||
dit_config = {}
|
dit_config = {}
|
||||||
dit_config["image_model"] = "rf_detr_v4"
|
dit_config["image_model"] = "RT_DETR_v4"
|
||||||
dit_config["enc_h"] = state_dict['{}encoder.pan_blocks.1.cv4.conv.weight'.format(key_prefix)].shape[0]
|
dit_config["enc_h"] = state_dict['{}encoder.pan_blocks.1.cv4.conv.weight'.format(key_prefix)].shape[0]
|
||||||
return dit_config
|
return dit_config
|
||||||
|
|
||||||
|
|||||||
@ -1719,17 +1719,17 @@ class LongCatImage(supported_models_base.BASE):
|
|||||||
hunyuan_detect = comfy.text_encoders.hunyuan_video.llama_detect(state_dict, "{}qwen25_7b.transformer.".format(pref))
|
hunyuan_detect = comfy.text_encoders.hunyuan_video.llama_detect(state_dict, "{}qwen25_7b.transformer.".format(pref))
|
||||||
return supported_models_base.ClipTarget(comfy.text_encoders.longcat_image.LongCatImageTokenizer, comfy.text_encoders.longcat_image.te(**hunyuan_detect))
|
return supported_models_base.ClipTarget(comfy.text_encoders.longcat_image.LongCatImageTokenizer, comfy.text_encoders.longcat_image.te(**hunyuan_detect))
|
||||||
|
|
||||||
class RF_DETR_v4(supported_models_base.BASE):
|
class RT_DETR_v4(supported_models_base.BASE):
|
||||||
unet_config = {
|
unet_config = {
|
||||||
"image_model": "rf_detr_v4",
|
"image_model": "RT_DETR_v4",
|
||||||
}
|
}
|
||||||
|
|
||||||
supported_inference_dtypes = [torch.float16, torch.float32]
|
supported_inference_dtypes = [torch.float16, torch.float32]
|
||||||
|
|
||||||
def get_model(self, state_dict, prefix="", device=None):
|
def get_model(self, state_dict, prefix="", device=None):
|
||||||
out = model_base.RF_DETR_v4(self, device=device)
|
out = model_base.RT_DETR_v4(self, device=device)
|
||||||
return out
|
return out
|
||||||
|
|
||||||
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, 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, RF_DETR_v4]
|
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, 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]
|
models += [SVD_img2vid]
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
from typing_extensions import override
|
from typing_extensions import override
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
from comfy.ldm.rf_detr.rfdetr_v4 import COCO_CLASSES
|
from comfy.ldm.rt_detr.rtdetr_v4 import COCO_CLASSES
|
||||||
import comfy.model_management
|
import comfy.model_management
|
||||||
import comfy.utils
|
import comfy.utils
|
||||||
from comfy_api.latest import ComfyExtension, io
|
from comfy_api.latest import ComfyExtension, io
|
||||||
@ -9,12 +9,12 @@ from torchvision.transforms import ToPILImage, ToTensor
|
|||||||
from PIL import ImageDraw, ImageFont
|
from PIL import ImageDraw, ImageFont
|
||||||
|
|
||||||
|
|
||||||
class RFDETR_detect(io.ComfyNode):
|
class RTDETR_detect(io.ComfyNode):
|
||||||
@classmethod
|
@classmethod
|
||||||
def define_schema(cls):
|
def define_schema(cls):
|
||||||
return io.Schema(
|
return io.Schema(
|
||||||
node_id="RFDETR_detect",
|
node_id="RTDETR_detect",
|
||||||
display_name="RF-DETR Detect",
|
display_name="RT-DETR Detect",
|
||||||
category="detection/",
|
category="detection/",
|
||||||
search_aliases=["bbox", "bounding box", "object detection", "coco"],
|
search_aliases=["bbox", "bounding box", "object detection", "coco"],
|
||||||
inputs=[
|
inputs=[
|
||||||
@ -75,7 +75,7 @@ class DrawBBoxes(io.ComfyNode):
|
|||||||
node_id="DrawBBoxes",
|
node_id="DrawBBoxes",
|
||||||
display_name="Draw BBoxes",
|
display_name="Draw BBoxes",
|
||||||
category="detection/",
|
category="detection/",
|
||||||
search_aliases=["bbox", "bounding box", "object detection", "rf_detr", "visualize detections", "coco"],
|
search_aliases=["bbox", "bounding box", "object detection", "rt_detr", "visualize detections", "coco"],
|
||||||
inputs=[
|
inputs=[
|
||||||
io.Image.Input("image", optional=True),
|
io.Image.Input("image", optional=True),
|
||||||
io.BoundingBox.Input("bboxes", force_input=True),
|
io.BoundingBox.Input("bboxes", force_input=True),
|
||||||
@ -144,14 +144,14 @@ class DrawBBoxes(io.ComfyNode):
|
|||||||
return img
|
return img
|
||||||
|
|
||||||
|
|
||||||
class RFDETRExtension(ComfyExtension):
|
class RTDETRExtension(ComfyExtension):
|
||||||
@override
|
@override
|
||||||
async def get_node_list(self) -> list[type[io.ComfyNode]]:
|
async def get_node_list(self) -> list[type[io.ComfyNode]]:
|
||||||
return [
|
return [
|
||||||
RFDETR_detect,
|
RTDETR_detect,
|
||||||
DrawBBoxes,
|
DrawBBoxes,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
async def comfy_entrypoint() -> RFDETRExtension:
|
async def comfy_entrypoint() -> RTDETRExtension:
|
||||||
return RFDETRExtension()
|
return RTDETRExtension()
|
||||||
Loading…
Reference in New Issue
Block a user