You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Two writes to the same widget in one apply batch keep a random value #1006
If one comfy workflow apply batch writes the same widget twice, the value that survives is chosen at random instead of being the last write.
Every op in a batch carries the same stamp, [base_version, actor]. _lww_gate (comfy_cli/workflow_ops.py) compares _stamp_key = [base_version, actor, op_id], and op_id is uuid.uuid4().hex (_new_op). Two writes to one register within a batch therefore tie on the stamp, and the random op_id decides which one wins. A lower op_id makes the later write a silent no-op, yet it is still returned in ops and reported as applied.
Over 10 runs this printed x 4 times and y 6 times. It should print y every time.
Impact
Recipes and agent batches that set a widget and later override it, such as a template default followed by a user value, can keep the earlier value without any error.
Structural registers are affected too. When a DynamicGroup count write (set_widget loras N) loses to an earlier count write in the same batch, the loras.N.* writes that follow can fail with "widget not found", or stale rows remain. feat(workflow): replace DynamicGroup rows in one batch spec #1004 refuses same-batch writes to a group before set_dynamic_group_rows as a local guard; this issue is the general fix.
Expected
Within one batch, the later write wins deterministically. Concurrent writes from different batches or replicas must still converge by stamp in any apply order, and replay must stay idempotent.
Activity