///
This guide details the various configuration options available for `sd-webui-infinite-image-browsing`, allowing you to customize its behavior, performance, privacy, and integration with AI features. C
106 views
~106 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 details the various configuration options available for sd-webui-infinite-image-browsing, allowing you to customize its behavior, performance, privacy, and integration with AI features. Configurations can be applied via environment variables or command-line arguments when running the standalone app.py.
IIB_DB_PATH (Environment Variable)
iib.db) used for storing image metadata and tags.iib.db in the application's current working directory.export IIB_DB_PATH="/path/to/your/custom/iib.db"IIB_CACHE_DIR (Environment Variable)
TMPDIR, TMP, TEMP environment variables, or Python's tempfile.gettempdir()).export IIB_CACHE_DIR="/path/to/your/custom/cache"When running app.py as a standalone application:
--host (Command-line Argument)
127.0.0.1python app.py --host 0.0.0.0--port (Command-line Argument)
8000python app.py --port 7860These command-line arguments are used for pre-generating caches, which can significantly improve browsing performance, especially for large media libraries. They are typically run as separate commands and will exit after completion.
--generate_video_cover (Command-line Argument)
python app.py --generate_video_cover--generate_image_cache (Command-line Argument)
--sd_webui_config and --sd_webui_path_relative_to_config must also be used.python app.py --generate_image_cache --sd_webui_config config.json--generate_image_cache_size (Command-line Argument)
512x512python app.py --generate_image_cache --generate_image_cache_size 256x256--gen_cache_verbose (Command-line Argument)
python app.py --generate_image_cache --gen_cache_verboseIIB_DB_FILE_BACKUP_MAX (Environment Variable)
8export IIB_DB_FILE_BACKUP_MAX=5IIB_SERVER_LANG (Environment Variable)
zh, enexport IIB_SERVER_LANG="en"--sd_webui_config (Command-line Argument)
config.json file of your Stable Diffusion web UI installation. This allows IIB to automatically discover your generated image directories.None (IIB will try to auto-detect if running as an extension)python app.py --sd_webui_config /path/to/sd-webui/config.json--sd_webui_path_relative_to_config (Command-line Argument)
sd_webui_config file will be resolved relative to the sd_webui_config file's location.python app.py --sd_webui_config /path/to/sd-webui/config.json --sd_webui_path_relative_to_config--sd_webui_dir (Command-line Argument)
Nonepython app.py --sd_webui_dir /path/to/sd-webuiIIB automatically indexes images from these paths, as configured in your sd_webui_config.json:
outdir_txt2img_samplesoutdir_img2img_samplesoutdir_saveoutdir_extras_samplesoutdir_gridsoutdir_img2img_gridsoutdir_samplesoutdir_txt2img_grids--extra_paths (Command-line Argument)
+ Add button on the homepage.python app.py --extra_paths /path/to/images1 /path/to/images2--export_fe_fn (Command-line Argument)
Truepython app.py --export_fe_fn False--base (Command-line Argument)
/infinite_image_browsingpython app.py --base /my-iib-instanceIIB_SECRET_KEY (Environment Variable)
None (No secret key required by default)export IIB_SECRET_KEY="your_secure_secret_key"gradio-auth is configured for SD-WebUI, IIB will automatically require a secret key even if IIB_SECRET_KEY is not set.IIB_ACCESS_CONTROL (Environment Variable)
enable, disableenable if SD-WebUI is running with --share, --ngrok, --listen, or --server_name. Otherwise, disable.export IIB_ACCESS_CONTROL="enable"IIB_ACCESS_CONTROL_ALLOWED_PATHS (Environment Variable)
save, extra, txt2img, img2img which map to corresponding paths in sd_webui_config.--extra_paths.export IIB_ACCESS_CONTROL_ALLOWED_PATHS="/path/to/safe_folder1,/path/to/safe_folder2,save,extra"IIB_ACCESS_CONTROL_PERMISSION (Environment Variable)
read-write, read-only, write-onlyread-writeexport IIB_ACCESS_CONTROL_PERMISSION="read-only"--allow_cors (Command-line Argument)
Falsepython app.py --allow_cors--enable_shutdown (Command-line Argument)
/shutdown API endpoint. Primarily used by the desktop application for controlled shutdown. Not recommended for public-facing deployments.Falsepython app.py --enable_shutdownThese settings control the experimental natural language categorization, search, and tag graph features, which rely on OpenAI-compatible API endpoints for embeddings and chat models.
OPENAI_API_KEY (Environment Variable)
""export OPENAI_API_KEY="sk-your_openai_key"OPENAI_BASE_URL (Environment Variable)
https://api.openai.com/v1export OPENAI_BASE_URL="https://your-custom-llm-host/v1"AI_MODEL (Environment Variable)
TOPIC_TITLE_MODEL is not set.gpt-4o-miniexport AI_MODEL="gpt-3.5-turbo"EMBEDDING_MODEL (Environment Variable)
text-embedding-3-smallexport EMBEDDING_MODEL="text-embedding-ada-002"TOPIC_TITLE_MODEL (Environment Variable)
AI_MODEL.AI_MODELexport TOPIC_TITLE_MODEL="gpt-4o-mini"These settings control how image prompts are cleaned and normalized before being sent to the embedding model, aiming to improve the semantic quality of clustering and search results by removing boilerplate text.
IIB_PROMPT_NORMALIZE (Environment Variable)
1 (enable), 0 (disable), true, false, yes, no, on, off1 (enabled)export IIB_PROMPT_NORMALIZE="0"IIB_PROMPT_NORMALIZE_MODE (Environment Variable)
balanced (recommended): Keeps some discriminative style words (e.g., "scientific illustration") while dropping common quality/camera terms.theme_only: More aggressive removal, focusing on "only subject/theme nouns."balancedexport IIB_PROMPT_NORMALIZE_MODE="theme_only"These environment variables fine-tune the behavior of the hierarchical tag graph feature, especially concerning LLM interactions.
IIB_TAG_GRAPH_MAX_TAGS_FOR_LLM (Environment Variable)
500export IIB_TAG_GRAPH_MAX_TAGS_FOR_LLM=200IIB_TAG_GRAPH_TOPK_TAGS_FOR_LLM (Environment Variable)
500export IIB_TAG_GRAPH_TOPK_TAGS_FOR_LLM=300IIB_TAG_GRAPH_LLM_TIMEOUT_SEC (Environment Variable)
180export IIB_TAG_GRAPH_LLM_TIMEOUT_SEC=300IIB_TAG_GRAPH_LLM_MAX_ATTEMPTS (Environment Variable)
5export IIB_TAG_GRAPH_LLM_MAX_ATTEMPTS=3IIB_COMFYUI_EXTRACT_ALL_PROMPTS (Environment Variable)
true, the ComfyUI parser will attempt to extract all available prompt texts from the workflow and combine them into the positive prompt field. This can be useful for workflows that don't clearly separate positive/negative prompts in the typical prompt and workflow fields.falseexport IIB_COMFYUI_EXTRACT_ALL_PROMPTS="true"IIB_ENABLE_SD_WEBUI_STEALTH_PARSER (Environment Variable)
sd-webui-stealth-pnginfo extension, which hides metadata in image pixels.falseexport IIB_ENABLE_SD_WEBUI_STEALTH_PARSER="true"