mudler / mudler/LocalAI

Allow Setting `original_config_file` for Diffusers Backend

Open
#3,250 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

diffusers enhancement roadmap up for grabs
Dominant language
Go
Stars
49.2k
Forks
4.5k
Avg merge
1d 3m
Merged PRs (30d)
239

Description

Is your feature request related to a problem? Please describe.

I encountered an error while using diffusers backend for text-to-image service. Loading model failed due to error:
ERR Server error error="could not load model (no success): Unexpected err=OSError('DreamShaperXL_Turbo_v2_1.safetensors does not appear to have a file named model_index.json.'), type(err)=<class 'OSError'>".
According to the discussion https://github.com/huggingface/diffusers/issues/7209#issuecomment-1978067476 from_single_file function need the argument original_config_file in a offline environment.

Describe the solution you'd like

Please improve backend/python/diffusers/backend.py, allow pass in original_config_file while loading model from local.

Describe alternatives you've considered

n/a

Additional context

https://github.com/huggingface/diffusers/issues/7209

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in backend/python/diffusers/backend.py and trace the local model-loading path that calls Diffusers' from_single_file function. Check how a local original_config_file could be supplied, then verify that loading the reported DreamShaperXL_Turbo_v2_1.safetensors case works offline with that argument.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.