[bug]: Certain FLUX LoRAs don't install
Is there an existing issue for this problem?
- [X] I have searched the existing issues
Operating system
Windows
GPU vendor
Nvidia (CUDA)
GPU model
No response
GPU VRAM
No response
Version number
5.0.1
Browser
Chrome Version 129.0.6668.100 (Official Build) (64-bit)
Python dependencies
No response
What happened
All of a sudden some LoRa's just stopped being able to be installed.
[2024-10-16 15:47:52,892]::[ModelInstallService]::ERROR --> Model install error: Z:/AI-Models/Art-Models/Loras/Flux.1 D/Style-SFW/style/EnvyFluxDarkToon01.safetensors InvalidModelConfigException: Unable to determine model type for Z:\AI-Models\Art-Models\Loras\Flux.1 D\Style-SFW\style\EnvyFluxDarkToon01.safetensors
Given that Envy's LoRa were working, and then they stopped I reached out to Envy and asked if they changed something recently. They mentioned that they started making DoRa's in "OneTrainer" Just to be clear the non-flux "LoRas" and "DoRa" from the creator work just fine in Invoke, but the Flux version does not. Again it's only something recent, and not the older ones. (Older by literally 2 weeks), any LoRa they had created after Oct 1st for FLUX appears to have this issue.
They have informed me that they have done nothing different. Just that they started creating DoRa's in OneTrainer.
List of FLUX LoRas that are having the issue - -EnvyFluxDarkWatercolor01.safetensors -EnvyFluxMoonlightFusion01.safetensors -EnvyFluxThickOilPainting01a.safetensors -EnvyFluxSakuraSunset01.safetensors -EnvyFlux3Cute5U01b.safetensors -EnvyFluxDarkToon01.safetensors -EnvyFluxThickOilPainting01c.safetensors -EnvyFluxAnimeFusion01.safetensors -EnvyFluxPunkGirls01.safetensors -EnvyFluxDigitalBrush01.safetensors -EnvyFlux70sScifi01.safetensors -EnvyFluxThickOilPainting01b.safetensors -EnvyFluxAnimeSketch01.safetensors -EnvyFluxDreamtown01.safetensors -EnvyFluxThickOilPainting01d.safetensors -EnvyFlux3Cute5U01a.safetensors
All their other FLUX LoRa's as of today (Oct 16th) work just fine.
What you expected to happen
It should have installed and used the FLUX LoRa
How to reproduce the problem
No response
Additional context
No response
Discord username
No response
Can you please provide a couple links to the specific versions of the LoRAs that don't work?
Can you please provide a couple links to the specific versions of the LoRAs that don't work?
Certainly! I'll give you three of the non-loading ones and three of the loading and working ones.
Non-working LoRas https://civitai.com/models/838594/envy-flux-dreamtown-01?modelVersionId=938205 https://civitai.com/models/836757/envy-flux-digital-brush-01?modelVersionId=936167 https://civitai.com/models/844821/envy-flux-dark-watercolor-01?modelVersionId=945159
Working LoRas https://civitai.com/models/669112/envy-flux-dreamlands-01?modelVersionId=749041 https://civitai.com/models/663056/envy-flux-classic-02?modelVersionId=743101 https://civitai.com/models/653947/envy-flux-dark-sketch-01-creepy-anime-color-ink-sketches?modelVersionId=731613
Thanks!
Here is another one that doesn't install currently:
- https://civitai.com/models/643886/flux-faetastic-details?modelVersionId=720252
InvalidModelConfigException: Unable to determine model type
OK So Envy got a pinch more info for me. They said "Those are DoRa's but I must have labeled them LoRa's out of habbit..." So maybe because it's labeled a LoRa, but is really coded as a DoRa Invoke is having a problem understanding? I only say that because other DoRa's for non-flux models load just fine in Invoke. But those are specifically tagged as DoRa. Maybe? I am not a coder by any means, just trying to follow some logic here.
OK So Envy got a pinch more info for me. They said "Those are DoRa's but I must have labeled them LoRa's out of habbit..." So maybe because it's labeled a LoRa, but is really coded as a DoRa Invoke is having a problem understanding? I only say that because other DoRa's for non-flux models load just fine in Invoke. But those are specifically tagged as DoRa. Maybe? I am not a coder by any means, just trying to follow some logic here.
Thanks for the insight but what is a Dora? And how can we check what they are labeled, and relabel them if necessary?
Thanks for the insight but what is a Dora? And how can we check what they are labeled, and relabel them if necessary?
From what I've read, DoRA is a faster model than LoRA. How can you know if a DoRA has been tagged a LoRA? I have no idea, the creator needs to make certain to tag the metadata DoRA... Because if they tag it LoRA it appears Invoke doesn't like it. That said, A1111, ComfyUI, and Foooocus don't seem to have this problem. This is distinctively a InvokeAI issue.
If I had to guess, having the file tagged LoRA but is really configured to be a DoRA, Invoke probably has a specific loading protocol to read just LoRA formatting. The other programs might have taken a more 'dumbed down' approach, you feed it a file and it determines what it is based on the file structure. It's slower doing it this way, but more flexible for dummies that mis-tag their file structure :) But I am not a coder so I'm just throwing stuff out there.
As suggested by the admins on the discord channel, I'm reporting here LORA styles for Flux that don't work. The same styles work perfectly well with FLUX in Swartm UI, so everything is fine with them. None of these styles want to install in Invoke.
https://civitai.com/models/643886/flux-faetastic-details?modelVersionId=720252 https://civitai.com/models/580857/realistic-skin-texture-style-xl-detailed-skin-sd15-flux1d https://civitai.com/models/631986/xlabs-flux-realism-lora https://civitai.com/models/178215?modelVersionId=734230 https://civitai.com/models/636355/flux-detailer https://civitai.com/models/776375/chrome-texture-flux-paseer
Here is one exception and a slightly different case. A style that theoretically installs, but then throws an error when you try to use it. https://civitai.com/models/643395/latexskinnsfw-flux-paseer
Two more styles that don't work. https://civitai.com/models/995599/randommaxx-robotify?modelVersionId=1115596 https://civitai.com/models/732487?modelVersionId=891495
Another lora style that Invoke failed to install. https://civitai.com/models/830230/comic-book?modelVersionId=954701
Another on. Please do something. https://civitai.com/models/732487/randommaxx-tacexogear
Another on. Every good model for cyborg stuff don't work in Invoke. https://civitai.com/models/1065732/cyborgfusionflux
Adel_AI's LoRA, e.g.:
- https://civitai.green/models/871757/niji-anime
- ~~https://civitai.green/models/858800/illustration-concept~~
Any luck resolving this? I've only seen it happen a couple of times, but it is repeatable, and a bummer.
https://civitai.com/models/836757/envy-flux-digital-brush-01?modelVersionId=936167
Still doesn't want to install due to "unknown model type."
can confirm that current main (with #7590 merged) installs and loads that envy-flux-digital-brush,
and the illustration-concept linked in https://github.com/invoke-ai/InvokeAI/issues/7131#issuecomment-2567251310
however Niji Anime from the same uploader still fails with "Unknown LoRA type."
Here are a couple more that fail with the same error, hope these help -
https://civitai.com/models/832858/anime-art?modelVersionId=1376386 (Variant 3 tested) https://civitai.com/models/960680/randommaxx-artistify?modelVersionId=1075587
For context and about ~1000 tested FLUX Loras. About 1 out of 10 won't load in Invoke.
I've also encountered some LoRAs that InvokeAI won't load for various reasons. With Claude's help, I put together some tools to analyze and convert LoRAs to make them work in InvokeAI.
https://github.com/dreness/lora-metadata-tools