Open zopieux opened 1 year ago
We actually were planning on implementing that second option at some point, but a cache node sounds like an even better idea
Cool! As I mentionned I think the user shouldn't be in the business of manually adding such node, because ideally the default should be for the app to be smart and detect changes. Of course this is likely more difficult to imlement correctly compared to a simple caching node.
Yeah i think the issue there is how we define what needs to be cached. We obviously don't want to cache everything, so we'd need to specify what things would be worth caching (upscaling nodes being one of those). I do think we should still have a cache node though, since there may be times where a user is working with incredibly large images on a low end machine, and even simple nodes take a while to process, and they'd benefit from adding a bit of caching around. @RunDevelopment probably has a better idea of what would be the best approach than me though
Motivation A typical use-case of chaiNNer that I'm sure many people have is to do an expensive operation (e.g. upscale image), then proceed with further cheap processing using that expensive output as input. One needs to iterate a lot of that cheap processing. It would be great if chaiNNer could expose a caching mechanism so the expensive stuff is only done once and doesn't require manually saving/loading from disk. I propose two approaches below.
Description
Alternatives Today I need to rely on a clunky setup where I have a Save image node and a Load image node, depending on whether I need to refresh the output or just read it. This is a huge pain when there are a few such cacheable operations, especially in the absence of i/o selectors (#1465).