lllyasviel / lllyasviel/stable-diffusion-webui-forge
sdapi/v1/sd-models missing config
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
Currently when using the docs or the api to try to load our models we get an error that we are missing the config parameter.
I was able to resolve this issue by adding: `"config": None` to the get_sd_models
Like this:
```
def get_sd_models(self):
import modules.sd_models as sd_models
return [{"title": x.title, "model_name": x.model_name, "hash": x.shorthash, "sha256": x.sha256, "filename": x.filename, "config": None} for x in sd_models.checkpoints_list.values()]
```
This is probably not the best fix, but it does allow the /sdapi/v1/sd-models endpoint to load the models correctly.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the get_sd_models method and reproduce the missing-config error through the /sdapi/v1/sd-models endpoint. Check how the endpoint expects the config field before choosing a fix; done means the endpoint loads and returns the models without the missing-config error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100