mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-09-20 18:51:26 -03:00
a0a5b13ab0
`civitai.trainedWords` is an ordered array, and the order is what gets pasted into a prompt: "Copy Trigger Words" and the insert-into-node action join it as-is. The refresh merge unioned the stored words with the freshly fetched ones via `list(set(...))`, so any metadata refresh silently shuffled a user's ordering into an arbitrary one. Now that the UI exposes reordering, that would look like the feature losing the change at random. Merge in order instead: stored words first (in their saved order), then newly discovered ones, duplicates dropped. `_merge_ordered_unique` keeps the behaviour easy to assert, and the existing merge test keeps passing because it compares the result as a set.