Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for node/input/output tooltips #287

Merged
merged 4 commits into from
Aug 4, 2024
Merged

Add support for node/input/output tooltips #287

merged 4 commits into from
Aug 4, 2024

Conversation

pythongosssss
Copy link
Member

Vue implementation of node tooltips

src/types/apiTypes.ts Outdated Show resolved Hide resolved
@pythongosssss pythongosssss marked this pull request as ready for review August 4, 2024 15:31
Copy link
Member

@huchenlei huchenlei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@huchenlei huchenlei merged commit 7a980f4 into main Aug 4, 2024
4 checks passed
@huchenlei huchenlei deleted the tooltips branch August 4, 2024 15:54
@huchenlei
Copy link
Member

Ref: backend pr comfyanonymous/ComfyUI#3842

@Amorano
Copy link

Amorano commented Aug 5, 2024

This looks solid. Thank you for moving the tooltip meta field(s). Also thank you for a node tooltip.

I feel the tooltip timeout might be better suited to being adjustable. 500 feels too short (for me) and I like to use 750+ -- seems like an easy setting expose.

thank you for the update and changes!

@Extraltodeus
Copy link

I'm currently testing and I'm not seeing anything appear on any node. Even after restarting the browser (currently firefox) and making sure that the node I was testing was a newly created one.

class EmptyRGBImage:
    @classmethod
    def INPUT_TYPES(s):
        return {"required": { "width": ("INT", {"default": 1024, "min": 1, "max": 16384, "step": 1, "tooltip":"Test"}),
                              "height": ("INT", {"default": 1024, "min": 1, "max": 16384, "step": 1, "tooltip":"Test plop"}),
                              "batch_size": ("INT", {"default": 1, "min": 1, "max": 4096}),
                              "r": ("INT", {"default": 0, "min": 0, "max": 255, "step": 1, "tooltip":"Surely it must be about the red color."}),
                              "g": ("INT", {"default": 0, "min": 0, "max": 255, "step": 1, "tooltip":"A color related to something needing to be touched."}),
                              "b": ("INT", {"default": 0, "min": 0, "max": 255, "step": 1, "tooltip":"The sky, the sea and my heart when you're not here."}),
                              }}
    RETURN_TYPES = ("IMAGE",)
    FUNCTION = "generate"
    CATEGORY = "image"
    def generate(self, width, height, batch_size=1, r=0, g=0, b=0):
        r_normalized = torch.full([batch_size, height, width, 1], r / 255.0)
        g_normalized = torch.full([batch_size, height, width, 1], g / 255.0)
        b_normalized = torch.full([batch_size, height, width, 1], b / 255.0)
        return (torch.cat((r_normalized, g_normalized, b_normalized), dim=-1),)

Am I doing it wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants