Spaces:
Runtime error
Runtime error
Download javascript/hires.js from bilegentile/test: direct link, hf CLI and curl.
- Browser
- Download file 629 Bytes
-
https://huggingface.co/spaces/bilegentile/test/resolve/refs%2Fpr%2F3/javascript/hires.js
- Command line
-
hf download hf://spaces/bilegentile/test@refs/pr/3/javascript/hires.js
-
curl -L -o hires.js https://huggingface.co/spaces/bilegentile/test/resolve/refs%2Fpr%2F3/javascript/hires.js
629 Bytes
| function onCalcResolutionHires(width, height, hr_scale, hr_resize_x, hr_resize_y, hr_upscaler) { | |
| const setInactive = (elem, inactive) => elem.classList.toggle('inactive', !!inactive); | |
| const hrUpscaleBy = gradioApp().getElementById('txt2img_hr_scale'); | |
| const hrResizeX = gradioApp().getElementById('txt2img_hr_resize_x'); | |
| const hrResizeY = gradioApp().getElementById('txt2img_hr_resize_y'); | |
| setInactive(hrUpscaleBy, hr_resize_x > 0 || hr_resize_y > 0); | |
| setInactive(hrResizeX, hr_resize_x === 0); | |
| setInactive(hrResizeY, hr_resize_y === 0); | |
| return [width, height, hr_scale, hr_resize_x, hr_resize_y, hr_upscaler]; | |
| } | |