Fix: server fails to load SVG outputs when user has "Preview Format" setting specified (#3734)

This commit is contained in:
Christian Byrne
2025-05-02 10:09:50 -07:00
committed by GitHub
parent 197f33ffcd
commit 23d32282bc
3 changed files with 143 additions and 7 deletions

View File

@@ -273,6 +273,12 @@ export class ComfyApp {
useExtensionService().invokeExtensions('onNodeOutputsUpdated', value)
}
/**
* If the user has specified a preferred format to receive preview images in,
* this function will return that format as a url query param.
* If the node's outputs are not images, this param should not be used, as it will
* force the server to load the output file as an image.
*/
getPreviewFormatParam() {
let preview_format = useSettingStore().get('Comfy.PreviewFormat')
if (preview_format) return `&preview=${preview_format}`