BlafKing / sd-civitai-browser-plus

Extension to access CivitAI via WebUI: download, delete, scan for updates, list installed models, assign tags, and boost downloads with multi-threading.
GNU Affero General Public License v3.0
289 stars 44 forks source link

[Bug]: Search results are broken #235

Closed Terroosh closed 4 months ago

Terroosh commented 4 months ago

Describe the bug.

After the rewrite, search results in the extension are different from the civitai webiste.

Steps to reproduce the problem.

  1. Set options the same as the screenshot below
  2. Only 4 models show up
  3. Set the same options on https://civitai.com/models
  4. See all the missing models

firefox_xDpOGbiybG

firefox_ralTObCa7H

Expected behavior

Model results should match https://civitai.com/models

System info

Console logs

Not Applicable

Additional information

No response

Terroosh commented 4 months ago

It looks like both the Base Model options and the Sort by date options are broken. Removing all the base model options will allow models to show but they are not sorted by newest.

BlafKing commented 4 months ago

Thanks for reporting!

I see now that I've made a mistake in how the basemodels and content type parameters are created for the API Request URL. I'll post a hotfix for this shortly!

This should also hopefully fix the sorting issue, as my extension cannot influence the sorting when all the parameters are correct.

kyle215ps3 commented 4 months ago

Thanks for reporting!

I see now that I've made a mistake in how the basemodels and content type parameters are created for the API Request URL. I'll post a hotfix for this shortly!

This should also hopefully fix the sorting issue, as my extension cannot influence the sorting when all the parameters are correct.

hopefully it works for me, cause I get error all over the place even though I updated and got a new api xD the error I get: Traceback (most recent call last): File "D:\A FORGE A1111\webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict output = await app.get_blocks().process_api( File "D:\A FORGE A1111\webui\venv\lib\site-packages\gradio\blocks.py", line 1431, in process_api result = await self.call_function( File "D:\A FORGE A1111\webui\venv\lib\site-packages\gradio\blocks.py", line 1103, in call_function prediction = await anyio.to_thread.run_sync( File "D:\A FORGE A1111\webui\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "D:\A FORGE A1111\webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "D:\A FORGE A1111\webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, args) File "D:\A FORGE A1111\webui\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper response = f(args, **kwargs) File "D:\A FORGE A1111\webui\extensions\sd-civitai-browser-plus\scripts\civitai_api.py", line 528, in update_model_list (hasPrev, hasNext, current_page, total_pages) = pagecontrol(gl.json_data) File "D:\A FORGE A1111\webui\extensions\sd-civitai-browser-plus\scripts\civitai_api.py", line 481, in pagecontrol total_pages = f"{json_data['metadata']['totalPages']}"

BlafKing commented 4 months ago

hopefully it works for me, cause I get error all over the place even though I updated and got a new api xD

Edit: The error you posted has been fixed in the latest version, please try to update to the latest version! If you already did so, try re-installing, as this issue should no longer happen if you have properly installed the latest version.

BlafKing commented 4 months ago

Latest commit should fix the issue mentioned in this post.

Thanks again for reporting! :)

Terroosh commented 4 months ago

Latest commit should fix the issue mentioned in this post.

Thanks again for reporting! :)

Sorting issue was also fixed with this update.