Skip to content

Releases: chaiNNer-org/chaiNNer

Alpha v0.12.0

04 Sep 15:06
Compare
Choose a tag to compare

AMD users rejoice: a long-awaited, highly requested feature is finally here: PyTorch to NCNN conversion! @theflyingzamboni did a wonderful job converting the original onnx2ncnn C++ code into python code in order to make this happen. Under the hood, we're converting from PyTorch to ONNX to NCNN (which you can still do if you want to), but we also have direct PyTorch to NCNN conversion for convenience. This means no more needing to convert to ONNX and use convertmodel.com! It can all be done in chaiNNer. Note: Make sure you have up-to-date NCNN and ONNX packages from the dependency manager in order for this to work properly

The other big thing this release is SwinIR support (for PyTorch). I've wanted to add this architecture for a while and I finally got around to it. It is a really good Super Resolution architecture with lots of great pretrained models to use. Ideally, we support every variation of SwinIR model (with all the params auto-detected), but if any of the SwinIR models give you an error please let me know and I'll try to resolve it. One weird thing about SwinIR is that it actually doesn't support fp16, so that will be automatically disabled when using this arch (so that means no fp16 speed-up). It also doesn't support conversion to NCNN, as NCNN does not support all the operations required for the architecture. Next-up architecture additions: GFPGAN and HAT (no ETA on these yet though).

I've also reworked how the PyTorch auto-tiling works. After some experimenting, I was able to use the VRAM estimations I added a while back in the logging (with a bit of added safety) instead of the old try/catch splitting method. This yielded a significant performance boost for PyTorch upscaling in general, though only when upscaling with GPU. CPU upscaling is unaffected by this change.

I've also done a bit to reduce some of the RAM overhead we previously had. Before, we weren't clearing out our internal output cache until after the entire chain was finished processing. This caused RAM usage to build up significantly for large chains, especially with large images. Now, we clear out things we no longer need so that RAM usage stays as low as possible at all times.

There's also a lot more added in this release, so here is the full changelog:

Dependency Updates

  • NCNN
    • There isn't actually an NCNN update this version, however this is a reminder that if you haven't updated since before v0.11, you should update for this release as otherwise NCNN upscaling will not work.
  • ONNX
    • Updated the version to support python 3.10 finally (if using system python with 3.10)
    • Added another required package that will need to be installed
    • Required to convert to NCNN

New Features

  • PyTorch -> NCNN conversion & ONNX -> NCNN conversion (#721) (#845) (thanks @theflyingzamboni)
    • PyTorch models can now be converted to NCNN models.
  • ONNX interpolation (#762) (thanks @theflyingzamboni)
    • Interpolate two of the same kinds of ONNX models the same way you would with PyTorch or NCNN
  • SwinIR support (#812) (#850) (#878)
  • RAM usage optimizations (#834) (#860)
  • PyTorch optimizations (#863) (#871)
  • Added a warning when modifying the chain during an execution (#843)
  • PyTorch model file iterator (#877)
    • Iterate through a directory and load every .pth model in it, like you would an image file iterator.
  • Add toggle for checking for an update on startup (#875) (thanks @jumpyjacko)
  • Node execution times now display on the bottom right corner of nodes (#882)

Change to Existing Features

  • "Tile Size Target" input changed to "Number of Tiles" (#720)
    • I found that the previous "Tile Size Target" was not clear about what it does or that there was auto tiling involved. Now it has been changed to a dropdown with a default "Auto" setting.
  • All string inputs now accept number inputs (#853)
  • Iterator indexes are now number outputs (#854)
  • Changed the NCNN icon to reflect their actual logo (#868)
  • Added favorites to the node selection context menu (#881)

New Nodes

  • Canny Edge Detection node (#869) (thanks @jumpyjacko)
    • Run edge detection on an image
  • (ONNX) Convert to NCNN
  • (PyTorch) Convert to NCNN
  • (PyTorch) Model File Iterator

Bug Fixes

  • Fixed backend not closing on exit on macOS (#879)
  • Fixed bugs with grayscale image upscaling (#829) (#842) (thanks @theflyingzamboni)
  • Fixed viewport position & zoom not loading properly in certain scenarios (#870)
  • Fixed iterator resuming after pausing (#884)
  • Fixed Blend node bugs (#887) (thanks @theflyingzamboni)

Alpha v0.11.6

30 Aug 00:17
Compare
Choose a tag to compare

Back with another bugfix update. This might be the most patch updates I've done for a version yet! v0.12.0 is still in progress but I hope to be able to release that soon. Anyway, onto the changelog:

Dependency Updates

  • NCNN (#864)
    • Semi-fixed the black-output issue AMD users were receiving when using the automatic tiling mode. For the most part, this seems to be fixed, however, I have been told it does break occasionally still. If this happens, just restart chaiNNer and it should work again.

Bug Fixes:

  • Fixed error messages not displaying (#866)
  • Fixed directory outputs for Load Model nodes (#862)

Other

  • Improved the labels of items in the Help menu (#865)

Alpha v0.11.5

28 Aug 02:51
Compare
Choose a tag to compare

Another patch update is here! v0.12.0 is right around the corner, but for now, v0.11.5 brings a few fixes.

Dependency Updates

  • NCNN (#855)
    • I finally got arm64 (M1) macOS builds for ncnn-vulkan (my fork of NCNN) working. This means NCNN should now install properly on M1 macbooks. If it doesn't, or doesn't work at all, please let me know and I will try to resolve it.
    • I also got it to statically compile (I think so, at least) libomp. This means that (hopefully) no mac user will get the missing libomp library error anymore.
    • Remember to update if you haven't in a while. Starting with v0.12.0, changes made in the version that came with v0.11.0 will be required for NCNN upscaling to work.

Bug Fixes

  • Fixed iterator progress bars not working (#839)
  • Fixed an issue where the View Image creation shortcut button on image outputs wouldn't make new View Image nodes if one had already been created, regardless of if one was attached to the output that you clicked the button on (#841)
  • Restored missing node shadow (#840)
  • Fixed ONNX Save Model icon (#846)

Changes to Existing Features

  • Allow negative cropping in crop nodes (#844)
    • This crops from the center of the image rather than off the edges. I figured why not allow it as it might be useful.
  • Remove presets tab placeholder (#851)
    • The presets tab has been a placeholder since I started working on chaiNNer. Eventually presets will come, but for now we might as well get rid of the tab as it only serves to add confusion.
  • Add index outputs to Image File Iterator and Spritesheet Iterator (#852)
    • It was brought to my attention that these lacked an index output like the Video Frame Iterator has. This is useful for outputting files with the indices attached to the file name.

Known issues

  • "Failed to fetch" on macOS < 10.15. This is a known issue caused by opencv not being compiled for these older macOS versions. I have brought this up with the opencv team, and they were receptive to lowering the version target. So, there isn't anything I can do about this right now, but as soon as they release an update with a lower build target I will update the version chaiNNer uses.
  • Iterators are apparently being a bit finicky for some users. I also noticed that pausing and resuming doesn't quite work right anymore for them. We are investigating.
  • ONNX cannot be installed on M1 MacBooks. This is a known issue as ONNX does not have an arm64 version. There is nothing I can do about this.
  • Lots of RAM usage. This is partially due to the caching chaiNNer does (which I have partially fixed already, and the fix will be available in v0.12.0) as well as the fact that many users (particularly macOS ones) have been upscaling with CPU. There is no way around the RAM usage caused by CPU upscaling.

Alpha v0.11.4

23 Aug 21:52
Compare
Choose a tag to compare

Another round of bugfixes here. It's been very difficult to track down and fix these remaining macOS issues as I do not have a device that can replicate them. However, The main crashes should hopefully be fixed now. Please let us know if they are still happening. NCNN and ONNX still cannot be installed on M1 devices, but I'm working on getting NCNN compiled properly.

Side note, if you see an error in the logs about missing libomp and you have brew, you should be able to install it by typing brew install libomp. This is an issue with how NCNN is compiled that I'm hopefully fixing with the next ncnn_vulkan update, but we'll see. If it ends up not working, I may have to compile NCNN with static linking from now on.

Anyway, onto the changelog:

Dependency updates:

  • OpenCV, NumPy, and Pillow have been updated to their latest versions. This will happen the first time you start up chaiNNer after this update, so you don't even have to do anything yourself. The main point here was to update OpenCV to see if the newest version fixes an issue on macOS versions less than 10.15. Worst case, it will not be able to be installed on anything below 11 now (I hope not) but best case it should be able to be installed by everyone. Guess we'll find out. (#809)

Bug Fixes:

  • Fix a crash on macOS from trying to load content in a window that was no longer available (#815)
  • Fix opening a .chn file from CLI not working (#805) (thanks @RunDevelopment)
  • Fix dark/light mode switching lag as well as light mode being broken (#724) (thanks @RunDevelopment)

Alpha v0.11.3

21 Aug 03:43
Compare
Choose a tag to compare

This is another bugfix release. Hopefully the main issue for macOS users on macOS 10 is fixed. Thanks @RunDevelopment for all of these fixes.

Bug Fixes:

  • Fixed 'get-port' handler startup crash for users on macOS 10 (Most likely for real this time) (#793)
  • Fixed NCNN's Load Model node causing multiple undo states on model select (#795)
  • Fix race condition in NCNN's Load Model node to ensure the cached loaded models are always correct (#796)

Other

  • Made image previews not use loading animation. They now show the old image until the new one is ready (#789)

Alpha v0.11.2

19 Aug 16:31
Compare
Choose a tag to compare

This release is purely intended to fix some of the issues people have been experiencing with macOS. If you were having problems before, please try this release out and let me know if you're still having issues, or run into any new ones.

Bug Fixes

  • Fixed 'get-port' handler startup crash for users on macOS 10 (Probably, at least. Can't test this myself) (thanks @RunDevelopment)
  • Fixed critical error startup crash for users on macOS.
  • Fixed PyTorch not installing correctly on macOS.
  • Fixed Python version number getting set to "unknown" on macOS.

Alpha v0.11.1

18 Aug 04:50
Compare
Choose a tag to compare

This release contains some new features and bug fixes.

Features:

Bug Fixes:

  • Fixed category icons in the pane context menu appearing as question marks
  • Fixed Load Image improperly erroring for corrupt images (thanks @RunDevelopment)
  • Fixed install hints showing because of search queries (thanks @RunDevelopment)

Alpha v0.11.0

14 Aug 16:26
Compare
Choose a tag to compare

This update took a lot longer than expected, but I think it will be worth the wait.

You can finally preview images inside chaiNNer without having to open an external program! It's not a fully-fledged built-in image viewer (yet), but rather a node that will show an image preview similar to how Load Image has always done it. Part of this feature included reworking how previews work in general, so you'll see that the previews for both Load Image and PyTorch's Load Model now appear on the outputs of the node rather than the input. This is due to the fact that we now automatically run valid "starting" nodes (nodes with no ability to create input connections) and use their outputs for setting types and showing previews (if applicable). This means we now allow more data to be automatically typed and previewed through the type system as well, meaning things like file name and directory outputs now are previewed via the type previews.

You'll also notice this happens in iterators. The new View Image node allows you to preview the input of iterators, something which was not possible before. And, due to the other outputs types being set, you can see in real-time other information being updated (if you use it in the chain).

Anyway, onto the full changelog:

Dependency Updates:

  • NCNN
    • This update brings the latest NCNN fixes and optimizations to chaiNNer. I'm not entirely sure what those are or if they're relevant, but you should definitely update as this version will be required starting with the next major chaiNNer update.

New Features

  • Output Previews
    • Some outputs now have previews that replace the old preview system.
    • Some outputs now set types when they weren't before.
    • All image outputs (that don't have a built-in preview) now have a "preview" button to easily create a View Image node for that output.
    • Outputs previews are processed in another thread to avoid slowing down node execution (thanks @RunDevelopment)
  • F5, F6, and F7 now perform "Run", "Pause", and "Stop" respectively.
  • Pressing tab in the node selector panel now cycles through the nodes list.
  • Pressing enter on a highlighted node in the selector panel will create it.
  • The file open dialog now has an "All Files (*)" filter.
  • "Export for Sharing" menu option
    • Save a chain without any file inputs or directory inputs, to avoid leaking your filepaths when sharing .chn files with others
  • Input type tags (thanks @RunDevelopment)
    • Nodes with certain input restrictions now have those restrictions shown as type tags

Changes to Existing Features

  • Interpolation nodes now output their amounts. This can be useful for making labels with the amounts of each model.
  • Added output type to Rotate Image node (thanks @RunDevelopment)
  • Added output type to Add Caption node (thanks @RunDevelopment)
  • Renamed "Start" to "Run" to better describe the function of that button.
  • Menu items are now disabled when an alert box is open.
  • Merge Channels node is now officially deprecated. (thanks @RunDevelopment)
  • Change "Block Size" to "Block Radius" for Adaptive Threshold.
  • Improved descriptions for many nodes.
  • Blend Images node performance improvements (thanks @RunDevelopment)
  • The selector panel will un-collapse if the search bar is interacted with in collapse mode (thanks @RunDevelopment)
  • Dependency manager UI improvements (thanks @RunDevelopment)
  • Image File Iterator now processes files alphabetically

New Nodes

  • View Image
    • Takes in any image input and displays it in the chain
  • View Image (External)
    • This is the old Preview Image node, renamed
  • Invert Color
    • Inverts the colors of an image

Bug Fixes

  • Disable context menu on disabled directory and file inputs (thanks @RunDevelopment)
  • Fixed math node inputs not allowing decimals (thanks @RunDevelopment)
  • Fixed issue that would cause the system PYTHONHOME environment variable to override chaiNNer's integrated python path.
  • Fixed opened file name being lost on page reload.
  • Fixed ".tif" (one f) files not being recognized when opening an image.
  • Node animation status no longer is put in undo state (thanks @RunDevelopment)
  • Fixed visual bug on node selector panel button outlines (thanks @RunDevelopment)

Alpha v0.10.1

19 Jul 03:23
Compare
Choose a tag to compare

This update brings a much needed quality of life feature that's been missing from chaiNNer for quite a while now: the ability to drag nodes that are already placed down into iterators. I have seen lots of confusion among people new to chaiNNer that did not realize you needed to drag and drop from the selection panel into the iterator in order to use it properly. Now, that is no longer a concern.

Now, you can drag any node into the iterator area and it will automatically be placed inside the iterator. You can even select and drag multiple nodes in at once, meaning you can now convert an existing chain into an iterable chain fairly easily. To get a node out of an iterator, a new option has been added to the right-click context menu to "release" the node from the iterator. It will then be placed outside the iterator for you to use there.

I really hope this makes using iterators a lot less painful.

This update comes with some more stuff as well, so here's the full changelog:

New Features

  • Dragging existing nodes into iterators
    • Existing nodes can now be dragged into the iterator editor instead of new nodes needing to be dragged in
    • Nodes that are in an iterator can now be released from the right-click context menu
  • Type-based controlled inputs (thanks @RunDevelopment)
    • Now when you connect certain outputs to inputs, it will show the computed value of that input in the disabled input area rather than the placeholder text.
  • Note nodes now remember their resized size
  • Ctrl/Cmd+A now selects all nodes & connections

New Nodes

  • Spritesheet Iterator
    • Not exactly what was suggested for me to make but I thought it would be useful anyway. This iterator takes a spritesheet image, the number of rows, and the number of columns, and iterates over each of the sub-images. This can be very useful if you have a spritesheet you want to upscale the individual items of instead of the whole thing at once.
  • Gamma Adjust node (thanks @RunDevelopment)

Changes to Existing Features

  • Faster node searching (thanks @RunDevelopment)
    • Searching in both the node selection panel as well as the node selection context menu should be much faster now thanks to using a more optimized regex library
  • Improved types on some nodes (thanks @RunDevelopment)
  • Added Gray -> RGBA colorspace conversion (thanks @theflyingzamboni)

Bug Fixes

  • Fixed an issue with resizing iterators where the old size would flash for a very brief moment after releasing the resize handle
  • Fixed node sorting in node selection context menu (thanks @RunDevelopment)
  • Fixed colorspace conversions in the Convert Colorspace node that were previously broken (thanks @RunDevelopment)
  • Fixed sliders not being disabled when connected (thanks @RunDevelopment)
  • Fixed an error that would happen if iterator auto-input nodes were not connected to anything

Alpha v0.10.0

14 Jul 22:51
Compare
Choose a tag to compare

chaiNNer screenshot small

This is a pretty exciting update for chaiNNer! The first thing you might notice is all the new colors, but it's a lot more than just a new look. As a result, I will be going over this changelog in a bit more detail than usual.

New Type System

This update features a major overhaul of types. If you aren't a programmer or just aren't familiar with types, they're the reason chaiNNer doesn't let you connect an image output to a model input. Model and images are different types, so they aren't compatible. Previously, types were extemely simple. Without getting too technical, types were simply the name of the type (e.g. model or image) and types were compatible if they had the same name. Now, chaiNNer has a brand new type system called "Navi" with set-theorey-based types. These types are much more powerful and enable lots of things that would have been impossible before. E.g. inputs can now accept multiple types, and image inputs can now require the connected image to have a certain number of channels (e.g. RGB or RGBA). Per-node validation has also been improved, and now we are able to show you the output size of almost every image output without even having to run anything.

So you might be wondering to yourself: "I didn't even know types were a thing before, I just kept trying to connect things and guessing what went where. How exactly does this make anything better for me?"

Well, wonder no more. Each handle now has a dedicated color for each main type. This means that with a quick glance, you can now see what can be connected to what. E.g. images are yellow, numbers are blue, PyTorch models are orange. It should be pretty easy now to be able to see what can be connected where. Furthermore, as soon as you start dragging a connection out, any incompatible connections turn gray and slightly transparent. This way, you will always 100% know what is connectable and what isn't.

And speaking of connecting things easily...

Node Selector Context Menu

A highly requested feature, chaiNNer now has a context menu that will show up both when right-clicking in the blank space of the editor, as well as when dragging a connection from a node to the blank space. This context menu allows you to quickly find a node to place at that position, and automatically connect it (in the case of dragging a connection to the canvas). It also filters the node list automatically based on the type of the input or output you dragged from! It makes setting up chains far easier than before, to the point where I've been told by someone it makes the regular node selection panel obsolete for them. I highly recommend you play around with this, as it really can speed up making a chain.

Disabling Nodes

Another big new feature is the ability to disable nodes. You may notice now that every node has a little toggle in the bottom left corner (as well as an entry in the right-click context menu) for disabling/enabling a node. Disabling a node will prevent it from running in the chain, so now you can have floating nodes not connected to anything without worrying about getting errors. Disabling a node will also disable any nodes connected downstream from it, so it should be pretty easy now to temporarily turn off parts of a large chain.

Full Changelog:

New Features

  • UI Redesign
    • Both dark mode and light mode have some coloring & shading changes that make chaiNNer look a lot better (especially light mode).
    • Node headers now have an accent color gradient, making nodes of different categories easier to differentiate.
    • Running edges now feature a moving "chain" design rather than a traditional "crawling ants" design.
  • Input & Output type colors on handles
    • Input and output handles are now colored according to their types
    • When connecting, invalid connections are now grayed out and semi-transparent
  • Node selection context menu
    • Right-click in the editor to open the pane, or drag a connection out to nothing
  • Disabling nodes (thanks @RunDevelopment)
    • Disable nodes and their downstream connections
  • Node outputs now show special type information in "type tags" (thanks @RunDevelopment)
  • Some nodes will now show type-related warning messages in the footer validation (thanks @RunDevelopment)
  • New type system (thanks @RunDevelopment)
    • The new internal system for handling input & output types that enables all the new type-related features to happen
  • Allow numbers in some text inputs (thanks @RunDevelopment)
  • "Copy File Name" and "Copy Full File Path" context menu entries on file selecting nodes (thanks @RunDevelopment)
  • Optional inputs now have an indicator
  • Edge "running" animations can now be disabled in settings to decrease CPU usage (thanks @RunDevelopment)
  • Remember node selector panel collapse state (thanks @RunDevelopment)
  • Running nodes now show a spinner in the footer to help show if a node is still running or not
  • Allow selecting multiple nodes by holding down control (command on macOS)

New Nodes

  • Text Pattern (thanks @RunDevelopment)
    • Allows complex text formatting in a more versatile way than Text Append
  • Crop (Content) (thanks @theflyingzamboni)
    • Automatically crop an image with transparency to the opaque bounds
  • Get Model Scale (thanks @RunDevelopment)
    • Similar to Get Dimensions, this allows you to get the scale of a model to use as a number or text
  • ONNX Save Model (thanks @theflyingzamboni)
    • Since Convert To Onnx now converts directly to an ONNX model, this node is now necessary to save it.

Changes to existing features

  • Convert To Onnx now converts directly to an ONNX model without having to go through a file first (thanks @theflyingzamboni)
  • Added "tile size target" to NCNN's Upscale Image node
    • This is completely optional (leave at 0 for current behavior), but allows people to bypass the auto-tiling when it gives them issues (mainly for some AMD users)
  • Added "Fill color" dropdown for Shift node (thanks @theflyingzamboni)
  • Added "Tile mode" option to Tile Fill node (thanks @RunDevelopment)
  • ONNX upscaling now supports NHWC-shape models instead of only NCHW-shape
  • Nodes inside of an iterator now have a slightly different header border, which should make them easier to tell them apart when zoomed out.

Bug Fixes

  • Fixed chains not loading the saved viewport position
  • Fixed Add Caption inverting colors (thanks @theflyingzamboni)
  • Fixed dark mode not being set on startup
  • Made window resizing more performant
  • Nodes that get optimized out and will never run will now not show their edges as animating (thanks @RunDevelopment)
  • Fixed iterator deleting not removing connections to nodes outside the iterator