transformerlab-app icon indicating copy to clipboard operation
transformerlab-app copied to clipboard

Added support for downloading models which do not have a config

Open ParamThakkar123 opened this issue 1 month ago • 3 comments

Fixes https://github.com/transformerlab/transformerlab-app/issues/901

The user would be able to download models from huggingface which do not have a config but the system needs to be somehow modified so that it detects the architecture of the model (Currently it doesn't because there is no config) and check the suitable plugin. I tried this by downloading a single file diffusion model which didn't have a config.

ParamThakkar123 avatar Nov 20 '25 04:11 ParamThakkar123

Codecov Report

:x: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
api/transformerlab/routers/model.py 0.00% 8 Missing :warning:

:loudspeaker: Thoughts on this report? Let us know!

codecov-commenter avatar Nov 20 '25 04:11 codecov-commenter

Diffusion models do not have a config, they have a model_index.json. We currently have logic where we use the model_index.json and the _class_name field inside to determine if the model is a diffusion model or not. All models supported by the diffusers library need to have this file. For structure, refer here: https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/model_index.json

Did you come across a case where the model didnt have this file but worked with diffusers?

Yes. I tried loading the https://huggingface.co/GeorgyGUF/FameGrid_Bold_SDXL_V1.safetensors file using the diffusers library the. But looks like it has some components missing too

ParamThakkar123 avatar Nov 20 '25 14:11 ParamThakkar123

When I tried to load the model it went up till 100% loaded a few shards and then threw an error saying some components are missing

ParamThakkar123 avatar Nov 20 '25 14:11 ParamThakkar123

Just cleaning up, @ParamThakkar123 lets close this since it is an issue only caused for single file diffusion models, lets add the fix if necessary within that PR only so we can test everything at once. No other model is affected by this except those ones

deep1401 avatar Dec 05 '25 19:12 deep1401