///
This guide addresses common issues encountered while using `sd-webui-infinite-image-browsing`. When experiencing problems, always check the `log.log` file in the extension's root directory for detaile
9 views
~9 views from guests
Guest views are estimated from total page views. These include anonymous visitors and users who weren't logged in when they viewed the page.
This guide addresses common issues encountered while using sd-webui-infinite-image-browsing. When experiencing problems, always check the log.log file in the extension's root directory for detailed error messages, as these can provide crucial insights (scripts/iib/logger.py). For more general questions, refer to the README's FAQ↗.
hnswlib, numpy)Problem: You might encounter errors indicating missing hnswlib or numpy when trying to use experimental features like "Natural Language Categorization & Search".
Reason: These are powerful libraries for vector search and are optional. The core browsing functionality does not require them. The installation script (install.py) will skip them if IIB_SKIP_OPTIONAL_DEPS is set.
Solution:
numpy and hnswlib are installed.
If
hnswlib fails to install, it often requires a C++ compiler. You can try installing pre-built wheels:
IIB_SKIP_OPTIONAL_DEPS=1 before running pip install -r requirements.txt.
Problem: You have moved your image folders or the SD-webui installation, and the browser can no longer find images or the index is broken.
Reason: The iib.db database stores absolute paths to your images. If these paths change, the database needs to be updated. The migrate.py script is designed for this.
Solution:
migrate.py: Run the migrate.py script from the extension's root directory with the old and new base directories.
--db_path: Path to your iib.db file (default is iib.db in the extension root).--old_dir: The base part of the path to be replaced.--new_dir: The new base part of the path.Problem: The application starts but reports that it cannot find any image directories, or the image index is empty.
Reason: The application cannot locate the configured image paths from your SD-webui config.json or any extra_paths you've provided. The app.py script includes paths_check to validate these.
Solution:
sd_webui_config: If running as a standalone app, ensure you've correctly specified the --sd_webui_config argument and that the path to your config.json is correct and accessible.sd_webui_path_relative_to_config: If paths in your config.json are relative, ensure --sd_webui_path_relative_to_config is used.extra_paths: If your images are in custom locations not covered by SD-webui's config, add them using the --extra_paths argument when launching app.py, or via the UI.--update_image_index to force a re-scan.
Problem: The UI shows "Index expired, updating automatically" or search results are outdated/incorrect.
Reason: The application tracks the modification dates of scanned folders (folders table in iib.db). If a folder's content has changed (new images added, old ones deleted/modified), the index becomes stale (scripts/iib/db/datamodel.py).
Solution:
--update_image_index.scripts/iib/db/update_image_data.py).POST /infinite_image_browsing/db/rebuild_index.Problem: Image grids load slowly, especially for videos, or thumbnails take a long time to appear. Reason: Generating thumbnails and video covers on demand can be CPU-intensive. Caching improves this. Solution:
app.py with --generate_image_cache and --generate_image_cache_size <size> (e.g., 512x512) to pre-generate thumbnails.app.py with --generate_video_cover to pre-generate video cover images.--gen_cache_verbose for detailed progress output during generation.IIB_CACHE_DIR is set to a fast storage location (e.g., SSD). This can be configured in your .env file (scripts/iib/tool.py).
Problem: You cannot access certain features, or the UI prompts for a "Secret Key". Reason: Access control is enabled (either automatically due to public exposure or explicitly configured), and the necessary authentication or file system permissions are not met. Solution:
IIB_SECRET_KEY in your .env file and provide that key (scripts/iib/api.py).gradio-auth, a secret key is automatically required.IIB_ACCESS_CONTROL):
IIB_ACCESS_CONTROL=disable in your .env file.IIB_ACCESS_CONTROL=enable.IIB_ACCESS_CONTROL_PERMISSION):
IIB_ACCESS_CONTROL_PERMISSION is set to read-only. If so, you won't be able to delete, move, or modify files. Change it to read-write if full access is desired (scripts/iib/api.py).IIB_ACCESS_CONTROL_ALLOWED_PATHS):
IIB_ACCESS_CONTROL_ALLOWED_PATHS in your .env file (scripts/iib/api.py).Problem: When trying to use "Natural Language Categorization & Search", you get an error about missing numpy or hnswlib.
Reason: These are mandatory Python dependencies for this experimental feature (scripts/iib/topic_cluster.py).
Solution:
Problem: AI features fail with an error about missing API key or base URL.
Reason: The backend cannot connect to an OpenAI-compatible API for embeddings or chat completions (scripts/iib/api.py, scripts/iib/topic_cluster.py).
Solution:
.env file:
OPENAI_API_KEY: Your API key.OPENAI_BASE_URL: The endpoint URL for your OpenAI-compatible API.AI_MODEL: Your preferred chat model.EMBEDDING_MODEL: Your preferred embedding model.TOPIC_TITLE_MODEL: (Optional) Specific model for topic titles.OPENAI_BASE_URL.Problem: AI-powered features (like topic titling or tag graph abstraction) fail due to LLM response parsing errors.
Reason: This can happen if the LLM returns malformed JSON, exceeds timeouts, or fails repeatedly (scripts/iib/topic_cluster.py, scripts/iib/tag_graph.py).
Solution:
.env file, consider adjusting:
IIB_TAG_GRAPH_LLM_TIMEOUT_SEC: Increase the timeout if the API is slow.IIB_TAG_GRAPH_LLM_MAX_ATTEMPTS: Increase the number of retries for transient network issues.log.log: Detailed error messages from LLM interactions are logged here, including full response content if available, which can help diagnose specific API provider issues.Problem: The browser tab shows an error like "It seems to have failed to load. You can try refreshing the page." and mentions element '#iib_top' is not found.
Reason: This usually indicates an issue with the Gradio UI not correctly rendering the extension's iframe or a JavaScript loading error (javascript/index.js).
Solution:
Ctrl+F5 or Cmd+Shift+R).F12) and check the "Console" tab for any JavaScript errors.Problem: Images are displayed but their generation information (prompts, metadata) cannot be retrieved or is incorrect.
Reason: The application relies on parsers (scripts/iib/parsers/index.py) to extract metadata from different AI image formats (SD-webui, ComfyUI, Fooocus, etc.). If a file's metadata is missing, corrupted, or uses an unsupported format, parsing can fail.
Solution:
IIB_ENABLE_SD_WEBUI_STEALTH_PARSER=true in your .env file if you expect to process such images.IIB_COMFYUI_EXTRACT_ALL_PROMPTS=true might help with certain workflows.Problem: The application stops working, closes unexpectedly, or behaves erratically. Reason: This could be due to various reasons, including unhandled exceptions, resource exhaustion, or conflicts. Solution:
log.log: Always refer to the log.log file in the extension's root directory (scripts/iib/logger.py). Python tracebacks and error messages will be recorded here, providing the most specific information for debugging.For further assistance, please refer to the official FAQ or open an issue on the GitHub repository↗.