mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 07:05:43 -03:00
feat(lora-cycler): reset execution state on manual index change
Reset execution state when user manually changes LoRA index to ensure next execution starts from the user-set index. This prevents stale execution state from interfering with user-initiated index changes.
This commit is contained in:
@@ -56,6 +56,12 @@ const getPoolConfig = (): LoraPoolConfig | null => {
|
|||||||
|
|
||||||
// Handle index update from user
|
// Handle index update from user
|
||||||
const handleIndexUpdate = async (newIndex: number) => {
|
const handleIndexUpdate = async (newIndex: number) => {
|
||||||
|
// Reset execution state when user manually changes index
|
||||||
|
// This ensures the next execution starts from the user-set index
|
||||||
|
;(props.widget as any)[HAS_EXECUTED] = false
|
||||||
|
state.executionIndex.value = null
|
||||||
|
state.nextIndex.value = null
|
||||||
|
|
||||||
state.setIndex(newIndex)
|
state.setIndex(newIndex)
|
||||||
|
|
||||||
// Refresh list to update current LoRA display
|
// Refresh list to update current LoRA display
|
||||||
|
|||||||
@@ -1684,7 +1684,7 @@ to {
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lora-cycler-widget[data-v-6c9d29f9] {
|
.lora-cycler-widget[data-v-2ca548b3] {
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
background: rgba(40, 44, 52, 0.6);
|
background: rgba(40, 44, 52, 0.6);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
@@ -13082,6 +13082,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
const handleIndexUpdate = async (newIndex) => {
|
const handleIndexUpdate = async (newIndex) => {
|
||||||
|
props.widget[HAS_EXECUTED] = false;
|
||||||
|
state.executionIndex.value = null;
|
||||||
|
state.nextIndex.value = null;
|
||||||
state.setIndex(newIndex);
|
state.setIndex(newIndex);
|
||||||
try {
|
try {
|
||||||
const poolConfig = getPoolConfig();
|
const poolConfig = getPoolConfig();
|
||||||
@@ -13210,7 +13213,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const LoraCyclerWidget = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-6c9d29f9"]]);
|
const LoraCyclerWidget = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-2ca548b3"]]);
|
||||||
const _hoisted_1$1 = { class: "json-display-widget" };
|
const _hoisted_1$1 = { class: "json-display-widget" };
|
||||||
const _hoisted_2$1 = {
|
const _hoisted_2$1 = {
|
||||||
class: "json-content",
|
class: "json-content",
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user