Power Lora Loader: 'Add Lora' button is unresponsive
Environment
- ComfyUI: 0.3.40
- ComfyUI Frontend: 1.21.7
- rgthree-comfy: latest
Description
When I click the '➕ Add Lora' button on the Power Lora Loader node, it does not respond. The context menu for selecting a LoRA does not appear. The following error is logged in the browser's developer console upon clicking the button:
power_lora_loader.js:72 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'file')
at power_lora_loader.js:72:57
at Array.map (<anonymous>)
at power_lora_loader.js:72:44
This issue seems to occur specifically when ComfyUI\extra_model_paths.yaml is enabled.
The problem arises with the following configuration in my extra_model_paths.yaml:
a111:
base_path: D:\stable-diffusion-webui\
checkpoints: models/Stable-diffusion
configs: models/Stable-diffusion
vae: models/VAE
loras: |
models/Lora
models/LyCORIS
upscale_models: |
models/ESRGAN
models/RealESRGAN
models/SwinIR
embeddings: embeddings
hypernetworks: models/hypernetworks
controlnet: models/ControlNet
Workaround:
I was able to resolve this issue with the following modification, which was suggested by an AI (Gemini 2.5 Pro Preview).
In rgthree-comfy/web/comfyui/power_lora_loader.js, line 72:
- const loras = lorasDetails.map((l) => l.file);
+ const loras = lorasDetails.filter(l => l && l.file).map((l) => l.file);
Thank you, and you're right fixed.But after today's update, I need fix it again.
This did not work for me, I think there is an issue with the async method because I have a very large LoRA library it might not be loading the library before the response is expected... My library works fine with the native LoRA loader and other multiple LoRA loaders. I really like the Rgthree power LoRA loader though so I might try and fix it. Maybe adding an await somewhere will fix it but I have to make time to comb through the code more thoroughly.
A backup file like bkup_power_lora_loader.js in the same folder may be loaded instead, preventing the changes from taking effect.
@rgthree Can you guys please roll this out to production fix for the node so it retroactively gets pushed out so serverless implementations since they rely on pulling the code directly from your github? Thanks!