I have an image processing graph and I want to process many images in batch. My graph looks like the following:

When I run the graph bokeh shows the execution path like this:

This causes my machines to run out of memory and crash as the output of the load image is megabytes of images. I would like the graph to run like this as as the result of Save result is very small and should be fine:

How can I do this with dask?
Customizing Optimization seems like it would be useful where I could possibly fuse the middle nodes. Is this the best way?