mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-09 23:20:04 +00:00
fix: disable control after generate during partial execution (#8774)
## Summary Passes an isPartialExecution flag through widget beforeQueued/afterQueued callbacks so control-after-generate widgets skip value modifications (randomize, increment, decrement) when the user queues selected output nodes via partial execution. requested by @christian-byrne in notion ## Screenshots (if applicable) before https://github.com/user-attachments/assets/3e723087-8849-457b-9f95-b8b5fceab0ed after https://github.com/user-attachments/assets/d9816667-51e0-4538-a012-9c84d0944019 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8774-fix-disable-control-after-generate-during-partial-execution-3036d73d365081688ca3d6b0506d69ca) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -273,8 +273,8 @@ export function addValueControlWidgets(
|
||||
}
|
||||
}
|
||||
|
||||
valueControl.beforeQueued = () => {
|
||||
if (controlValueRunBefore()) {
|
||||
valueControl.beforeQueued = ({ isPartialExecution } = {}) => {
|
||||
if (!isPartialExecution && controlValueRunBefore()) {
|
||||
// Don't run on first execution
|
||||
if (valueControl[HAS_EXECUTED]) {
|
||||
applyWidgetControl()
|
||||
@@ -283,8 +283,8 @@ export function addValueControlWidgets(
|
||||
valueControl[HAS_EXECUTED] = true
|
||||
}
|
||||
|
||||
valueControl.afterQueued = () => {
|
||||
if (!controlValueRunBefore()) {
|
||||
valueControl.afterQueued = ({ isPartialExecution } = {}) => {
|
||||
if (!isPartialExecution && !controlValueRunBefore()) {
|
||||
applyWidgetControl()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user