///
The desktop application version of `sd-webui-infinite-image-browsing` provides a convenient way to run the application without needing a Python environment or the Stable Diffusion web UI. This page ou
14 views
~14 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.
The desktop application version of sd-webui-infinite-image-browsing provides a convenient way to run the application without needing a Python environment or the Stable Diffusion web UI. This page outlines the process of building and deploying this standalone application.
For most users, the easiest way to use the desktop application is to download a pre-built binary:
releases section on the right-hand side of the GitHub repository page↗.If you prefer to compile the application yourself, for development, customization, or increased trust, you can do so by following the steps below. The desktop application uses a combination of Python (for the backend API and image processing) and Rust with Tauri (for the desktop wrapper and frontend UI).
To self-compile, you will need to set up a development environment with:
pippnpm (or npm/yarn)Cargo (Rust's package manager)cargo install tauri-cli (or pnpm add -g @tauri-apps/cli).build-essential and webkit2gtk-4.0 development packages.The project's .github/workflows/tauri_app_build.yml workflow provides a complete example of the build process used for official releases. The general steps are as follows:
Clone the Repository:
Install Dependencies: First, ensure all Python and JavaScript dependencies are installed.
Python Dependencies:
(Refer to Installation and Setup for optional dependency notes like hnswlib).
JavaScript Dependencies:
Build Python Backend Executable (PyInstaller):
The Python FastAPI backend (app.py) needs to be compiled into a standalone executable. The pyinstaller_hooks/ directory contains custom hooks to ensure all necessary multimedia libraries (like av, imageio, pillow_avif) are correctly bundled.
The app.py is compiled into an executable named iib_api_server. This executable also bundles the pre-built Vue.js frontend assets (vue/dist) and the tags-translate.csv file.
You can run a command similar to what's in the GitHub Actions workflow:
This command will generate the iib_api_server executable in the dist/ directory (relative to the repository root, not vue/dist).
Build Tauri Frontend and Desktop Wrapper:
With the Python backend executable ready, you can now build the Tauri application. The Tauri build process will compile the Rust code (vue/src-tauri/src/main.rs), which launches the iib_api_server as a "sidecar" process.
Navigate to the vue directory (where vite.config.ts and package.json for the frontend reside) and run:
This command will:
iib_api_server executable into the final desktop application package.The final executable/installer will be located in vue/src-tauri/target/release/bundle/.
iib_api_server as a hidden background process. This Python backend serves the UI assets and handles all API requests.vue/src-tauri/src/main.rs script passes arguments like --allow_cors, --enable_shutdown, and --sd_webui_dir to the iib_api_server.
--allow_cors: Enables necessary cross-origin communication between the frontend and the local backend API.--enable_shutdown: Allows the Tauri app to gracefully shut down the Python backend when the desktop application is closed.--sd_webui_dir: If configured in app.conf.json (a configuration file used by the Tauri app), this option directs the Python backend to use an existing Stable Diffusion web UI's configuration and share its database. This is a key feature for seamless integration.iib.db database file is typically located within the application's data directory or the sd_webui_dir if specified, allowing data persistence.