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 custom label (with backward compatible) with ComfyUI and LiteGraph dependencies #849

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MaraScott
Copy link
Contributor

this refers to that issue

comfyanonymous/ComfyUI#3560 (comment)

it goals to add custom label from the py code on node def

custom_label_node

by modifying the code this way

FROM

[...]
    def INPUT_TYPES(s):
        return {"required":
                    {"images": ("IMAGE", ), },
[...]
    RETURN_TYPES = ("IMAGE", "MASK")
[...]

TO

[...]
    def INPUT_TYPES(s):
        return {"required":
                    {"images": ("IMAGE", {"label": "Images (custom label)"}), },
[...]
    RETURN_TYPES = ("IMAGE", "MASK")
    RETURN_LABELS = ("IMAGE (custom label)", "MASK (custom label)")
[...]

with ComfyUI dependency pull-request comfyanonymous/ComfyUI#4940
and litegraph dependcy pull-request Comfy-Org/litegraph.js#150

@huchenlei
Copy link
Member

Can you explain why this change is necessary? Currently you can already specify param name and return values name.

@MaraScott
Copy link
Contributor Author

As far as I know, the input para name will be use in the kwargs so you can't set a param name with spaces in it, same for output when you want to access it via js through links you need a technical name.
This labels adds a UI display which don't get involved in the backend logic.
What do you think?

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.

2 participants