Skip to content

Commit

Permalink
0.3.1 (hotfix) (#31)
Browse files Browse the repository at this point in the history
* Fix unicode characters in file paths (for real this time)

* Fix dependency manager problem and allow more types of ncnn models

* fix ncnn auto scale extraction on split

* Fix a few ncnn problems

* Fix node double click

* Fix a few bugs

* Fix preview scaling problem on hi dpi displays

* something for later

* Fixed stack images node
  • Loading branch information
joeyballentine authored Mar 10, 2022
1 parent 794df99 commit 7f3b419
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion backend/nodes/image_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,13 +443,17 @@ def run(
imgs = []
max_h, max_w, max_c = 0, 0, 1
for img in im1, im2, im3, im4:
if img is not None:
if img is not None and type(img) != str:
h, w = img.shape[:2]
c = img.shape[2] or 1
max_h = max(h, max_h)
max_w = max(w, max_w)
max_c = max(c, max_c)
imgs.append(img)
# dirty fix for problem with optional inputs and them just being positional
# TODO: make the inputs named instead of positional
elif type(img) == str and img in ["horizontal", "vertical"]:
orientation = img

fixed_imgs = []
for img in imgs:
Expand Down
8 changes: 6 additions & 2 deletions src/helpers/hooks/useSystemUsage.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ const useSystemUsage = (delay) => {
});

// GPU/VRAM
const vramPercent = await ipcRenderer.invoke('get-vram-usage');
setVramUsage(vramPercent);
try {
const vramPercent = await ipcRenderer.invoke('get-vram-usage');
setVramUsage(vramPercent);
} catch (_) {
// Sometimes this will fire before it's done registering the event handlers
}
};

useEffect(() => {
Expand Down

0 comments on commit 7f3b419

Please sign in to comment.