comfyanonymous / ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
51.04k stars 5.36k forks source link

How to invoke pop-up windows tips and hide an option in node #4688

Open yaosheng216 opened 3 weeks ago

yaosheng216 commented 3 weeks ago

Your question

Hello, author. Thanks for your works, when developing custom node, i met some problems. How to invoke ComfyUI pop-up windows to tip of user and hide an option in custom node. Wish your answer. Thanks

Logs

No response

Other

No response

christian-byrne commented 2 weeks ago

Add pop-up windows to tip of user:

app.extensionManager.toast.add({
    severity: 'info', // element of ['success', 'info', 'warn', 'error', 'secondary', 'contrast']
    summary: 'Loaded!',
    detail: 'Extension loaded!',
    life: 3000
})

Source:

yaosheng216 commented 2 weeks ago

Ok, thanks for you solution.

yaosheng216 commented 2 weeks ago

@christian-byrne Hi, how to invoke this code in python project. Thanks