### Install Git and Python (Linux Example) Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/README.md Example command to install git and python3 with pip and venv on Ubuntu-based systems. ```bash sudo apt install git python3-pip python3-venv ``` -------------------------------- ### Install Git and Python (Debian/Ubuntu Server) Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/README.md Example command to install git and python3-full on Debian or Ubuntu Server. ```bash sudo apt install git python3-full ``` -------------------------------- ### Launch Standard Docker Installation (Windows) Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Docker.md Double-click this batch file in the 'launchtools' folder to start SwarmUI using the standard Docker installation on Windows. ```batch windows-standard-docker.bat ``` -------------------------------- ### Launch Standard Docker Installation (Linux) Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Docker.md Execute this script to start SwarmUI using the standard Docker installation on Linux. No command-line arguments are needed. ```bash ./launchtools/launch-standard-docker.sh ``` -------------------------------- ### Launch Open Docker Installation (Windows) Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Docker.md Double-click this batch file in the 'launchtools' folder to start SwarmUI using the open passthrough Docker installation on Windows. ```batch windows-open-docker.bat ``` -------------------------------- ### Launch Open Docker Installation (Linux) Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Docker.md Execute this script to start SwarmUI using the open passthrough Docker installation on Linux. No command-line arguments are needed. ```bash ./launchtools/launch-open-docker.sh ``` -------------------------------- ### Download Install Script (Linux) Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/README.md Download the Linux installation script using wget. ```bash wget https://github.com/mcmonkeyprojects/SwarmUI/releases/download/0.6.5-Beta/install-linux.sh -O install-linux.sh ``` -------------------------------- ### Confirm Installation (WebSocket) Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/APIRoutes/BasicAPIFeatures.md WebSocket route for confirming initial installation steps from the UI, requiring various configuration parameters. ```APIDOC ## WS /API/InstallConfirmWS ### Description Websocket route for the initial installation from the UI. ### Method WS ### Endpoint /API/InstallConfirmWS ### Parameters #### Query Parameters - **theme** (String) - Required - Selected user theme. - **installed_for** (String) - Required - Selected install_for (network mode choice) value. - **backend** (String) - Required - Selected backend (comfy/none). - **models** (String) - Required - Selected models to predownload. - **install_amd** (Boolean) - Required - If true, install with AMD GPU compatibility. - **language** (String) - Required - Selected user language. - **make_shortcut** (Boolean) - Optional - If true, make a Desktop shortcut. Default: `False`. ### Response (Response format not detailed in source, typically indicates success or failure of the WebSocket connection and initial setup.) ``` -------------------------------- ### Example Developmental Launch Configuration Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Command Line Arguments.md This example demonstrates a typical command for launching SwarmUI in a development environment on Windows, specifying host, port, environment, and launch mode. ```powershell .\launch-windows-dev.ps1 --host * --port 7850 --environment development --launch_mode web ``` -------------------------------- ### C# SwarmUI API Client Example Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/API.md This C# code demonstrates how to establish a connection, manage sessions, and generate images using the SwarmUI API. It includes error handling for invalid sessions and API errors. Ensure you have the Newtonsoft.Json library installed. ```csharp using System.Text; using System.Net; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using FreneticUtilities.FreneticToolkit; using FreneticUtilities.FreneticExtensions; namespace MySwarmClient; public static class SwarmAPI { public static HttpClient Client = new(); public static string Session = ""; public static string Address => "http://127.0.0.1:7801"; static SwarmAPI() { Client.DefaultRequestHeaders.Add("user-agent", "MySwarmClient/1.0"); } public class SessionInvalidException : Exception { } public static async Task GetSession() { JObject sessData = await Client.PostJson($"{Address}/API/GetNewSession", []); Session = sessData["session_id"].ToString(); } public static async Task GenerateAnImage(string prompt) { return await RunWithSession(async () => { JObject request = new() { ["images"] = 1, ["session_id"] = Session, ["donotsave"] = true, ["prompt"] = prompt, ["negativeprompt"] = "", ["model"] = "OfficialStableDiffusion/sd_xl_base_1.0", ["width"] = 1024, ["height"] = 1024, ["cfgscale"] = 7.5, ["steps"] = 20, ["seed"] = -1 }; JObject generated = await Client.PostJson($"{Address}/API/GenerateText2Image", request); if (generated.TryGetValue("error_id", out JToken errorId) && errorId.ToString() == "invalid_session_id") { throw new SessionInvalidException(); } else if (generated.TryGetValue("error", out JToken errorMessage)) { throw new Exception($"Swarm API error: {errorMessage}"); } return $"{generated["images"].First()}"; }); } public static async Task RunWithSession(Func> call) { if (string.IsNullOrWhiteSpace(Session)) { await GetSession(); } try { return await call(); } catch (SessionInvalidException) { await GetSession(); return await call(); } } /// Sends a JSON object post and receives a JSON object back. public static async Task PostJson(this HttpClient client, string url, JObject data) { ByteArrayContent content = new(data.ToString(Formatting.None).EncodeUTF8()); content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); return JObject.Parse(await (await client.PostAsync(url, content)).Content.ReadAsStringAsync()); } } ``` -------------------------------- ### Install Triton-Windows and SageAttention on Windows Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Advanced Usage.md Follow these steps to install Triton-Windows and SageAttention within the SwarmUI environment on Windows. Ensure you have a matching global Python version and copy necessary folders from the global Python installation to the embedded one. ```bash .\python_embeded\python.exe -s -m pip install triton-windows ``` ```bash .\python_embeded\python.exe -s -m pip install sageattention ``` -------------------------------- ### Example Output for NewURL Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Features/AutoScalingBackend.md This example demonstrates how to output a new URL for a SwarmUI instance, which is used to declare a valid SwarmUI instance has spun up at the given URL. The URL must be accessible to the master Swarm instance. ```bash export URL="http://192.168.0.1:7801/"; echo "[SwarmAutoScaleBackend]NewURL: $URL[/SwarmAutoScaleBackend]" ``` -------------------------------- ### Configure SageAttention in SwarmUI Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Advanced Usage.md After installation, enable SageAttention by adding the '--use-sage-attention' argument to the Comfy Self Start backend's ExtraArgs in SwarmUI server settings. ```text --use-sage-attention ``` -------------------------------- ### Example Output for DoRetries Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Features/AutoScalingBackend.md This example shows how to specify the number of retries for connecting to a SwarmUI instance. This is useful for networks with high latency or slow launch times. Emit this setting before NewURL. ```bash echo "[SwarmAutoScaleBackend]DoRetries: 5[/SwarmAutoScaleBackend]" ``` -------------------------------- ### Install .NET and Cloudflared Dependencies Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/colab/colab-notebook.ipynb Installs the .NET 8.0 SDK and the Cloudflared service, which are required for SwarmUI operation. ```bash # Install dotnet dependencies !wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh !chmod +x dotnet-install.sh !./dotnet-install.sh --channel 8.0 # Install Clouldflared !wget https://github.com/cloudflare/cloudflared/releases/download/2024.8.2/cloudflared-linux-amd64.deb !dpkg -i cloudflared-linux-amd64.deb ``` -------------------------------- ### Example Output for DeclareFailed Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Features/AutoScalingBackend.md This example demonstrates how to declare that scaling is not currently possible. The server will then make do with the resources it currently has. ```bash echo "[SwarmAutoScaleBackend]DeclareFailed: Not enough GPUs available[/SwarmAutoScaleBackend]" ``` -------------------------------- ### Install Pip Dependency on Linux/Mac Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Troubleshooting.md Activate the virtual environment and use this command to install a pip package on Linux or macOS. The `-s` flag ensures the package is installed in the current environment. ```bash source venv/bin/activate python -s -m pip install transformers -U ``` -------------------------------- ### Make Install Script Executable (Linux) Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/README.md Make the downloaded install-linux.sh script executable. ```bash chmod +x install-linux.sh ``` -------------------------------- ### Example Slurm Launch Command Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Features/AutoScalingBackend.md This is an example of how to launch a Swarm worker using Slurm, specifying node count, GPU allocation, exclusivity, and partition. ```bash srun --nodes=1 --gpus=8 --exclusive --partition=wherever mywork.sh ``` -------------------------------- ### Install Pip Dependency on Windows Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Troubleshooting.md Use this command to install a pip package on Windows within the SwarmUI ComfyUI directory. The `-s` flag ensures the package is installed in the current environment. ```bash python_embeded\python.exe -s -m pip install transformers -U ``` -------------------------------- ### Install Python and Virtualenv (macOS) Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/README.md Install Python 3.11 and virtualenv using Homebrew on macOS. ```bash brew install python@3.11 ``` ```bash brew install virtualenv ``` -------------------------------- ### InstallExtension Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/APIRoutes/AdminAPI.md Installs an extension from the known extensions list. This action signals a required rebuild but does not trigger a server restart. ```APIDOC ## HTTP Route /API/InstallExtension ### Description Installs an extension from the known extensions list. Does not trigger a restart. Does signal required rebuild. ### Method POST ### Endpoint /API/InstallExtension ### Parameters #### Request Body - **extensionName** (String) - Required - The name of the extension to install, from the known extensions list. ### Request Example { "extensionName": "example_extension" } ### Response #### Success Response (200) - **success** (boolean) - Indicates if the extension was installed successfully. ### Response Example { "success": true } ``` -------------------------------- ### Launch SwarmUI (Linux - Default) Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/README.md Execute the launch script to start SwarmUI on Linux with default settings. ```bash ./launch-linux.sh ``` -------------------------------- ### Verify Python Pip Installation (Linux) Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/README.md Command to verify that the Python pip installation is working correctly. ```bash python3.11 -m pip --version ``` -------------------------------- ### Skill File Structure Example Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/AGENTS.md This is the required format for creating new skill files. It includes metadata and detailed instructions for agents. ```markdown --- name: my-skill description: Short description of what this skill does and when to use it. --- # My Skill Detailed instructions for the agent. ## When to Use - Use this skill when... - This skill is helpful for... ## Instructions - Step-by-step guidance for the agent - Domain-specific conventions - Best practices and patterns - Use the ask questions tool if you need to clarify requirements with the user ``` -------------------------------- ### Custom Model Loader Example Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Making Extensions.md An example of a custom model loader within a Model Generation Step. This handles loading models for a specific custom class. ```csharp if (g.CurrentCompatClass() == "my-custom-class-compat-id-here") { string modelNode = g.CreateNode("CheckpointLoaderSimple", new JObject() { ["ckpt_name"] = model.ToString(g.ModelFolderFormat) }); g.LoadingModel = [modelNode, 0]; g.LoadingClip = [modelNode, 1]; g.LoadingVAE = [modelNode, 2]; } ``` -------------------------------- ### Verify Brew Installation (macOS) Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/README.md Check the health of your Homebrew installation on macOS. ```bash brew doctor ``` -------------------------------- ### HTTP Route /API/ComfyInstallFeatures Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/APIRoutes/ComfyUIWebAPI.md Installs new features into ComfyUI. Requires the 'install_features' permission flag and takes a string of features to install. ```APIDOC ## HTTP Route /API/ComfyInstallFeatures ### Description Installs new features into ComfyUI. ### Method POST ### Endpoint /API/ComfyInstallFeatures ### Parameters #### Query Parameters - **features** (String) - Required - A string specifying the features to install. ### Request Example ```json { "features": "feature1,feature2" } ``` ### Response #### Success Response (200) (RETURN INFO NOT SET) #### Response Example (RETURN INFO NOT SET) ``` -------------------------------- ### Full Image Metadata Example Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Image Metadata Format.md This JSON object represents a complete example of image metadata, including generation parameters, extra data, and model details. It is useful for understanding the expected structure when saving or loading image generation configurations. ```json { "sui_image_params": { "prompt": "a photo of a cat", "model": "OfficialStableDiffusion/sd_xl_base_1.0", "seed": 1, "steps": 20, "cfgscale": 7.0, "aspectratio": "1:1", "width": 1024, "height": 1024, "automaticvae": true, "negativeprompt": "", "swarm_version": "0.9.3.1" }, "sui_extra_data": { "date": "2025-01-25", "prep_time": "6.11 sec", "generation_time": "4.84 sec" }, "sui_models": [ { "name": "OfficialStableDiffusion/sd_xl_base_1.0.safetensors", "param": "model", "hash": "0xd7a9105a900fd52748f20725fe52fe52b507fd36bee4fc107b1550a26e6ee1d7" } ] } ``` -------------------------------- ### Clone SwarmUI Repository (Windows) Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/README.md Clone the SwarmUI repository to your desired installation folder on Windows. ```bash git clone https://github.com/mcmonkeyprojects/SwarmUI ``` -------------------------------- ### Example Return Data Format Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/APIRoutes/AdminAPI.md This JSON structure illustrates the format of returned data, including sequence IDs and timestamped messages. ```json "last_sequence_id": 123, "data": { "info": [ { "sequence_id": 123, "timestamp": "yyyy-MM-dd HH:mm:ss.fff", "message": "messagehere" }, ... ] } ``` -------------------------------- ### Get User Settings Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/APIRoutes/BasicAPIFeatures.md Retrieves the user's current settings, including theme configurations and general preferences. ```json "themes": { "theme_id": { "name": "Theme Name", "is_dark": true, "css_paths": ["path1", "path2"] } }, "settings": { "setting_id": "value" } ``` -------------------------------- ### Disabling Comfy Backend Virtual Environment Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Command Line Arguments.md On Linux, set the `SWARM_NO_VENV` environment variable to `true` to prevent Swarm from creating a virtual environment when installing the Comfy backend. This is typically for containerized setups. ```bash export SWARM_NO_VENV=true ``` -------------------------------- ### Install Pip Dependency in Docker Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Troubleshooting.md When using Docker, explicitly call the Python executable within the virtual environment to install a pip package. The `-s` flag ensures the package is installed in the current environment. ```bash ./venv/bin/python -s -m pip install transformers -U ``` -------------------------------- ### Displaying Help Information Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Command Line Arguments.md The `--help` argument displays a concise list of available command-line arguments and usage hints within the CLI, then exits before Swarm starts. ```bash --help ``` -------------------------------- ### Temporary SwarmUI Install Path Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/colab/colab-notebook.ipynb Sets the SWARMPATH variable for a temporary installation directly within the Colab environment. ```python SWARMPATH = '/content/' ``` -------------------------------- ### Basic SwarmUI Extension Csproj File Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Making Extensions.md This is a foundational `.csproj` file template for a SwarmUI extension. It imports necessary SwarmUI properties and sets the assembly name. ```xml MyFirstExtension ``` -------------------------------- ### Register Installable Node Pack Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Making Extensions.md Register a node pack as an installable feature. This allows ComfyUI to auto-install and update the pack. ```csharp InstallableFeatures.RegisterInstallableFeature(new("Node Pack Proper Name", "shortidhere", "https://github.com/mcmonkey4eva/MyNodePackHere", "Author Name Here", AutoInstall: true)); ``` -------------------------------- ### Configure and Run SwarmUI with Docker Compose Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Docker.md Set up and launch SwarmUI using a custom docker-compose.yml file. Ensure you set the HOST_UID and HOST_GID environment variables. ```bash HOST_UID="$(id -u)" HOST_GID="$(id -g)" docker compose up ``` -------------------------------- ### Model Folder and File Structure Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/APIRoutes/ModelsAPI.md Illustrates the expected JSON structure for returning folder and file information. ```json "folders": ["folder1", "folder2"], "files": [ { "name": "namehere", // etc., see `DescribeModel` for the full model description } ] ``` -------------------------------- ### Image-to-Video Swap Model Prompting Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Features/Prompt Syntax.md Utilize `` for alternate prompts specifically for the swap stage in image-to-video generation with swap models. This allows for video swap model-specific LoRAs. ```prompt ``` -------------------------------- ### Change Server Settings Return Format Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/APIRoutes/AdminAPI.md Confirms successful application of new server settings. ```js "success": true ``` -------------------------------- ### Install Pip Packages within SwarmUI Container Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Docker.md Install Python packages inside the SwarmUI Docker container. Navigate to the correct directory and use the provided Python executable. ```bash cd /SwarmUI/dlbackend/ComfyUI ./venv/bin/python -s -m pip install ... ``` -------------------------------- ### Launch SwarmUI (macOS) Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/README.md Run the macOS launch script after cloning the repository and navigating into the SwarmUI directory. ```bash ./launch-macos.sh ``` -------------------------------- ### Launch SwarmUI (Windows) Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/README.md Execute the batch file to launch SwarmUI on Windows after cloning the repository. ```batch launch-windows.bat ``` -------------------------------- ### Google Drive SwarmUI Install Path Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/colab/colab-notebook.ipynb Mounts Google Drive and sets SWARMPATH for installation within Google Drive. It also handles pip requirements for a ComfyUI backend if present. ```python from google.colab import drive drive.mount('/content/drive') SWARMPATH = '/content/drive/MyDrive' # Colab breaks venvs, and doesn't save anything valid to drive, so just screw it do a global install of pip reqs if we used a comfy backend in the drive !if [[ -f "$SWARMPATH/SwarmUI/dlbackend/ComfyUI/requirements.txt" ]]; then rm -rf $SWARMPATH/SwarmUI/dlbackend/ComfyUI/venv/; pip install -r $SWARMPATH/SwarmUI/dlbackend/ComfyUI/requirements.txt; fi ``` -------------------------------- ### Navigate to SwarmUI Directory (Linux) Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/Docker.md Change the current directory to the cloned SwarmUI project folder on Linux. ```bash cd SwarmUI ``` -------------------------------- ### Launch SwarmUI (Linux - Headless Server) Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/README.md Launch SwarmUI on a headless Linux server, binding to all interfaces and disabling automatic browser launch. ```bash ./launch-linux.sh --launch_mode none --host 0.0.0.0 ``` -------------------------------- ### List Server Settings Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/APIRoutes/AdminAPI.md Retrieves a list of all server settings with their full metadata. Requires the 'read_server_settings' permission. ```APIDOC ## HTTP Route /API/ListServerSettings ### Description Returns a list of the server settings, will full metadata. ### Permission Flag `read_server_settings` - `Read Server Settings` in group `Admin` ### Parameters **None.** ### Return Format ```js "settings": { "settingname": { "type": "typehere", "name": "namehere", "value": somevaluehere, "description": "sometext", "values": [...] or null, "value_names": [...] or null } } ``` ``` -------------------------------- ### ListT2IParams Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/APIRoutes/T2IAPI.md Get a list of available Text-to-Image parameters. Requires 'fundamental_generate_tab_access' permission. ```APIDOC ## HTTP Route /API/ListT2IParams ### Description Get a list of available T2I parameters. ### Permission Flag `fundamental_generate_tab_access` - `Fundamental Generate Tab Access` in group `User` ### Parameters **None.** ### Return Format ```js "list": [ { "name": "Param Name Here", "id": "paramidhere", "description": "parameter description here", "type": "type", // text, integer, etc "subtype": "Stable-Diffusion", // can be null "default": "default value here", "min": 0, "max": 10, "view_max": 10, "step": 1, "values": ["value1", "value2"], // or null "examples": ["example1", "example2"], // or null "visible": true, "advanced": false, "feature_flag": "flagname", // or null "toggleable": true, "priority": 0, "group": "idhere", // or null "always_retain": false, "do_not_save": false, "do_not_preview": false, "view_type": "big", // dependent on type "extra_hidden": false } ], "groups": [ { "name": "Group Name Here", "id": "groupidhere", "toggles": true, "open": false, "priority": 0, "description": "group description here", "advanced": false, "can_shrink": true, "parent": "idhere" // or null } ], "models": { "Stable-Diffusion": ["model1", "model2"], "LoRA": ["model1", "model2"], // etc }, "wildcards": ["wildcard1", "wildcard2"], "param_edits": // can be null { // (This is interface-specific data) } ``` ``` -------------------------------- ### Get Server Resource Info Return Format Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/APIRoutes/AdminAPI.md Returns detailed information about the server's resource utilization, including CPU usage and cores, system RAM (total, used, free), and GPU information if available. ```js "cpu": { "usage": 0.0, "cores": 0 }, "system_ram": { "total": 0, "used": 0, "free": 0 }, "gpus": { "0": { "id": 0, "name": "namehere", "temperature": 0, "utilization_gpu": 0, "utilization_memory": 0, "total_memory": 0, "free_memory": 0, "used_memory": 0 } } ``` -------------------------------- ### AdminGetUserInfo Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/APIRoutes/AdminAPI.md Admin route to get info about a user. This API is experimental and subject to change. ```APIDOC ## HTTP Route /API/AdminGetUserInfo ### Description Admin route to get info about a user. ### Method GET ### Endpoint /API/AdminGetUserInfo ### Parameters #### Query Parameters - **name** (String) - Required - The name of the user to get info for. ### Response #### Success Response (200) - **user_id** (String) - The ID of the user. - **password_set_by_admin** (Boolean) - True if the password was set by an admin, false otherwise. - **settings** (Object) - User settings. - **max_t2i** (Int32) - The actual value of max t2i simultaneous, calculated from current roles and available backends. ### Response Example ```json { "user_id": "useridhere", "password_set_by_admin": true, "settings": { ... }, "max_t2i": 32 } ``` ``` -------------------------------- ### Logout API Response Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/docs/APIRoutes/BasicAPIFeatures.md Example of a successful logout response. This indicates that all user sessions have been closed. ```js "success": "true" ``` -------------------------------- ### Example of Fetch vs. GenericRequest in SwarmUI Source: https://github.com/mcmonkeyprojects/swarmui/blob/master/CONTRIBUTING.md LLMs may use standard JavaScript `fetch` instead of the project's specific `genericRequest` function. Always ensure relevant local functions are used. ```javascript // LLM might write this: // fetch("/api/data").then(response => response.json()).then(data => console.log(data)); // SwarmUI uses genericRequest: genericRequest("/api/data", (data) => { console.log(data); }); ```