mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-09-10 11:35:40 +00:00
Add Hunyuan 3D 2.1 Support (#8714)
This commit is contained in:
committed by
GitHub
parent
a9f1bb10a5
commit
261421e218
29
nodes.py
29
nodes.py
@@ -998,20 +998,31 @@ class CLIPVisionLoader:
|
||||
class CLIPVisionEncode:
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
return {"required": { "clip_vision": ("CLIP_VISION",),
|
||||
"image": ("IMAGE",),
|
||||
"crop": (["center", "none"],)
|
||||
}}
|
||||
return {
|
||||
"required": {
|
||||
"clip_vision": ("CLIP_VISION",),
|
||||
"image": ("IMAGE",),
|
||||
"crop": (["center", "none", "recenter"],),
|
||||
},
|
||||
"optional": {
|
||||
"border_ratio": ("FLOAT", {"default": 0.15, "min": 0.0, "max": 0.5, "step": 0.01, "visible_if": {"crop": "recenter"},}),
|
||||
}
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("CLIP_VISION_OUTPUT",)
|
||||
FUNCTION = "encode"
|
||||
|
||||
CATEGORY = "conditioning"
|
||||
|
||||
def encode(self, clip_vision, image, crop):
|
||||
crop_image = True
|
||||
if crop != "center":
|
||||
crop_image = False
|
||||
output = clip_vision.encode_image(image, crop=crop_image)
|
||||
def encode(self, clip_vision, image, crop, border_ratio):
|
||||
crop_image = crop == "center"
|
||||
|
||||
if crop == "recenter":
|
||||
crop_image = True
|
||||
else:
|
||||
border_ratio = None
|
||||
|
||||
output = clip_vision.encode_image(image, crop=crop_image, border_ratio = border_ratio)
|
||||
return (output,)
|
||||
|
||||
class StyleModelLoader:
|
||||
|
Reference in New Issue
Block a user