InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: Certain FLUX LoRAs don't install

Open SencneS opened this issue 1 year ago • 18 comments

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

SencneS avatar Oct 16 '24 20:10 SencneS

Can you please provide a couple links to the specific versions of the LoRAs that don't work?

psychedelicious avatar Oct 16 '24 20:10 psychedelicious

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

SencneS avatar Oct 16 '24 21:10 SencneS

Thanks!

psychedelicious avatar Oct 16 '24 21:10 psychedelicious

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

rikublock avatar Oct 17 '24 07:10 rikublock

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.

SencneS avatar Oct 17 '24 14:10 SencneS

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?

freshlesh3 avatar Nov 07 '24 13:11 freshlesh3

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.

SencneS avatar Nov 07 '24 17:11 SencneS

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

DzikiREX avatar Nov 16 '24 17:11 DzikiREX

Two more styles that don't work. https://civitai.com/models/995599/randommaxx-robotify?modelVersionId=1115596 https://civitai.com/models/732487?modelVersionId=891495

DzikiREX avatar Nov 30 '24 21:11 DzikiREX

Another lora style that Invoke failed to install. https://civitai.com/models/830230/comic-book?modelVersionId=954701

DzikiREX avatar Dec 09 '24 20:12 DzikiREX

Another on. Please do something. https://civitai.com/models/732487/randommaxx-tacexogear

DzikiREX avatar Dec 15 '24 01:12 DzikiREX

Another on. Every good model for cyborg stuff don't work in Invoke. https://civitai.com/models/1065732/cyborgfusionflux

DzikiREX avatar Dec 25 '24 01:12 DzikiREX

Adel_AI's LoRA, e.g.:

  • https://civitai.green/models/871757/niji-anime
  • ~~https://civitai.green/models/858800/illustration-concept~~

keturn avatar Jan 02 '25 03:01 keturn

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."

chrononaut79 avatar Jan 21 '25 05:01 chrononaut79

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."

keturn avatar Jan 29 '25 00:01 keturn

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

Cragz avatar Mar 10 '25 14:03 Cragz

For context and about ~1000 tested FLUX Loras. About 1 out of 10 won't load in Invoke.

Neosettler avatar Mar 31 '25 02:03 Neosettler

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

dreness avatar Oct 13 '25 09:10 dreness