Skip to content

Commit

Permalink
Fix lookup path of comfyUI generated images
Browse files Browse the repository at this point in the history
quickfix by hardcode. Serverstart receives --output-dir variable
Adjust lookup accordingly.
  • Loading branch information
florianesser-tng committed Nov 28, 2024
1 parent 0c11d58 commit e67ca81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WebUI/electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,11 @@ function initEventHandle() {
imagePath = imageUrl.pathname.replace(/^\/*/, '')
} else {
const s = imageUrl.searchParams;
imagePath = `${s.get('type')}/${s.get('filename')}`
imagePath = `static/sd_out/${s.get('filename')}`
}
if (app.isPackaged) {
// Resolve path relative to app when packaged
imagePath = path.join(externalRes, backend, imagePath);
imagePath = path.join(externalRes, 'service', imagePath);
} else {
// Resolve path relative to current directory during development
const cwd = app.getAppPath();
Expand Down

0 comments on commit e67ca81

Please sign in to comment.