remove interrogate node

Signed-off-by: pants007 <pense007@gmail.com>
This commit is contained in:
pants007
2023-08-13 14:02:06 +02:00
parent b93296c378
commit 3007e6294d
3 changed files with 2 additions and 37 deletions
-2
View File
@@ -3,8 +3,6 @@ This repo contains a number of QoL nodes I made for myself that I figured I may
## Nodes
- Make Square Node
- Will pad an image to make it square with a chosen filling strategy. Sort of like "Resize and fill" from a1111.
- Interrogate Node
- Feed clip-interrogator an image and get its output as a string
- TextEncodeAIO
- Tried to hack StylePile-like (the A1111 extension, shoutout btw) behavior into a ClipTextEncode node, but I'm not sure I'm even doing it right.
## Installation
+2 -4
View File
@@ -1,6 +1,4 @@
from custom_nodes.comfy_pants.nodes import square_image_node, text_encode_aio, interrogate_node
from .nodes import square_image_node, text_encode_aio
NODE_CLASS_MAPPINGS = {
**square_image_node.NODE_CLASS_MAPPINGS,
**text_encode_aio.NODE_CLASS_MAPPINGS,
**interrogate_node.NODE_CLASS_MAPPINGS
}
**text_encode_aio.NODE_CLASS_MAPPINGS}
-31
View File
@@ -1,31 +0,0 @@
from clip_interrogator import Config, Interrogator
import numpy as np
from PIL import Image
class CLIPInterrogator:
@classmethod
def INPUT_TYPES(s):
return {"required": {"image": ("IMAGE",)}}
RETURN_TYPES = ("STRING",)
FUNCTION = "interrogate"
CATEGORY = "STRING"
def interrogate(self, image):
img_np = image.squeeze(0).numpy()
ci = Interrogator(
Config(chunk_size=512, clip_model_name="ViT-L-14/openai"))
img = Image.fromarray((img_np * 255).astype(np.uint8)).convert("RGB")
res = ci.interrogate(img)
return (res,)
NODE_CLASS_MAPPINGS = {
"CLIPInterrogator": CLIPInterrogator,
}
# A dictionary that contains the friendly/humanly readable titles for the nodes
NODE_DISPLAY_NAME_MAPPINGS = {
"CLIPInterrogator Node": "CLIPInterrogator Node"
}