mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
d20f98fb4f
The change to memory session storage brings a subtle behaviour change. Previously, we serialized and deserialized everything (e.g. field state, invocation outputs, etc) constantly. The meant we were effectively working with deep-copied objects at all time. We could mutate objects freely without worrying about other references to the object. With memory storage, objects are now passed around by reference, and we cannot handle them in the same way. This is problematic for nodes that mutate their own inputs. There are two ways this causes a problem: - An output is used as input for multiple nodes. If the first node mutates the output object while `invoke`ing, the next node will get the mutated object. - The invocation cache stores live python objects. When a node mutates an output pulled from the cache, the next node that uses the cached object will get the mutated object. The solution is to deep-copy a node's inputs as they are set, effectively reproducing the same behaviour as we had with the SQLite session storage. Nodes can safely mutate their inputs and those changes never leave the node's scope. Closes #5665 |
||
---|---|---|
.. | ||
board_image_records | ||
board_images | ||
board_records | ||
boards | ||
config | ||
download | ||
events | ||
image_files | ||
image_records | ||
images | ||
invocation_cache | ||
invocation_processor | ||
invocation_queue | ||
invocation_stats | ||
item_storage | ||
latents_storage | ||
model_install | ||
model_manager | ||
model_records | ||
names | ||
session_processor | ||
session_queue | ||
shared | ||
urls | ||
workflow_records | ||
__init__.py | ||
invocation_services.py | ||
invoker.py |