Spaces:
Running
Running
Download diffusers-js/src/callable.js from linoyts/Qwen-Image-2.1-WebGPU: direct link, hf CLI and curl.
- Browser
- Download file 387 Bytes
-
https://huggingface.co/spaces/linoyts/Qwen-Image-2.1-WebGPU/resolve/main/diffusers-js/src/callable.js
- Command line
-
hf download hf://spaces/linoyts/Qwen-Image-2.1-WebGPU/diffusers-js/src/callable.js
-
curl -L -o callable.js https://huggingface.co/spaces/linoyts/Qwen-Image-2.1-WebGPU/resolve/main/diffusers-js/src/callable.js
387 Bytes
| // Same pattern as transformers.js: a class whose instances are functions, so `await pipe({...})` calls `_call`. | |
| export class Callable extends Function { | |
| constructor() { | |
| super(); | |
| const closure = function (...args) { return closure._call(...args); }; | |
| return Object.setPrototypeOf(closure, new.target.prototype); | |
| } | |
| _call() { throw new Error("_call not implemented"); } | |
| } | |