diff --git a/backend/nodes/pytorch_nodes.py b/backend/nodes/pytorch_nodes.py index ebca40412..1428a5d55 100644 --- a/backend/nodes/pytorch_nodes.py +++ b/backend/nodes/pytorch_nodes.py @@ -397,13 +397,17 @@ def __init__(self): self.sub = "Utility" def run(self, model: torch.nn.Module, directory: str, model_name: str) -> None: - model.eval().cuda() + model = model.eval() + if os.environ["device"] == "cuda": + model = model.cuda() # https://github.com/onnx/onnx/issues/654 dynamic_axes = { "data": {0: "batch_size", 2: "width", 3: "height"}, "output": {0: "batch_size", 2: "width", 3: "height"}, } dummy_input = torch.rand(1, model.in_nc, 64, 64).cuda() + if os.environ["device"] == "cuda": + dummy_input = dummy_input.cuda() torch.onnx.export( model, diff --git a/backend/nodes/utility_nodes.py b/backend/nodes/utility_nodes.py index 78179d1bc..92a3824e2 100644 --- a/backend/nodes/utility_nodes.py +++ b/backend/nodes/utility_nodes.py @@ -66,7 +66,7 @@ class TextAppendNode(NodeBase): def __init__(self): """Constructor""" super().__init__() - self.description = "Perform mathematical operations on numbers." + self.description = "Append different text together using a separator string." self.inputs = [ TextInput("Separator", has_handle=False, max_length=3), TextInput("Text A"), diff --git a/package-lock.json b/package-lock.json index 680b62a34..281974853 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "chainner", - "version": "0.4.2", + "version": "0.4.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "chainner", - "version": "0.4.2", + "version": "0.4.3", "license": "GPLv3", "dependencies": { "@chakra-ui/icons": "^1.0.15", diff --git a/package.json b/package.json index f9644f8f2..89a7d325e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "chainner", "productName": "chaiNNer", - "version": "0.4.2", + "version": "0.4.3", "description": "A flowchart based image processing GUI", "main": ".webpack/main", "scripts": { diff --git a/src/components/inputs/FileInput.jsx b/src/components/inputs/FileInput.jsx index da65f54c0..f9e254b13 100644 --- a/src/components/inputs/FileInput.jsx +++ b/src/components/inputs/FileInput.jsx @@ -1,7 +1,7 @@ /* eslint-disable import/extensions */ /* eslint-disable react/prop-types */ import { - Box, Input, InputGroup, InputLeftElement, VStack, + Box, Input, InputGroup, InputLeftElement, Tooltip, VStack, } from '@chakra-ui/react'; import { ipcRenderer } from 'electron'; import path from 'path'; @@ -42,24 +42,35 @@ const FileInput = memo(({ return ( - - - - - - + + + + + + + + + + {filePath && ( { preview() }