civitai / sd_civitai_extension

All of the Civitai models inside Automatic 1111 Stable Diffusion Web UI
MIT License
2.33k stars 443 forks source link

Fix TypeError: 'ResourceRequest' object is not subscriptable #109

Open soudasuwa opened 1 year ago

soudasuwa commented 1 year ago

Fix: #31

soudasuwa commented 1 year ago

I am new to Stable Diffusion nor an expert in python so correct me if I am wrong.

If I understand correctly a class ResourceRequest(BaseModel) is used only for typing, therefore a variable resource in def fetch_model_by_hash(hash: str) must be initialized to a dict instead of ResourceRequest.