Spaces:
Paused
Paused
Download Backend/web/scripts/ui/menu/interruptButton.js from Qdssa/good_upscaler: direct link, hf CLI and curl.
- Browser
- Download file 549 Bytes
-
https://huggingface.co/spaces/Qdssa/good_upscaler/resolve/main/Backend/web/scripts/ui/menu/interruptButton.js
- Command line
-
hf download hf://spaces/Qdssa/good_upscaler/Backend/web/scripts/ui/menu/interruptButton.js
-
curl -L -o interruptButton.js https://huggingface.co/spaces/Qdssa/good_upscaler/resolve/main/Backend/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; | |
| } | |