Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added 2D-ize back
  • Loading branch information
RunDevelopment committed Apr 7, 2023
commit 682bc7783b9f26296d54353be95b13f69dcdb531
4 changes: 3 additions & 1 deletion backend/src/nodes/properties/inputs/numpy_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ def enforce(self, value):
)

assert value.dtype == np.float32, "Expected the input image to be normalized."
assert c != 1 or value.ndim == 2, "Expected single-channel images to be 2D."

if c == 1 and value.ndim == 3:
value = value[:, :, 0]

return value

Expand Down