This might be chaiNNer's biggest update ever! Sorry for how long it took, we spent a lot of time making sure this release had the polish we deemed necessary. There are a lot of big changes in this update, but here are some highlights: Better iterators, general optimizations, support for more PyTorch models, chain auto-organization, and much more. Here are the major changes in greater detail:
Better Iterators
This might not be the final step in our goal of getting iteration in chaiNNer to where we want to be, but it's certainly a step in the right direction. Iterators are no longer gigantic nodes with their own sub-flow editor in them. Now, they are single nodes that can be attached like normal, which makes working with iteration a whole lot easier. Not only that, but it also allows mixing and matching iterators and "collectors", so now you can do things like convert an image sequence to a video, or split a spritesheet to separate images.
However, only one iterator is actually allowed to be part of the same chain "lineage", so you still are not able to do things like match multiple iterators together or combine an image iterator and a model iterator. That is a lot more complex and will hopefully come in the future. Oh yeah, and all the iterator nodes have new names as well, so instead of "Image File Iterator", look for "Load Images".
General Optimizations
We spent some time working on optimizing a few aspects of chaiNNer and generally improving speed. From making PyTorch upscales faster to optimizing things like resizing to making the frontend use less CPU, you should notice a general speedup all around.
Support for more PyTorch models
Part of what made this release take a while was that we took a small break from working on chaiNNer to separate out our model support code into a new Python package called Spandrel. Doing so allowed us to more easily add support for a variety of new models (such as SPAN, Real-CUGAN, FBCNN, and more) and we even got some contributions from the community. Spandrel is now being used in AUTOMATIC1111's stable diffusion webui, and will most likely also be used in ComfyUI soon. If you want chaiNNer's automatic model support in your Python project, go check out Spandrel. To see a list of all the currently supported models, check here.
Other notable changes
- Chains can now be auto-formatted/organized using Edit > Format Chain (or using ctrl+shift+f).
- Upscale tiling is now even more seamless, using a blending technique to avoid hard seams with certain models like SCUNet.
- Some general UI improvements and quality-of-life additions.
- Many new nodes.
And now for the changelog:
Dependency Updates
PyTorch
- Update PyTorch to 2.1.2 by @joeyballentine in #2265, #2349, #2429
- Add SafeTensors support by @joeyballentine in #2272, #2440
- Use new Spandrel package for model loading by @joeyballentine and @RunDevelopment in #2330, #2343, #2348, #2354, #2359, #2392, #2412, #2428, #2409
Changes
New Nodes
- "Alpha Matting" node by @RunDevelopment in #2292
- "Pixel Art Upscale" node by @RunDevelopment in #2326
- "Strengthen Normals" node by @RunDevelopment in #2372
- "Unified Pad" node by @RunDevelopment in #2373
- "Unified Resize" node by @RunDevelopment in #2380
- "Chroma Key" node by @RunDevelopment in #2381
- "Optimize ONNX Model" node by @RunDevelopment in #2408
Optimizations
- Optimize box blur by @RunDevelopment in #2325
- Optimize gamma implementation by @RunDevelopment in #2386
- Optimize image resizing and add more resizing algorithms by @RunDevelopment in #2387, #2390, #2394
- Optimize Split Transparency output for subsequent operations by @RunDevelopment in #2391
- Optimize PyTorch upscale by @RunDevelopment in #2407
- Optimize regex replace by @RunDevelopment in #2411
- Change edge running animation and behavior by @joeyballentine in #2424
Changes
- Iterator rewrite by @joeyballentine and @RunDevelopment in #2254, #2267, #2276, #2280, #2286, #2442, #2449
- Add chain auto-organization/formatting by @joeyballentine and @RunDevelopment in #2377, #2395
- Add type tags for number ranges by @RunDevelopment in #2284
- Improve "Remove Background" node types by @RunDevelopment in #2291
- Simple fused input-output elements by @RunDevelopment in #2338
- Improve screenshots by @RunDevelopment in #2340
- Add fused output for "Pass Through" node by @RunDevelopment in #2341
- Allow configuring multithreading for ncnn by @JeremyRand in #2342
- Make ncnn memory budget configurable by @JeremyRand in #2351
- Allow setting ONNX opset by @RunDevelopment in #2361
- Add overlap blending for auto split by @RunDevelopment in #2363
- Add open delay to status tooltips by @RunDevelopment in #2364
- Add threshold group by @RunDevelopment in #2368
- Add "tabs" style for dropdown inputs by @RunDevelopment in #2367
- Improve "Normalize Normals" node by @RunDevelopment in #2371
- Add a bit of padding to tab list by @RunDevelopment in #2374
- Add relative coordinates for Pick Color by @RunDevelopment in #2382
- Allow custom blurred images in High Pass by @RunDevelopment in #2388
- Add opset output to Convert ONNX by @RunDevelopment in #2396
- Add categories and dividers for dropdowns by @RunDevelopment in #2398
- Add Separate Alpha option to "Resize" node by @RunDevelopment in #2400
- Change default crop width & height to 100 by @RunDevelopment in #2401
- Mark ignored inputs by @RunDevelopment in #2403
- Support capturing groups in "Regex Replace" node types by @RunDevelopment in #2404
- Make tiling support colorization models by @RunDevelopment in #2406
- Add relative coordinates and tile fill for Shift node by @RunDevelopment in #2413
- Make "Resize To Side" input order consistent with Resize by @RunDevelopment in #2414
- Simplify size requirements logic in "Inpaint" node by @RunDevelopment in #2430
- Allow glob negation in image iterator by @joeyballentine in #2432
Bug Fixes
- Clamp YUV->RGB out of gamut by @RunDevelopment in #2264
- Detect HTTPS WebUI on localhost by @RunDevelopment in #2278
- Fix a^b in Math node and improved output type by @RunDevelopment in #2282
- Remove unnecessary alpha channels for loaded DDS files by @RunDevelopment in #2293
- Enable tiling for SCUNet by @joeyballentine in #2294
- Fix execution buttons disabled state by @joeyballentine in #2316
- Filter events in
/run/individual
by @RunDevelopment in #2320 - Prevent dragging on view image button by @RunDevelopment in #2339
- Refactor out onnx conversion + use data for ncnn input name by @joeyballentine in #2360
- Fix alert box closing delay by @RunDevelopment in #2383
- Fix race condition in
/run/individual
by @RunDevelopment in #2410
Other/Dev Changes
- Switch to linting & formatting the backend with Ruff by @RunDevelopment and @joeyballentine in #2296, #2301, #2303, #2302, #2300, #2304, #2306, #2305, #2308, #2314, #2315, #2435
- Update react flow by @joeyballentine in #2268, #2344
- Remove
inputSize
in save files by @RunDevelopment in #2273 - Update navi to 0.6.2 by @RunDevelopment in #2283
- Restructured API files by @RunDevelopment in #2285
- Fix release workflows on macOS by @RunDevelopment in #2298, #2299
- Add caching to backend dependency installs for both CI and application by @joeyballentine in #2311
- Fix node_check for 3.8 by @RunDevelopment in #2321
- Remove GPU list endpoints by @joeyballentine in #2333
- Rework how nodes are sorted by @RunDevelopment in #2323
- Update Navi PyTorch model types by @RunDevelopment in #2337
- Update electron forge to latest + fix mac release by @joeyballentine in #2350
- Update pyright and use library types by @RunDevelopment in #2356
- Type-safe model purpose for model inputs by @RunDevelopment in #2358
- Enforce objects by @RunDevelopment in #2357
- Updated to latest version of chakra ui by @RunDevelopment and @joeyballentine in #2365, #2366, #2370
- Migrate VSCode
settings.json
by @RunDevelopment in #2399 - Rework backend events by @RunDevelopment in #2402
- Refactor High Pass implementation to avoid code duplication by @RunDevelopment in #2415
Full Changelog: v0.20.2...v0.21.0