Spaces:
Build error
Build error
Download ComfyUI/web/scripts/ui/menu/interruptButton.js from flatcherlee/ioatol1: direct link, hf CLI and curl.
- Browser
- Download file 549 Bytes
-
https://huggingface.co/spaces/flatcherlee/ioatol1/resolve/main/ComfyUI/web/scripts/ui/menu/interruptButton.js
- Command line
-
hf download hf://spaces/flatcherlee/ioatol1/ComfyUI/web/scripts/ui/menu/interruptButton.js
-
curl -L -o interruptButton.js https://huggingface.co/spaces/flatcherlee/ioatol1/resolve/main/ComfyUI/web/scripts/ui/menu/interruptButton.js
549 Bytes
| // @ts-check | |
| import { api } from "../../api.js"; | |
| import { ComfyButton } from "../components/button.js"; | |
| export function getInteruptButton(visibility) { | |
| const btn = new ComfyButton({ | |
| icon: "close", | |
| tooltip: "Cancel current generation", | |
| enabled: false, | |
| action: () => { | |
| api.interrupt(); | |
| }, | |
| classList: ["comfyui-button", "comfyui-interrupt-button", visibility], | |
| }); | |
| api.addEventListener("status", ({ detail }) => { | |
| const sz = detail?.exec_info?.queue_remaining; | |
| btn.enabled = sz > 0; | |
| }); | |
| return btn; | |
| } | |