Download ComfyUI-QwenVL-Mod/web/js/appearance.js from MarkLilly/mis-custom-nodes: direct link, hf CLI and curl.
- Browser
- Download file 1.45 kB
-
https://huggingface.co/MarkLilly/mis-custom-nodes/resolve/main/ComfyUI-QwenVL-Mod/web/js/appearance.js
- Command line
-
hf download hf://MarkLilly/mis-custom-nodes/ComfyUI-QwenVL-Mod/web/js/appearance.js
-
curl -L -o appearance.js https://huggingface.co/MarkLilly/mis-custom-nodes/resolve/main/ComfyUI-QwenVL-Mod/web/js/appearance.js
1.45 kB
| import { app } from "/scripts/app.js"; | |
| const COLOR_THEMES = { | |
| QwenVL: { nodeColor: "#28403f", nodeBgColor: "#374539", width: 340 }, | |
| QwenVLGGUF: { nodeColor: "#474539", nodeBgColor: "#2c4045", width: 340 }, | |
| Tools: { nodeColor: "#28403f", nodeBgColor: "#233238", width: 300 }, | |
| Enhancer: { nodeColor: "#374445", nodeBgColor: "#474539", width: 340 }, | |
| }; | |
| const NODE_COLORS = { | |
| // QwenVL nodes | |
| "AILab_QwenVL": "QwenVL", | |
| "AILab_QwenVL_Advanced": "QwenVL", | |
| "AILab_QwenVL_PromptEnhancer": "Enhancer", | |
| "AILab_QwenVL_GGUF": "QwenVLGGUF", | |
| "AILab_QwenVL_GGUF_Advanced": "QwenVLGGUF", | |
| "AILab_QwenVL_GGUF_PromptEnhancer": "Enhancer", | |
| // Tools | |
| "AILab_QwenVL_PromptLibrary": "Tools", | |
| }; | |
| function setNodeColors(node, theme) { | |
| if (!theme) { return; } | |
| if (theme.nodeColor) { | |
| node.color = theme.nodeColor; | |
| } | |
| if (theme.nodeBgColor) { | |
| node.bgcolor = theme.nodeBgColor; | |
| } | |
| if (theme.width) { | |
| node.size = node.size || [140, 80]; | |
| node.size[0] = theme.width; | |
| } | |
| } | |
| const ext = { | |
| name: "QwenVL.appearance", | |
| nodeCreated(node) { | |
| const nclass = node.comfyClass; | |
| if (NODE_COLORS.hasOwnProperty(nclass)) { | |
| let colorKey = NODE_COLORS[nclass]; | |
| const theme = COLOR_THEMES[colorKey]; | |
| setNodeColors(node, theme); | |
| } | |
| } | |
| }; | |
| app.registerExtension(ext); |