refactor: Replace asyncio.run with synchronous get_lora_info calls in LoraManagerLoader, LoraStacker, WanVideoLoraSelect, and ApiRoutes. See #282

This commit is contained in:
Will Miao
2025-07-11 07:24:33 +08:00
parent 6f8e09fcde
commit 5de16a78c5
5 changed files with 47 additions and 25 deletions

View File

@@ -1,5 +1,4 @@
from comfy.comfy_types import IO # type: ignore
import asyncio
import folder_paths # type: ignore
from ..utils.utils import get_lora_info
from .utils import FlexibleOptionalInputType, any_type, get_loras_list
@@ -56,7 +55,7 @@ class WanVideoLoraSelect:
clip_strength = float(lora.get('clipStrength', model_strength))
# Get lora path and trigger words
lora_path, trigger_words = asyncio.run(get_lora_info(lora_name))
lora_path, trigger_words = get_lora_info(lora_name)
# Create lora item for WanVideo format
lora_item = {