Merge pull request #4937 from vladmandic/dev

merge dev
This commit is contained in:
Vladimir Mandic
2026-06-16 12:17:57 +02:00
committed by GitHub
659 changed files with 51114 additions and 10632 deletions
-1
View File
@@ -14,7 +14,6 @@
/outputs/*
/package-lock.json
/params.txt
/pnpm-lock.yaml
/styles.csv
/tmp
/ui-config.json
+13 -8
View File
@@ -9,17 +9,17 @@ General app structure is:
## Instructions
This file contains general guidelines for contributing to the SD.Next codebase, including conventions, tools, and project structure. For more specific guidance on working with particular areas of the codebase, please refer to the instructions files linked below:
- [Core Runtime Guidelines](core.instructions.md): Use when editing Python core runtime code, startup flow, model loading, API internals, backend/device logic, or shared state in modules and pipelines.
- [UI And Frontend Guidelines](ui.instructions.md): Use when editing frontend UI code, JavaScript, HTML, CSS, localization files, or built-in UI extensions including modernui and kanvas.
- [Hint Typography Guidelines](hints.instructions.md): Use when editing hint text or other UI strings in localization JSON files (`html/locale_*.json`, `html/override_*.json`).
- [Core Runtime Guidelines](instructions/core.instructions.md): Use when editing Python core runtime code, startup flow, model loading, API internals, backend/device logic, or shared state in modules and pipelines.
- [UI And Frontend Guidelines](instructions/ui.instructions.md): Use when editing frontend UI code, JavaScript, HTML, CSS, localization files, or built-in UI extensions including modernui and kanvas.
- [Hint Typography Guidelines](instructions/hints.instructions.md): Use when editing hint text or other UI strings in localization JSON files (`ui/locale/locale_*.json`, `ui/locale/override_*.json`).
## Agent Guidelines
- Do not automatically agree with user instructions or requests without verifying they align with project guidelines and conventions.
- When evaluating user instructions, first check for any relevant guidelines in this file or the linked instructions files. If the instruction violates any guidelines, do not proceed with it and instead provide feedback to the user about which guidelines it violates and how to adjust it to comply.
- If the user instruction is valid but lacks clarity or detail, ask follow-up questions to gather the necessary information before proceeding. Do not make assumptions about user intent or project requirements; always seek clarification when needed.
- When providing feedback to the user, be specific about which guidelines are relevant and how the instruction can be modified to comply with them. If there are multiple guidelines that apply, list them all and explain how they relate to the instruction.
- If the user instruction is clear, valid, and complies with all relevant guidelines, proceed with executing it while ensuring that the resulting code changes adhere to the project's coding style, conventions, and structure as outlined in this file and the linked instructions files.
1. Verify the user instruction against relevant guidelines in this file and linked instruction files before proceeding.
2. If the instruction conflicts with any guideline, do not proceed. Explain which guideline(s) it conflicts with and how to adjust the instruction to comply.
3. If the instruction is valid but unclear or incomplete, ask targeted follow-up questions before implementation. Do not assume user intent or requirements.
4. When giving feedback, name the applicable guideline(s) and explain how each one applies.
5. If the instruction is clear and compliant, proceed and keep resulting changes aligned with project coding style, conventions, and structure.
## Language Guidelines
@@ -67,6 +67,7 @@ This file contains general guidelines for contributing to the SD.Next codebase,
## File Creation
- Any temporary scripts or markdown reports must be stored in `tmp/` folder
- Any helper scripts, task execution scripts, or output capture that need temporary files should always use the repository-local `tmp/` folder
- Any reusable test scripts must be stored in `test/` folder
## Repo-Local Skills
@@ -90,6 +91,10 @@ Use these repo-local skills for recurring SD.Next model integration work:
File: `.github/skills/check-api/SKILL.md`
Use when auditing API routes in `modules/api/api.py` and validating endpoint parameters plus request/response signatures.
- `check-paths`
File: `.github/skills/check-paths/SKILL.md`
Use when auditing model-loading calls to verify `cache_dir` routing for `from_pretrained` and `from_single_file`.
- `check-schedulers`
File: `.github/skills/check-schedulers/SKILL.md`
Use when auditing scheduler registrations in `modules/sd_samplers_diffusers.py` for class loadability, config validity, and `SamplerData` mapping correctness.
+34 -10
View File
@@ -1,18 +1,43 @@
---
description: "Use when editing Python core runtime code, startup flow, model loading, API internals, backend/device logic, or shared state in modules and pipelines."
name: "Core Runtime Guidelines"
applyTo: "launch.py, webui.py, installer.py, modules/**/*.py, pipelines/**/*.py, scripts/**/*.py, extensions-builtin/**/*.py"
applyTo: "launch.py, webui.py, installer.py, modules/**/*.py, pipelines/**/*.py, scripts/**/*.py, extensions-builtin/**/*.py, cli/**/*.py"
---
## Agent Guidelines
1. Verify the user instruction against relevant guidelines in this file and linked instruction files before proceeding.
2. If the instruction conflicts with any guideline, do not proceed. Explain which guideline(s) it conflicts with and how to adjust the instruction to comply.
3. If the instruction is valid but unclear or incomplete, ask targeted follow-up questions before implementation. Do not assume user intent or requirements.
4. When giving feedback, name the applicable guideline(s) and explain how each one applies.
5. If the instruction is clear and compliant, proceed and keep resulting changes aligned with project coding style, conventions, and structure.
## Language Guidelines
- Use clear and concise language when communicating with users, providing feedback, and explaining guidelines.
- Avoid unnecessary pleasantries or filler language; focus on the technical content and actionable feedback.
- When asking follow-up questions for clarification, be direct and specific about the information needed to proceed with the instruction while ensuring that the questions are relevant to the project guidelines and conventions.
# Core Runtime Guidelines
- Preserve startup ordering and import timing in `launch.py` and `webui.py`; avoid moving initialization steps unless required.
- Treat `modules/shared.py` as the source of truth for global runtime state (`shared.opts`, model references, backend/device flags).
- Prefer narrow changes with explicit side effects; avoid introducing new cross-module mutable globals.
- Keep platform paths neutral: do not assume CUDA-only behavior and preserve ROCm/IPEX/DirectML/OpenVINO compatibility branches.
- Keep extension and script loading resilient: when adding startup scans/hooks, preserve partial-failure tolerance and logging.
- Follow existing API/server patterns under `modules/api/` and reuse shared queue/state helpers rather than ad-hoc request handling.
- Reuse established model-loading and pipeline patterns (`modules/sd_*`, `pipelines/`) instead of creating parallel abstractions.
- For substantial Python changes, run at least relevant checks: `npm run ruff` and `npm run pylint` (or narrower equivalents when appropriate).
1. Preserve startup ordering and import timing in `launch.py` and `webui.py`; avoid moving initialization steps unless required to fix a critical startup bug or implement a new startup feature.
2. Treat `modules/shared.py` as the source of truth for global runtime state (`shared.opts`, model references, backend/device flags).
3. Prefer narrow changes (changes scoped to a single function or module when feasible) with explicit side effects; avoid introducing new cross-module mutable globals.
4. Keep platform paths neutral: do not assume CUDA-only behavior and preserve ROCm/IPEX/DirectML/OpenVINO compatibility branches.
5. Keep extension and script loading resilient: when adding startup scans/hooks, preserve partial-failure tolerance and logging.
6. Follow existing API/server patterns under `modules/api/` and reuse shared queue/state helpers rather than ad-hoc request handling.
7. Reuse established model-loading and pipeline patterns (`modules/sd_*`, `pipelines/`) instead of creating parallel abstractions.
8. For substantial Python changes, run at least relevant checks: `pnpm run ruff` and `pnpm run pylint` (or narrower equivalents when appropriate).
## Tools
- `venv` for Python environment management, activated with `source venv/bin/activate` (Linux) or `venv\Scripts\activate` (Windows).
venv MUST be activated before running any Python commands or scripts to ensure correct dependencies and environment variables.
- `python` 3.10+.
- `pyproject.toml` for Python configuration, including linting and type checking settings.
- `pnpm` for managing JavaScript dependencies and scripts, with key commands defined in `package.json`.
- `ruff` and `pylint` for Python linting, with configurations in `pyproject.toml` and executed via `pnpm ruff` and `pnpm pylint`.
- `pre-commit` hooks which also check line-endings and other formatting issues, configured in `.pre-commit-config.yaml`.
- When writing helper scripts or capturing temporary output/files for a task, always use the repository-local `tmp/` folder.
## Build And Test
@@ -21,7 +46,6 @@ applyTo: "launch.py, webui.py, installer.py, modules/**/*.py, pipelines/**/*.py,
- Full startup: `python launch.py`
- Full lint sequence: `pnpm lint`
- Python checks individually: `pnpm ruff`, `pnpm pylint`
- JS checks: `pnpm eslint` and `pnpm eslint-ui`
## Pitfalls
+25 -25
View File
@@ -1,50 +1,50 @@
---
description: "Use when editing hint text or other UI strings in localization JSON files."
description: "Use when editing hint text or other UI strings in localization JSON files; follow the ordered rules below for consistent formatting."
name: "Hint Typography Guidelines"
applyTo: "html/locale_*.json, html/override_*.json"
applyTo: "ui/locale/*.json"
---
# Hint Typography Guidelines
Hint strings render as HTML. Use this small set of inline tags to keep hints scannable:
- `<b>` for values: defaults, dropdown enums, specific numerics. Examples: `<b>0.30</b>`, `<b>Karras</b>`, `<b>v_prediction</b>`, `<b>UniPC</b>`.
- `<b><i>...</i></b>` for cross-references to other UI controls by their exact visible label. Examples: `<b><i>Denoising strength</i></b>`, `<b><i>Use init image</i></b>`, `<b><i>Images</i></b> tab.
- `<i>` for proper nouns: model families, datasets, technique names. Examples: `<i>SDXL</i>`, `<i>Flux</i>`, `<i>ControlNet</i>`, `<i>YOLO</i>`.
- `<code>` for literals: paths, filename tokens, command-line snippets to type or use verbatim. Examples: `<code>models/yolo</code>`, `<code>-seg</code>`, `<code>[PROMPT]</code>`.
1. `<b>` for values: defaults, dropdown enums, specific numerics. Examples: `<b>0.30</b>`, `<b>Karras</b>`, `<b>v_prediction</b>`, `<b>UniPC</b>`.
2. `<b><i>...</i></b>` for cross-references to other UI controls by their exact visible label. Examples: `<b><i>Denoising strength</i></b>`, `<b><i>Use init image</i></b>`, `<b><i>Images</i></b>` tab.
3. `<i>` for proper nouns: model families, datasets, technique names. Examples: `<i>SDXL</i>`, `<i>Flux</i>`, `<i>ControlNet</i>`, `<i>YOLO</i>`.
4. `<code>` for literals: paths, filename tokens, command-line snippets to type or use verbatim. Examples: `<code>models/yolo</code>`, `<code>-seg</code>`, `<code>[PROMPT]</code>`.
## Cross-references
- Use `<b><i>...</i></b>` whenever a hint refers to another control by its exact visible label. This includes setting names, tab names, and named buttons.
- Match the label exactly, including capitalization and spacing; readers look for the same string in the UI.
- Do not use `<b>` and `<i>` separately for cross-references; always combine them.
- Generic concept references (`the model`, `the prompt`, `the scheduler`) stay unstyled.
1. Use `<b><i>...</i></b>` whenever a hint refers to another control by its exact visible label. This includes setting names, tab names, and named buttons.
2. Match the label exactly, including capitalization and spacing; readers look for the same string in the UI.
3. Do not use `<b>` and `<i>` separately for cross-references; always combine them.
4. Generic concept references (`the model`, `the prompt`, `the scheduler`) stay unstyled.
## Tab naming
- Refer to the unified generation tab as `<b><i>Images</i></b>` (the ModernUI label). Do not write "Control tab"; that label only exists in legacy Standard UI.
- "Control" remains valid as a setting value (`<b>No: Control only</b>`) or as part of a UI element name (`<b><i>Control input</i></b>` pane), just not as a tab name.
1. Refer to the unified generation tab as `<b><i>Images</i></b>` (the ModernUI label). Do not write "Control tab"; that label only exists in legacy Standard UI.
2. "Control" remains valid as a setting value (`<b>No: Control only</b>`) or as part of a UI element name (`<b><i>Control input</i></b>` pane), just not as a tab name.
## Structure
- `<br>` for a line break within a paragraph.
- `<br><br>` for a paragraph break.
- `<br>- <b>key</b>: description` for a keyed bullet list, used for short enumerations of dropdown values, modes, or numeric brackets. Each bullet's key is bolded; descriptions stay plain.
- Do not use `<ul>`, `<li>`, Markdown asterisks, or unicode bullets.
1. `<br>` for a line break within a paragraph.
2. `<br><br>` for a paragraph break.
3. `<br>- <b>key</b>: description` for a keyed bullet list, used for short enumerations of dropdown values, modes, or numeric brackets. Each bullet's key is bolded; descriptions stay plain.
4. Do not use `<ul>`, `<li>`, Markdown asterisks, or unicode bullets.
## Common pitfalls
- Do not bold ad-hoc emphasis; `<b>` is reserved for values and, combined with `<i>`, for cross-references.
- Do not use `<b>` for filenames, paths, or command tokens; those are literals and use `<code>`.
- Do not reword the inside of `<code>` blocks; they are literal user-facing strings.
- Stay ASCII; prefer semicolons or two sentences over em-dashes. The locale file convention is ASCII-only.
1. Do not bold ad-hoc emphasis; `<b>` is reserved for values and, combined with `<i>`, for cross-references.
2. Do not use `<b>` for filenames, paths, or command tokens; those are literals and use `<code>`.
3. Do not reword the inside of `<code>` blocks; they are literal user-facing strings.
4. Stay ASCII; prefer semicolons or two sentences over em-dashes. The locale file convention is ASCII-only.
## Translation propagation
- `html/locale_en.json` is the source of truth. Other `html/locale_*.json` files are auto-generated by `cli/localize.js`; edit only the English file.
- Per-locale corrections live in `html/override_{locale}.json`.
1. `ui/locale/locale_en.json` is the source of truth. Other `ui/locale/locale_*.json` files are auto-generated by `cli/localize.js`; edit only the English file.
2. Per-locale corrections live in `ui/locale/override_{locale}.json`.
## Validation
- Validate JSON syntax with `jq empty html/locale_en.json`.
- Lint with `pnpm eslint -- html/locale_en.json` (silent success).
- See `wiki/Hints.md` for the wiki-facing version of these rules.
1. Validate JSON syntax with `jq empty ui/locale/locale_en.json`.
2. Lint with `pnpm eslint -- ui/locale/locale_en.json` (silent success).
3. See `wiki/Hints.md` for the wiki-facing version of these rules.
+84 -9
View File
@@ -1,14 +1,89 @@
---
description: "Use when editing frontend UI code, JavaScript, HTML, CSS, localization files, or built-in UI extensions including modernui and kanvas."
description: "Use when editing frontend UI code, TypeScript, JavaScript, HTML, CSS, localization files, or built-in UI extensions including modernui and kanvas."
name: "UI And Frontend Guidelines"
applyTo: "javascript/**/*.js, html/**/*.html, html/**/*.css, html/**/*.js, extensions-builtin/sdnext-modernui/**/*, extensions-builtin/sdnext-kanvas/**/*"
applyTo: "ui/**/*, extensions-builtin/sdnext-modernui/**/*, extensions-builtin/sdnext-kanvas/**/*"
---
## Agent Guidelines
1. Verify the user instruction against relevant guidelines in this file and linked instruction files before proceeding.
2. If the instruction conflicts with any guideline, do not proceed. Explain which guideline(s) it conflicts with and how to adjust the instruction to comply.
3. If the instruction is valid but unclear or incomplete, ask targeted follow-up questions before implementation. Do not assume user intent or requirements.
4. When giving feedback, name the applicable guideline(s) and explain how each one applies.
5. If the instruction is clear and compliant, proceed and keep resulting changes aligned with project coding style, conventions, and structure.
## Language Guidelines
- Use clear and concise language when communicating with users, providing feedback, and explaining guidelines.
- Avoid unnecessary pleasantries or filler language; focus on the technical content and actionable feedback.
- When asking follow-up questions for clarification, be direct and specific about the information needed to proceed with the instruction while ensuring that the questions are relevant to the project guidelines and conventions.
# UI And Frontend Guidelines
- Preserve existing UI behavior and wiring between Gradio/Python endpoints and frontend handlers; do not change payload shapes without backend alignment.
- Follow existing project lint and style patterns; prefer consistency with nearby files over introducing new frameworks or architecture.
- Keep localization-friendly UI text changes synchronized with locale resources in `html/locale_*.json` when user-facing strings are added or changed.
- Avoid bundling unrelated visual refactors with functional fixes; keep UI PRs scoped and reviewable.
- For extension UI work, respect each extension's boundaries and avoid cross-extension coupling.
- Validate JavaScript changes with `pnpm eslint`; for modern UI extension changes also run `pnpm eslint-ui`.
- Maintain mobile compatibility when touching layout or interaction behavior.
Apply these rules in priority order:
If rules conflict, prioritize earlier rules over later ones unless explicitly stated otherwise.
1. Preserve the current event-handling logic and data flow between Gradio/Python endpoints and frontend handlers. Do not modify payload shapes or event-handling mechanisms unless explicitly aligned with the backend team.
2. Follow existing project lint and style patterns; prefer consistency with nearby files over introducing new frameworks or architecture.
3. Keep localization-friendly UI text changes synchronized with locale resources in `ui/locale/locale_*.json` when user-facing strings are added or changed. For dynamically generated UI text, ensure that localization keys are pre-defined and referenced appropriately in the codebase.
4. Avoid combining visual changes that do not directly support the functional fixes being implemented; ensure UI PRs are scoped to a single purpose and remain reviewable.
5. For extension UI work, respect each extension's boundaries and avoid cross-extension coupling.
6. Validate TypeScript and JavaScript changes with `pnpm run eslint` and `pnpm run tsc` from the repository root, or the equivalent extension-level command when working inside an extension.
7. Maintain mobile compatibility when touching layout or interaction behavior.
## UI code locations
- Core UI source: `ui/`
- Core build config: `ui/.build.json`
- ModernUI source: `extensions-builtin/sdnext-modernui/src/`
- Kanvas source: `extensions-builtin/sdnext-kanvas/src/`
- ModernUI built output: `extensions-builtin/sdnext-modernui/javascript/`
- Kanvas built output: `extensions-builtin/sdnext-kanvas/javascript/` and `extensions-builtin/sdnext-kanvas/dist/`
- Core built output: `ui/dist/`
> Do not edit built files directly. Always change source files and use the build commands to regenerate UI artifacts.
## Build and development commands
Ensure `pnpm` is installed:
- `npm install -g pnpm`
Install dependencies from the repository root:
- `pnpm install`
Build UI components:
- `pnpm run build:core` - build the core UI
- `pnpm run build:modernui` - build ModernUI
- `pnpm run build:kanvas` - build Kanvas
- `pnpm run build` - build all UI components
Run development builds with watch mode:
- `pnpm run dev:core` - development build for core UI
- `pnpm run dev:modernui` - development build for ModernUI
- `pnpm run dev:kanvas` - development build for Kanvas
## Lint and validation
UI checks are required for all frontend contributions:
- `pnpm run eslint:core` - lint core UI files
- `pnpm run eslint:modernui` - lint ModernUI files
- `pnpm run eslint:kanvas` - lint Kanvas files
- `pnpm run eslint` - lint all UI code
- `pnpm run tsc:core` - type-check core UI files
- `pnpm run tsc:modernui` - type-check ModernUI files
- `pnpm run tsc:kanvas` - type-check Kanvas files
- `pnpm run tsc` - type-check all UI code
- `pnpm run precommit` - run pre-commit checks across the repository
- `pnpm run ui` - run full UI lint/type/build sequence
## Notes
- UI changes require rebuilding before they are visible in the running application.
- If you are changing UI text, update localization resources in `ui/locale/` as needed.
- If a build command fails, check the error logs and ensure all dependencies are installed. Refer to the repository troubleshooting guide for common issues.
- Use the existing code patterns in the current UI folders rather than introducing parallel frontend frameworks.
+8
View File
@@ -32,6 +32,14 @@ This folder contains repo-local Copilot skills for recurring SD.Next tasks.
File: `check-processing/SKILL.md`
Use when validating txt2img/img2img/control processing workflows from UI submit definitions to backend execution with parameter, type, and initialization checks.
- `check-ui`
File: `check-ui/SKILL.md`
Use when auditing Python-to-JavaScript UI bindings for Gradio `_js` callbacks, verifying `window` exposure and `ui/globals.d.ts` registration.
- `check-paths`
File: `check-paths/SKILL.md`
Use when auditing model-loading calls to verify `cache_dir` routing for `from_pretrained` and `from_single_file`.
- `check-scripts`
File: `check-scripts/SKILL.md`
Use when auditing `scripts/*.py` for correct Script overrides (`__init__`, `title`, `show`) and verifying `ui()` output compatibility with `run()` or `process()` parameters.
+13 -77
View File
@@ -1,7 +1,7 @@
---
name: analyze-model
description: "Analyze an external model URL (typically Hugging Face) to determine implementation style and estimate SD.Next porting difficulty using the port-model workflow."
argument-hint: "Provide model URL and optional target scope: text2img, img2img, edit, video, or full integration"
argument-hint: "Provide model URL and, if applicable, specify target scope: text2img, img2img, edit, video, or full integration"
---
# Analyze External Model For SD.Next Porting
@@ -14,6 +14,10 @@ Given an external model URL, inspect how the model is implemented and estimate h
- User wants effort estimation before implementation work
- User wants to classify whether integration should reuse Diffusers, use custom Diffusers code, or require full custom implementation
## Guidance
- Consult `.github/instructions/core.instructions.md` for relevant core runtime and model integration guidance before proceeding.
## Accepted Inputs
- Hugging Face model URL (preferred)
@@ -47,83 +51,15 @@ Classify into one of these (or closest fit):
## Procedure
### 0. Handle Gated Models
Process in this order:
If the model repository returns HTTP 403 (Forbidden) or requires acceptance of a gating agreement:
1. Check `secrets.json` in the workspace root for a `huggingface_token` field
2. If token exists, retry accessing the model using that token for authentication
3. If token does not exist, is invalid, or access still denied, **abort the analysis** and report:
- Model name and URL
- Access requirement (waiting list, gated, license agreement)
- Instructions for user to authenticate or request access
- Skip further analysis
### 1. Inspect Model Repository Artifacts
From the provided URL/repo, collect:
- model card details
- files such as model_index.json, config.json, scheduler config, tokenizer files
- presence of Diffusers-style folder layout
- references to custom Python modules or remote code requirements
### 2. Determine Runtime Stack
Identify whether model usage is:
- standard Diffusers pipeline call
- custom Diffusers pipeline class with trust_remote_code
- pure custom inference script or framework
- node-based integration in ComfyUI or another host
### 3. Cross-Check Integration Surface
Determine required SD.Next touchpoints if ported:
- loader file in pipelines/model_name.py
- detect and dispatch updates in modules/sd_detect.py and modules/sd_models.py
- model type mapping in modules/modeldata.py
- optional custom pipeline package under pipelines/model/
- reference catalog updates and preview asset requirements
### 4. Estimate Porting Difficulty
Use this scale:
- Low: mostly loader wiring to existing upstream Diffusers pipeline
- Medium: custom Diffusers classes or limited checkpoint/config adaptation
- High: full custom architecture, major prompt/sampler/output differences, or sparse docs
- Very High: no usable Diffusers path plus major runtime assumptions mismatch
Break down difficulty by:
- loader complexity
- pipeline/API contract complexity
- scheduler/sampler compatibility
- prompt encoding complexity
- checkpoint conversion/remapping complexity
- validation and testing burden
### 5. Identify Risks
Call out concrete risks:
- missing or incompatible scheduler config
- unclear output domain (latent vs pixel)
- custom text encoder or processor constraints
- nonstandard checkpoint format
- dependency on external runtime features unavailable in SD.Next
### 6. Recommend Porting Path
Map recommendation to port-model workflow:
- Upstream Diffusers reuse path
- Custom Diffusers pipeline package path
- Raw checkpoint plus remap path
Provide a concise first-step plan with smallest viable integration milestone.
1. Handle gated models first: if access returns HTTP 403 or requires gated approval, check `secrets.json` for `huggingface_token` and retry with auth. If access still fails, abort analysis and report model URL, access requirement, and required user action.
2. Inspect repository artifacts: collect model card details, key config files (for example `model_index.json`, `config.json`, scheduler/tokenizer files), Diffusers-style layout signals, and any custom module or remote code requirements.
3. Determine runtime stack: classify usage as standard Diffusers, custom Diffusers with `trust_remote_code`, fully custom inference framework, or node-based host integration (for example ComfyUI).
4. Cross-check SD.Next integration surface: identify needed touchpoints in `pipelines/model_name.py`, `modules/sd_detect.py`, `modules/sd_models.py`, `modules/modeldata.py`, optional custom packages under `pipelines/model/`, and reference/preview catalog updates.
5. Estimate difficulty with this scale: Low (mostly loader wiring), Medium (custom Diffusers or limited adaptation), High (full custom architecture or major behavior differences), Very High (no practical Diffusers path plus runtime mismatch). Break down by loader, API contract, scheduler/sampler, prompt encoding, checkpoint remap, and validation burden.
6. Identify concrete risks: scheduler incompatibility, unclear output domain, custom text encoder constraints, nonstandard checkpoint format, or external runtime dependencies not available in SD.Next.
7. Recommend a port-model path: upstream Diffusers reuse, custom Diffusers pipeline package, or raw checkpoint plus remap; include the smallest viable first implementation milestone.
## Reporting Format
+18 -8
View File
@@ -15,6 +15,10 @@ Read modules/api/api.py, enumerate all registered endpoints, and validate that e
- OpenAPI docs look wrong or clients report schema mismatches
- You need a pre-PR API contract sanity pass
## Guidance
- Consult `.github/instructions/core.instructions.md` for relevant core runtime and API guidance before proceeding.
## Primary File
- `modules/api/api.py`
@@ -32,14 +36,20 @@ This file is the route registration hub and must be treated as the source of tru
## Audit Goals
For every endpoint, verify:
For every endpoint, verify in this order:
1. Route method and path are valid and unique after subpath handling.
2. Handler call signature is compatible with the route declaration.
3. Declared `response_model` is coherent with returned payload shape.
4. Request body or query params implied by handler type hints are consistent with expected client usage.
5. Authentication behavior is intentional (`auth=True` default in `add_api_route`).
6. OpenAPI schema exposure is correct (including trailing-slash duplicate suppression).
1. Route validation:
- Route method and path are valid and unique after subpath handling.
2. Handler validation:
- Handler call signature is compatible with the route declaration.
3. Request signature validation:
- Request body or query params implied by handler type hints are consistent with expected client usage.
4. Response signature validation:
- Declared `response_model` is coherent with returned payload shape.
5. Auth validation:
- Authentication behavior is intentional (`auth=True` default in `add_api_route`).
6. OpenAPI validation:
- OpenAPI schema exposure is correct (including trailing-slash duplicate suppression).
## Procedure
@@ -91,7 +101,7 @@ If feasible in the current environment:
- Generate OpenAPI schema and spot-check key endpoints.
- Confirm trailing-slash duplicate suppression behavior remains correct.
If runtime schema checks are not feasible, explicitly state that and rely on static validation.
If runtime schema checks are not feasible, include a note in the findings section stating that runtime checks were skipped, then rely on static validation.
## Reporting Format
+6 -2
View File
@@ -1,7 +1,7 @@
---
name: check-models
description: "Audit SD.Next model integrations end-to-end: loaders, detect/routing, reference catalogs, and pipeline API contracts."
argument-hint: "Optionally focus on a model family, repo id, or a subset: loader, detect-routing, references, pipeline-contracts"
argument-hint: "Optionally focus on a specific model family, repo id, or one or more audit categories: loader, detect-routing, references, pipeline-contracts"
---
# Check Model Integrations End-To-End
@@ -15,9 +15,13 @@ Run a consolidated model-integration audit that combines loader checks, detect/r
- A custom pipeline was ported and needs contract validation
- You want a pre-PR integration quality gate for model-related changes
## Guidance
- Consult `.github/instructions/core.instructions.md` for relevant core runtime and model integration guidance before proceeding.
## Combined Scope
This skill combines four audit surfaces:
This skill combines four audit surfaces. Run them in this order unless user scope limits categories:
1. Loader consistency (`check-loaders` equivalent)
2. Detect/routing parity (`check-detect-routing` equivalent)
+98
View File
@@ -0,0 +1,98 @@
---
name: check-paths
description: "Audit SD.Next model-loading code for cache_dir routing on from_pretrained/from_single_file calls and verify diffusers vs HF cache path selection."
argument-hint: "Optionally focus on a subset of loaders, model families, or call patterns"
---
# Check Model Loading Cache Paths
Audit model-loading code and verify every `from_pretrained(...)` and `from_single_file(...)` call explicitly sets `cache_dir` to the correct cache root.
## When To Use
- A loader was added or changed and its cache path needs validation
- A model family loads from the wrong local cache or redownloads unexpectedly
- Auxiliary components are loaded before the full pipeline and need to land in the HF cache
- You want a pre-PR sanity pass for model download/cache routing
## Guidance
- Consult `.github/instructions/core.instructions.md` before proceeding.
- Use existing cache-path conventions rather than introducing new ones.
## Path Policy
1. Full image model pipeline loads:
- Use `shared.opts.diffusers_dir`
- Applies to top-level pipeline `from_pretrained(...)` / `from_single_file(...)` calls that load the full pipeline or full checkpoint into diffusers layout.
2. Auxiliary model loads:
- Use `shared.opts.hfcache_dir`
- Applies to supporting downloads such as VAE, scheduler, processor, tokenizer, image encoder, text encoder, transformer, and other components loaded independently.
3. Component-first loading before pipeline assembly:
- Use `shared.opts.hfcache_dir`
- Applies when a transformer, text encoder, processor, or similar component is loaded before the complete pipeline is instantiated.
## Primary Files
- `modules/sd_models.py`
- `modules/model*.py`
- `modules/ui_models_load.py`
- `modules/models_hf.py`
- `modules/merging/**/*.py`
- `pipelines/**/*.py`
## Audit Goals
For each `from_pretrained(...)` or `from_single_file(...)` call, verify:
1. `cache_dir` is present explicitly.
2. The selected cache root matches the path policy above.
3. Helper wrappers preserve the correct cache choice when they forward args.
4. No load path mixes full pipeline cache and auxiliary cache in a way that would scatter artifacts.
Flag issues such as:
- missing `cache_dir`
- `cache_dir` set to the wrong option
- component loaders using `shared.opts.diffusers_dir` when they should use `shared.opts.hfcache_dir`
- full pipeline loads using `shared.opts.hfcache_dir`
- wrapper functions dropping or overriding the intended cache path
## Procedure
1. Enumerate every `from_pretrained` and `from_single_file` call in the target scope.
2. Classify each call as full pipeline, auxiliary component, or ambiguous wrapper.
3. Confirm the explicit `cache_dir` argument and compare it to the path policy.
4. For wrappers, trace the forwarded path to the final loader call.
5. Report concrete mismatches with minimal fixes.
## Reporting Format
Return findings ordered by severity:
1. Missing `cache_dir`
2. Wrong cache root for the load type
3. Wrapper or forwarding bugs
4. Consistency warnings
For each finding include:
- file location
- loader call
- expected cache root
- actual cache root or missing argument
- minimal fix
Also include summary counts:
- total `from_pretrained` calls checked
- total `from_single_file` calls checked
- full pipeline loads checked
- auxiliary/component loads checked
- ambiguous wrapper loads checked
## Pass Criteria
A full pass requires all audited loader calls to specify `cache_dir` and use the correct cache root for the load category.
+9 -4
View File
@@ -1,12 +1,12 @@
---
name: check-processing
description: "Validate txt2img/img2img/control/caption processing workflows from UI submit bindings to backend processing execution and confirm parameter/type/init correctness."
description: "Run a phased processing-workflow audit from UI submit bindings to backend execution: map workflow paths first, then validate parameter, type, and initialization correctness."
argument-hint: "Optionally focus on txt2img, img2img, control, caption, or process-only and include changed files"
---
# Check Processing Workflow Contracts
Trace generation workflows from UI definitions and submit bindings to backend execution, then validate that parameters are passed, typed, and initialized correctly.
Perform a detailed step-by-step trace of generation workflows from UI definitions and submit bindings to backend execution, then validate that parameters are passed, typed, and initialized correctly.
## When To Use
@@ -15,14 +15,19 @@ Trace generation workflows from UI definitions and submit bindings to backend ex
- A new parameter was added to UI or processing classes/functions and needs end-to-end validation
- You want a pre-PR contract audit for generation flow integrity
## Guidance
- Consult `.github/instructions/core.instructions.md` for relevant core runtime guidance before proceeding.
## Required Workflow Coverage
Start from UI definitions and follow each workflow to final implementation:
Run workflow coverage in this order to keep checks focused and complete:
1. `txt2img`: `modules/ui_txt2img.py` -> `modules/txt2img.py` -> `modules/processing.py:process_images` -> `modules/processing_diffusers.py:process_diffusers`
2. `img2img`: `modules/ui_img2img.py` -> `modules/img2img.py` -> `modules/processing.py:process_images` -> `modules/processing_diffusers.py:process_diffusers`
3. `control/process`: `modules/ui_control.py` -> `modules/control/run.py` (and related control processing entrypoints) -> `modules/processing.py:process_images` -> `modules/processing_diffusers.py:process_diffusers`
4. `caption/process`: `modules/ui_caption.py` -> caption handler module(s) -> `modules/processing.py:process_images` and/or postprocess/caption execution module(s), depending on selected caption backend
5. `video`: `modules/ui_video.py` -> `modules/video_models/video_run -> `modules/processing.py:process_images` and/or postprocess/video execution module(s), depending on implementation
Also validate script hooks when present:
@@ -60,7 +65,7 @@ For each workflow (`txt2img`, `img2img`, `control`, `caption`):
- Resolve wrappers (`call_queue.wrap_gradio_gpu_call`, queued wrappers) to actual function signatures.
- Follow function flow through processing class construction and execution (`processing.process_images`, then `process_diffusers` when applicable).
Produce a normalized mapping table per workflow:
Produce a table per workflow with standardized columns and consistent formatting:
- UI input component name
- UI expected output type
+21 -5
View File
@@ -1,6 +1,6 @@
---
name: check-schedulers
description: "Audit scheduler registrations starting from modules/sd_samplers_diffusers.py and verify class loadability, config validity against scheduler capabilities, and SamplerData correctness."
description: "Run a phased scheduler audit from modules/sd_samplers_diffusers.py and scheduler UI definitions: verify class loadability first, then config validity against scheduler capabilities, then SamplerData correctness and UI option alignment."
argument-hint: "Optionally focus on a scheduler subset, such as flow-matching, res4lyf, or parallel schedulers"
---
@@ -10,11 +10,12 @@ Use `modules/sd_samplers_diffusers.py` as the starting point and verify that sch
## Required Guarantees
The audit must explicitly verify all three:
The audit must explicitly verify all four:
1. All scheduler classes can be loaded and compiled.
2. All scheduler config entries are valid and match scheduler capabilities in `__init__`.
3. All scheduler classes have valid associated `SamplerData` entries and mapping correctness.
3. Scheduler-related UI option values are valid and consistent with the runtime scheduler path.
4. All scheduler classes have valid associated `SamplerData` entries and mapping correctness.
## Scope
@@ -24,11 +25,17 @@ Primary file:
Related files:
- `modules/ui_sections.py` for scheduler UI definitions in `create_sampler_and_steps_selection` and `create_sampler_options`
- `scripts/xyz/xyz_grid_classes.py` for mirrored scheduler UI values used by the XYZ grid scripts
- `modules/sd_samplers_common.py` for `SamplerData` definition and sampler expectations
- `modules/sd_samplers.py` for sampler selection flow and runtime wiring
- `modules/schedulers/**/*.py` for custom scheduler implementations
- `modules/res4lyf/**/*.py` for Res4Lyf scheduler classes (if installed/enabled)
## Guidance
- Consult `.github/instructions/core.instructions.md` for relevant core runtime guidance before proceeding.
## What "Loaded And Compiled" Means
Treat this as a two-level check:
@@ -41,7 +48,7 @@ Treat this as a two-level check:
Notes:
- For non-`torch.nn.Module` schedulers, "compiled" means the scheduler integration path is executable in runtime checks (not necessarily `torch.compile`).
- If the environment cannot run compile checks, report this explicitly and still complete static validation.
- If the environment cannot run compile checks, explicitly state this in the findings summary and proceed with static validation only.
## Procedure
@@ -58,7 +65,14 @@ Create a joined table by sampler name with:
- config key used
- custom scheduler category (diffusers, SD.Next custom, Res4Lyf)
### 2. Validate Scheduler Class Resolution
### 2. Validate Scheduler UI Definitions and Class Resolution
Before validating runtime scheduler classes, inspect `modules/ui_sections.py` and confirm that the UI definitions for scheduler options are consistent with the later scheduler code.
- verify `create_sampler_and_steps_selection` presents sampler names that exist in the sampler registry and are valid for the downstream selection flow
- verify `create_sampler_options` option lists and values match the scheduler runtime option names and accepted values used later in code
- verify UI displayed values such as `default`, `karras`, `betas`, `exponential`, `flowmatch`, `linspace`, `leading`, `trailing`, and checkbox option labels are consumed correctly by scheduler configuration handling
- detect mismatches where a UI option can be selected but would later be rejected, ignored, or misrouted by scheduler code
For each mapped scheduler class:
@@ -81,6 +95,7 @@ Special attention:
- flow-matching schedulers: shift/base_shift/max_shift/use_dynamic_shifting
- DPM families: algorithm_type/solver_order/solver_type/final_sigmas_type
- compatibility-only keys that are intentionally ignored should be documented, not silently assumed
- detect false positives from runtime config pruning such as `if 'EDM' in name` or `name in {'IPNDM', 'CMSI', 'VDM Solver'}` in `DiffusionSampler`: verify whether unsupported keys are removed intentionally before constructor invocation
### 4. Validate SamplerData Mapping Correctness
@@ -90,6 +105,7 @@ For each `SamplerData` entry:
- callable builds `DiffusionSampler` with the expected scheduler class
- mapping is not accidentally pointing to a different named preset
- no duplicate names with conflicting class/config behavior
- if UI sampler names are displayed in multiple contexts, verify the same name resolves to the same scheduler class and behavior across tabs
Flag mismatches such as wrong display name, wrong class wired to name, or stale aliasing.
+6 -2
View File
@@ -1,6 +1,6 @@
---
name: check-scripts
description: "Audit scripts/*.py and verify Script override contracts (init/title/show) plus ui() output compatibility with run() or process() parameters."
description: "Run a phased scripts audit in scripts/*.py: validate Script overrides (init/title/show) first, then verify ui() output compatibility with run() or process() parameters."
argument-hint: "Optionally focus on a subset of scripts or only run-vs-ui or process-vs-ui checks"
---
@@ -15,6 +15,10 @@ Audit all Python scripts in `scripts/*.py` and validate that script class overri
- A script UI was changed and runtime args no longer match
- You want a pre-PR quality gate for script API compatibility
## Guidance
- Consult `.github/instructions/core.instructions.md` for relevant core runtime guidance before proceeding.
## Scope
Primary audit scope:
@@ -126,4 +130,4 @@ A full pass requires all of the following across audited `scripts/*.py` classes:
- `ui()` output contracts are compatible with `run()` or `process()` args
- no blocking arity/signature mismatch remains
If a class uses highly dynamic argument routing that cannot be proven statically, mark as conditional pass with explicit runtime validation recommendation.
If a class uses runtime-determined argument mapping or dynamic method dispatch that cannot be proven statically, mark as conditional pass with explicit runtime validation recommendation.
+121
View File
@@ -0,0 +1,121 @@
---
name: check-ui
description: "Audit Python-to-JavaScript UI bindings for Gradio _js calls, global window exposure, and ui/globals.d.ts registration."
argument-hint: "Optionally focus on a specific extension or module path"
---
# Check Python-JavaScript UI Bindings
Audit SD.Next UI integration points where Python uses Gradio `_js=...` bindings to call JavaScript. Verify each JavaScript callback is exposed on the global `window` object and included in `ui/globals.d.ts`.
## When To Use
- The user changes or reviews Python UI code under `modules/`, `scripts/`, or `extensions/` with `_js=` callbacks.
- A UI integration bug involves Python-triggered JavaScript functions.
- You need to validate UI contract consistency for Gradio-bound JS methods.
- User adds or updates extension with JavaScript code in `extensions/*/javascript`.
## Guidance
- Consult `.github/instructions/core.instructions.md` for relevant core runtime guidance before proceeding.
## Primary Files
- `ui/globals.d.ts`
- `wiki/Dev-UI.md`
- `modules/**` and `scripts/**` Python files that declare `_js=` values
- `extensions/*/javascript/**` TypeScript/JavaScript source files
## Secondary Files To Inspect
- `ui/**/*.ts`
- `extensions-builtin/sdnext-modernui/src/**/*.ts`
- `extensions-builtin/sdnext-kanvas/src/**/*.ts`
- `extensions-builtin/sdnext-kanvas/javascript/kanvas.mjs`
## Audit Goals
For every Python `_js` usage, confirm:
1. The referenced JS callback exists in code.
2. The callback is assigned to `window.<name>` or otherwise accessible as a global function.
3. The callback name is declared in `ui/globals.d.ts`.
4. JavaScript-only methods called from Python are not implemented only as module-local exports.
For all extension JavaScript code under `extensions/*/javascript`, confirm:
- No missing JS callback registrations for Python-bound names.
- Global names are only used for Python bindings, not for code that should instead be imported.
- `ui/globals.d.ts` remains the source of truth for Python-visible UI globals.
## Procedure
### 1. Enumerate Python `_js=` Bindings
- Search `modules/`, `scripts/`, and `extensions/` for `_js=` occurrences.
- Capture the literal callback string values, including direct names and arrow-function expressions.
- For formatted strings, enumerate all possible callback names generated by the formatting pattern.
- Flag dynamic cases where the callback cannot be statically resolved.
This is the most complex part as `_js` can be assigned a direct string, a formatted string, or an inline function. Focus on extracting the intended callback name(s) for verification in the next steps.
Examples:
```python
_js="send_to_kanvas"
_js=f"switch_to_{binding.tabname}"
_js=f'(x, y, i, j) => [x, y, ...selected_gallery_files("{tabname}")]'
_js='() => gallerySort("name")'
```
### 2. Enumerate any additional Extension JavaScript Sources
- Review `extensions/*/javascript`, `extensions-builtin/*/src`, and the specific entry point `extensions-builtin/sdnext-kanvas/javascript/kanvas.mjs` for functions that attach to `window`.
- Confirm extension source files are the authoritative implementation, not generated build artifacts.
- Validate that any new JS entry points are registered by package build or extension initialization.
### 3. Verify JavaScript Exposure
- Search `ui/`, `extensions-builtin/sdnext-modernui/src/`, `extensions-builtin/sdnext-kanvas/src/`, and `extensions/*/javascript/` for each callback name.
- Confirm the callback is attached to `window` as `window.<name> = ...` or equivalent.
- If the callback is an inline function string like `() => quickSaveStyle()`, ensure the referenced helper exists and any helper used for Python integration is also globally available if needed.
### 4. Check TypeScript Declarations
- Open `ui/globals.d.ts` and verify each Python-visible global callback name is declared.
- Confirm the declaration shape is compatible with its usage if type annotations are present.
- If an extension exposes its own additional global helpers, verify the declaration file is updated accordingly.
### 5. Propose Fixes for Any Issues Found
- For missing global registrations, add `window.<name> = <function>` in the appropriate JavaScript source file.
- For missing `ui/globals.d.ts` entries, add a declaration like `declare global { function <name>(...args: any[]): any; }` with appropriate types if possible.
### 6. Run UI Typecheck and Lint tests
- Run `pnpm eslint` to ensure there are no linting errors.
- Run `pnpm tsc` to ensure there are no type errors, which can catch missing or mismatched declarations.
- Run `pnpm build` to ensure the extension builds correctly with the new or updated JavaScript code.
And fix any issues that arise from these checks.
## Reporting Format
Report findings with:
- Python file and `_js` reference
- JavaScript location and global registration status
- `ui/globals.d.ts` declaration status
- Severity: missing global, missing declaration, stale declaration, or dynamic/ambiguous binding
If no issues are found, state that the Python/JS UI binding audit is clear and mention whether any dynamic `_js` strings remain unresolved.
## Output Expectations
When this skill is used, return:
- Total `_js` bindings inspected
- Total missing or invalid global registrations
- Total missing or stale `ui/globals.d.ts` entries
- Summary of any ambiguous `_js` cases that require manual review
- A short summary of whether the UI binding contract is intact
+8 -8
View File
@@ -17,19 +17,19 @@ Read the error, identify which integration layer is failing, isolate the smalles
- Sampling fails due to tensor shape, dtype, device, or scheduler issues
- The model loads but outputs corrupted images, wrong output type, or obviously incorrect results
## Guidance
- Consult `.github/instructions/core.instructions.md` for relevant core runtime and model debugging guidance before proceeding.
## Debugging Order
Always debug from the outside in.
1. Detection and routing
2. Loader arguments and component selection
3. Checkpoint path and artifact layout
4. Weight loading and key mapping
5. Prompt encoding
6. Sampling forward path
7. Output postprocessing and SD.Next task integration
1. Integration entry checks: detection and routing.
2. Load path checks: loader arguments and component selection, checkpoint path and artifact layout, then weight loading and key mapping.
3. Runtime path checks: prompt encoding, sampling forward path, and output postprocessing plus SD.Next task integration.
Do not start by rewriting the architecture if the failure is likely in detection, loader wiring, or output handling.
Do not start by rewriting the architecture when the failure appears in detection, loader wiring, or output handling. Only consider architecture rewrites after these layers are validated and the root cause is confirmed to be architectural.
## Files To Check First
+12 -1
View File
@@ -16,11 +16,15 @@ Use this skill to implement, edit, review, and prepare pull-request-ready change
- Adding tests and docs for diffusers changes
- Preparing a PR that targets the diffusers repository
## Guidance
- Consult `.github/instructions/core.instructions.md` for relevant core runtime and diffusers integration guidance before proceeding.
## Primary Objectives
1. Keep behavior explicit, minimal, and inference-focused.
2. Match existing diffusers architecture and code patterns.
3. Preserve numerical behavior unless a behavior change is explicitly required.
3. Preserve numerical behavior unless a behavior change is explicitly documented in the task requirements.
4. Produce change sets that are clean, reviewable, and PR-ready.
## Hard Rules
@@ -35,6 +39,13 @@ Use this skill to implement, edit, review, and prepare pull-request-ready change
## Code Structure Rules
Apply these grouped checks in priority order:
1. Model-level structure and forward-path clarity.
2. Attention and processor integration consistency.
3. Pipeline runtime behavior and inference API expectations.
4. Scheduler config and mixin conformance.
### Models
- Use ModelMixin patterns and register constructor args with register_to_config.
+6 -2
View File
@@ -1,6 +1,6 @@
---
name: fix-lint
description: "Run SD.Next lint workflow tools in order and fix issues as needed, while ignoring lint findings explicitly marked with TODO."
description: "Run the SD.Next lint workflow in phased order: execute tools in sequence first, then apply minimal fixes, while ignoring findings explicitly marked by TODO comments in code."
argument-hint: "Optionally focus on a subset of tools or files, otherwise run full workflow"
---
@@ -15,6 +15,10 @@ Run the project lint workflow in the required order, fix findings, and re-run af
- Multiple files changed and style/static checks may have drifted
- You need a repeatable full-lint remediation pass
## Guidance
- Consult `.github/instructions/core.instructions.md` for relevant core runtime guidance before proceeding.
## Required Environment Step
Always start from repository root and activate virtual environment first:
@@ -43,7 +47,7 @@ Note that `pylint` can run for considerable time, so run with no timeouts.
## Fix Policy
- Fix issues reported by each tool before moving on.
- Ignore lint issues explicitly marked with `TODO`.
- Ignore lint issues explicitly marked by `TODO` comments in code.
- Do not suppress errors globally just to pass checks.
- Keep fixes minimal and targeted to reported findings.
- Preserve existing project conventions and avoid unrelated refactors.
+2 -2
View File
@@ -1,6 +1,6 @@
---
name: github-features
description: "Read SD.Next GitHub issues with [Feature] in the title and generate a markdown report with short summary, status, and suggested next steps per issue."
description: "Read SD.Next GitHub issues with [Feature] in the title and produce a phased markdown report: short summary first, then status, then suggested next steps per issue."
argument-hint: "Optionally specify state (open/closed/all), max issues, and whether to include labels/assignees"
---
@@ -89,7 +89,7 @@ If there are many issues, keep summaries short and prioritize clarity.
- Keep each issue summary concise and actionable.
- Do not invent facts not present in issue data.
- If issue body is sparse, state assumptions explicitly.
- If issue body is sparse, explicitly list assumptions about issue intent or context in 1-2 sentences.
- If no matching issues are found, output a clear "no matches" report.
## Pass Criteria
+3 -2
View File
@@ -1,12 +1,12 @@
---
name: github-issues
description: "Read SD.Next GitHub issues with [Issue] in the title and generate a markdown report with short summary, status, and suggested next steps per issue."
description: "Read SD.Next GitHub issues with the literal string [Issue] in the title and produce a phased markdown report: short summary first, then status, then suggested next steps per issue."
argument-hint: "Optionally specify state (open/closed/all), max issues, and whether to include labels/assignees"
---
# Summarize SD.Next [Issues] GitHub Issues
Fetch issues from the SD.Next GitHub repository that contain `[Issue]` in the title, then produce a concise markdown report with one entry per issue.
Fetch issues from the SD.Next GitHub repository that contain the literal string `[Issue]` in the title, then produce a concise markdown report with one entry per issue.
## When To Use
@@ -87,6 +87,7 @@ If there are many issues, keep summaries short and prioritize clarity.
## Reporting Rules
- Prioritize outputs in this order: accuracy first, then concise summaries and actions, then markdown presentation.
- Keep each issue summary concise and actionable.
- Do not invent facts not present in issue data.
- If issue body is sparse, state assumptions explicitly.
+12 -2
View File
@@ -1,12 +1,12 @@
---
name: port-model
description: "Port or add a model to SD.Next using existing Diffusers and custom pipeline patterns. Use when implementing a new model loader, custom pipeline, checkpoint conversion path, or SD.Next model-type integration."
description: "Port or add a model to SD.Next using a phased integration flow: select the least-new-code path that follows SD.Next conventions, then implement loader and routing updates, then validate."
argument-hint: "Describe the source model, target task, checkpoint format, and whether the model already has a Diffusers pipeline"
---
# Port Model To SD.Next And Diffusers
Read the task, identify the model architecture and artifact layout, choose the narrowest integration path that matches existing SD.Next patterns, implement the loader and pipeline wiring, and validate the result.
Read the task, identify the model architecture and artifact layout, choose the integration path that requires the least amount of new code while adhering to SD.Next patterns, implement the loader and pipeline wiring, and validate the result.
## When To Use
@@ -16,6 +16,10 @@ Read the task, identify the model architecture and artifact layout, choose the n
- A model already exists in Diffusers but is not yet wired into SD.Next
- A custom architecture needs a repo-local `pipelines/<model>` package and loader
## Guidance
- Consult `.github/instructions/core.instructions.md` for relevant core runtime and model porting guidance before proceeding.
## Core Rule
Prefer the smallest correct integration path.
@@ -88,6 +92,12 @@ Useful examples by pattern:
## Integration Decision Tree
Use this quick order before diving into detailed path requirements:
1. If an upstream Diffusers pipeline already covers the model, choose path 1.
2. If upstream support is insufficient but the model can be expressed as a Diffusers-style custom package, choose path 2.
3. If artifacts are raw checkpoints or single-file weights without a usable Diffusers layout, choose path 3.
### 1. Upstream Diffusers Support Exists
Use this path when the model already has a usable Diffusers pipeline and component classes.
+16 -3
View File
@@ -1,6 +1,6 @@
---
name: port-pipeline
description: "Port custom model pipeline implementations to Diffusers. Use when migrating custom or non-Diffusers pipeline code into SD.Next repo-local pipeline files such as pipelines/model_<name>.py or pipelines/<model>/pipeline.py while preserving behavior, avoiding new dependencies, and keeping device/attention handling configurable."
description: "Port custom model pipeline implementations to Diffusers using phased priorities: preserve behavior first, avoid new dependencies second, and keep device/attention handling configurable throughout. Use when migrating custom or non-Diffusers pipeline code into SD.Next repo-local pipeline files such as pipelines/model_<name>.py or pipelines/<model>/pipeline.py."
argument-hint: "Provide source pipeline path, target SD.Next destination path, and target pipeline class name"
---
@@ -17,6 +17,10 @@ This skill targets SD.Next repo-local pipeline ports only.
- The task requires preserving generation behavior without introducing new dependencies
- The task requires removing hard-coded runtime assumptions (device or attention backend)
## Guidance
- Consult `.github/instructions/core.instructions.md` for relevant core runtime and pipeline integration guidance before proceeding.
## Mandatory Clarification Gate
Before implementation, confirm these required inputs with the user:
@@ -26,20 +30,29 @@ Before implementation, confirm these required inputs with the user:
3. Target pipeline class name
If any of the above are missing or ambiguous, stop and ask concise clarification questions before writing code.
If the user input is invalid (for example, nonexistent path, non-Python source file, or invalid class name), report the specific validation error and request corrected input before writing code.
## Constraints
Priority 1 - behavior constraints:
- Preserve externally visible behavior of the source pipeline unless the user asks for intentional changes
Priority 2 - dependency constraints:
- Do not add new dependencies
Priority 3 - runtime configurability constraints:
- Do not hard-code device type (`cpu`, `cuda`, `mps`, etc.)
- Do not hard-code attention type or backend assumptions
- Preserve externally visible behavior of the source pipeline unless the user asks for intentional changes
## Workflow
1. Collect Inputs
- Ask for source path, destination path, and target pipeline name.
- Confirm destination is an SD.Next repo-local pipeline location, not an upstream Diffusers repository path.
- Confirm runtime assumptions and expected task type (text-to-image, image-to-image, inpaint, etc.).
- Confirm runtime assumptions, including device configuration, memory constraints, and expected task type (text-to-image, image-to-image, inpaint, etc.).
2. Analyze Source Pipeline
- Inspect model loading, prompt processing, denoising or sampling loop, scheduler interactions, and output post-processing.
+18 -4
View File
@@ -6,7 +6,7 @@ argument-hint: "Describe which catalog files to audit (or use all), whether to o
# Reference Catalog Maintenance
Use this skill to audit and update SD.Next model reference catalogs with minimal, safe, and deterministic edits.
Use this skill to audit and update SD.Next model reference catalogs using a phased approach: validate structure first, then resolve duplicates/conflicts, then apply minimal deterministic edits.
## When To Use
@@ -15,6 +15,10 @@ Use this skill to audit and update SD.Next model reference catalogs with minimal
- Verifying category placement across `base/cloud/quant/distilled/nunchaku/community`
- Syncing catalog entries with thumbnail files in `models/Reference`
## Guidance
- Consult `.github/instructions/core.instructions.md` for relevant core runtime guidance before proceeding.
## Catalog Files In Scope
- `data/reference.json` (base)
@@ -26,12 +30,21 @@ Use this skill to audit and update SD.Next model reference catalogs with minimal
## Core Rules
- Do not move entries between categories unless explicitly requested or strongly evidenced.
Priority 1 - data safety and category stability:
- Verify category placement across catalogs and report conflicts first.
- Move entries between categories only when explicitly requested, or when placement is supported by at least two independent metadata sources.
- Keep changes targeted to only affected records.
Priority 2 - schema and formatting consistency:
- Preserve existing field names and conventions used by neighboring entries.
- Prefer deterministic normalization (stable key order, consistent value style).
Priority 3 - assets and size backfill:
- Do not overwrite real thumbnails with placeholders.
- For `size` backfill, use `cli/hf-info.py` as the primary source of truth.
- For `size` backfill, use `cli/hf-info.py` -> section `info` -> field `size` as the primary source of truth.
## Validation Checklist
@@ -47,6 +60,7 @@ Use this skill to audit and update SD.Next model reference catalogs with minimal
3. Cross-catalog consistency
- Detect likely duplicates across `reference*.json` files.
- Flag conflicting metadata for the same model key/name.
- Resolve duplicates by keeping the most complete record in the correct category, then merge missing non-conflicting metadata from duplicate records.
- Report category conflicts; only auto-fix when rules are explicit.
4. Thumbnail alignment
@@ -66,7 +80,7 @@ Use this skill to audit and update SD.Next model reference catalogs with minimal
7. Size backfill checks (`size: 0`)
- Enumerate all entries with `"size": 0` across `data/reference*.json`.
- For each Hugging Face repo-style path (`owner/name`), run `cli/hf-info.py`.
- Parse `data.size` from tool output when present (format is MB string, e.g. `"23933.4MB"`).
- Parse `info.data.size` from tool output when present (format is MB string, e.g. `"23933.4MB"`).
- Convert MB to GB using deterministic rounding: `gb = round(mb / 1024, 2)`.
- Update only the `size` field for resolvable records; do not modify unrelated fields.
- If `cli/hf-info.py` returns `ok: false`, missing `data.size`, or non-repo paths, leave `size` unchanged and report as unresolved.
+2 -2
View File
@@ -6,7 +6,7 @@ argument-hint: "Optionally focus on specific folders or TODO categories, otherwi
# Audit TODO Markers And Propose Next Steps
Search the repository for TODO markers, collect each actionable item, and produce a markdown report with recommended next steps.
Run this workflow in order: (1) search the repository for TODO markers, (2) deduplicate results, (3) categorize TODOs, (4) propose actionable next steps, and (5) produce a markdown report.
## When To Use
@@ -38,7 +38,7 @@ Look for common TODO variants such as:
- `/* TODO */`
- inline TODO notes in comments or docstrings
Ignore generated/vendor output when clearly not user-maintained.
Ignore files in common generated or vendor directories (for example `node_modules`, `dist`, `build`, `.venv`, `venv`) unless the user explicitly requests including them.
## What To Capture
+20 -10
View File
@@ -62,17 +62,27 @@ Use the repo-local validation script before and after doc edits when possible:
- `test/check-docs wiki/File.md` to validate one or more specific files
- `test/check-docs --fix wiki/File.md` only when a safe markdownlint auto-fix is appropriate
### 1. Confirm Target And Depth
### 1. Confirm Target
Extract from user prompt:
- target markdown file(s) in `wiki/`
- desired depth: syntax-only, readability, or full pass
- constraints (tone, audience, preserve wording, max rewrite level)
If targets are missing, ask for paths before editing.
### 2. Read And Diagnose
### 2. Confirm Depth
Extract from user prompt:
- desired depth mode:
- syntax-only: fix markdown syntax/rendering issues only; do not rewrite wording or structure beyond what syntax requires
- readability: include syntax fixes plus clarity and scanability edits without broad restructuring
- full pass: include syntax, readability, structure normalization, terminology consistency, and broader doc cleanup
If depth is missing, default to readability and state that assumption.
### 3. Read And Diagnose
For each target file:
@@ -81,7 +91,7 @@ For each target file:
- Identify readability pain points (dense blocks, weak headings, mixed terminology)
- Note risky sections where edits may alter meaning
### 3. Normalize Heading Hierarchy
### 4. Normalize Heading Hierarchy
Apply heading structure rules before deep rewrites:
@@ -90,7 +100,7 @@ Apply heading structure rules before deep rewrites:
- ensure sibling sections use consistent levels
- rename headings only when it improves clarity without changing meaning
### 4. Apply Syntax Fixes First
### 5. Apply Syntax Fixes First
Fix rendering/correctness issues first, such as:
@@ -101,7 +111,7 @@ Fix rendering/correctness issues first, such as:
- inconsistent table delimiter rows
- accidental HTML/markdown mixing that breaks rendering
### 5. Apply Readability Improvements
### 6. Apply Readability Improvements
Make editorial improvements while preserving meaning:
@@ -117,7 +127,7 @@ Apply tone constraints during edits:
- approachable wording for normal users
- no unexplained technical babble
### 6. Run Link Integrity Pass
### 7. Run Link Integrity Pass
Check and fix obvious link issues:
@@ -127,7 +137,7 @@ Check and fix obvious link issues:
If link targets cannot be verified from repo context, keep the original target and flag it in the report.
### 7. Add Code Block Language Tags
### 8. Add Code Block Language Tags
For fenced code blocks:
@@ -135,7 +145,7 @@ For fenced code blocks:
- correct clearly wrong tags
- leave tag blank only when language cannot be inferred safely
### 8. Run Completion Checks
### 9. Run Completion Checks
Validate each edited file against this checklist:
@@ -147,7 +157,7 @@ Validate each edited file against this checklist:
- no factual changes introduced
- tone is concise, technical, and approachable
### 9. Report Results
### 10. Report Results
Return:
+79
View File
@@ -0,0 +1,79 @@
name: lint
on:
- push
- pull_request
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
steps:
- name: checkout-code
uses: actions/checkout@main
- name: install-uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: setup-python
uses: actions/setup-python@main
with:
python-version: 3.12.3
- name: install-python-deps
run: uv pip install ruff pylint pre-commit --system
- name: setup-node
uses: actions/setup-node@main
with:
node-version: 24
- name: install-pnpm
run: npm install -g pnpm
- name: pnpm-ignore-scripts
run: pnpm config set ignore-scripts true
- name: pnpm-store-path
id: pnpm-store
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: cache-pnpm-store
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-store.outputs.STORE_PATH }}
key: pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
pnpm-store-
- name: install-node-deps
run: pnpm install --frozen-lockfile --unsafe-perm
- name: pre-commit
uses: pre-commit-ci/lite-action@v1.1.0
if: always()
with:
msg: apply code formatting and linting auto-fixes
- name: ruff
run: uv run --active ruff check --extend-ignore EXE001
- name: pylint
run: uv run --active pylint --disable W0511 *.py modules/ pipelines/ scripts/ extensions-builtin/
- name: test-run
run: ./webui.sh --test --uv
- name: pre-commit-run
run: uv run --active pre-commit run --all-files
- name: eslint
run: pnpm run eslint:core
- name: tsc
run: pnpm run tsc:core
-37
View File
@@ -1,37 +0,0 @@
name: lint-on-push
on:
- push
- pull_request
jobs:
lint:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
flags:
- --debug --test --uv
- --debug --test
steps:
- name: checkout-code
uses: actions/checkout@main
- name: setup-python
uses: actions/setup-python@main
with:
python-version: 3.12.3
cache: pip
cache-dependency-path: requirements.txt
- name: install-pylint
run: |
python -m pip install --upgrade pip
pip install pylint
- name: pre-commit
uses: pre-commit-ci/lite-action@v1.1.0
if: always()
with:
msg: apply code formatting and linting auto-fixes
- name: test-startup
run: |
export COMMANDLINE_ARGS="${{ matrix.flags }}"
python launch.py
+53
View File
@@ -0,0 +1,53 @@
name: github-pages
on:
push:
branches:
- pages
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: pages-checkout
uses: actions/checkout@v4
- name: pages-build
run: python3 scripts/build-pages.py
- name: pages-ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
- name: pages-dependencies
run: bundle install
- name: pages-site
run: bundle exec jekyll build --destination ./_site
- name: pages-upload
uses: actions/upload-pages-artifact@v3
with:
path: ./_site
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: pages-deploy
id: deployment
uses: actions/deploy-pages@v4
@@ -1,4 +1,4 @@
name: update-readme
name: readme-sponsors
on:
workflow_dispatch:
+1 -1
View File
@@ -19,7 +19,6 @@ __pycache__
/data/installer.json
/data/rocm.json
node_modules
pnpm-lock.yaml
package-lock.json
# all models and temp files
@@ -60,6 +59,7 @@ tunableop_results*.csv
!package.json
!requirements.txt
!constraints.txt
!pnpm-lock.yaml
!/data
!/models/VAE-approx
!/models/VAE-approx/model.pt
+1
View File
@@ -2,6 +2,7 @@
"MD004": false,
"MD012": false,
"MD013": false,
"MD028": false,
"MD032": false,
"MD033": false,
"MD036": false,
+1 -1
View File
@@ -51,4 +51,4 @@ repos:
- id: indents-to-spaces
args: ["--spaces=2"]
types: [file]
files: \.(json|js|mjs|css|html|md|yaml|toml|sh)$
files: \.(json|js|css|html|md|yaml|toml|sh)$
+7 -2
View File
@@ -1,7 +1,5 @@
{
"files.eol": "\n",
"python.analysis.extraPaths": [".", "./modules", "./scripts", "./pipelines"],
"python.analysis.typeCheckingMode": "off",
"editor.formatOnSave": false,
"python.REPL.enableREPLSmartSend": false,
"eslint.enable": true,
@@ -13,6 +11,13 @@
"json",
"markdown"
],
"search.exclude": {
"**/__pycache__": true,
"**/node_modules": true,
"**/venv": true,
"**/*.mjs": true,
"**/*.map": true
},
"githubPullRequests.ignoredPullRequestBranches": [
"master"
]
+2
View File
@@ -6,3 +6,5 @@
- For UI tasks, also review instructions `.github/instructions/ui.instructions.md`
For specific SKILLS, also review the relevant skill files specified in `.github/skills/README.md` and listed `.github/skills/*/SKILL.md`
For specific GUIDELINES, also review the relevant guideline files specified in `wiki/Dev-*.md` and listed in `wiki/Dev-Home.md`
+261 -87
View File
@@ -1,5 +1,173 @@
# Change Log for SD.Next
## Update for 2026-06-16
### Highlights for 2026-06-16
*What's New?*
- **Ideogram-4** released, Microsoft joins the game with **Lens** and **Anima** made it to release version
- **SDNQ** new quantization algorithm with even higher quality
- New **Image Analysis** feature and much improved **Prompt Enhance** capabilities which allow steering the model in real-time
- New workflows with ability to run **Detailing** as post-processing on existing images
- Updates to [Kanvas](https://vladmandic.github.io/sdnext-docs/Kanvas/), [SD.Next Launcher](https://vladmandic.github.io/sdnext-docs/Launcher/) and [Enso UI](https://vladmandic.github.io/sdnext-docs/Enso/)!
And we have new [Home page](https://vladmandic.github.io/sdnext/) with heavily updated [Docs](https://vladmandic.github.io/sdnext-docs/) and new [Contributing & Development](https://vladmandic.github.io/sdnext-docs/Dev-Home/) section in docs with info on pretty much any type of development or contribution related topics - do check it out!
Plus continued work on modernization of codebase: UI is now fully TypeScript based
And we have a new modular LoRA loader, new native Transformers loader and improved 3rd party finetunes support!
*Note*: This is a major update due to sheer size of the changes: over 400 commits!
[Home](https://vladmandic.github.io/sdnext/) | [ChangeLog](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) | [Docs](https://vladmandic.github.io/sdnext-docs/) | [Discord](https://discord.com/invite/sd-next-federal-batch-inspectors-1101998836328697867) | [Sponsor](https://github.com/sponsors/vladmandic)
### Details for 2026-06-16
- **Models**
- [CircleStone Anima 1.0](https://huggingface.co/circlestone-labs/Anima) in *Base* and *Turbo* (distilled) variants
in both original precision and SDNQ-4bit quantiztion
- [Microsoft Lens](https://huggingface.co/microsoft/Lens) in *Standard*, *Base* and *Turbo* (distilled) variant
3.8B text-to-image DiT model with 12B GPT-OSS text-encoding and Flux2 VAE
oh, that 12B encoder is MoE with 3.6B activated plus its prequantized using `mxfp4`
*note* Lens comes with its own prompt-refiner, enable in settings -> model options (disabled by default)
*note* original Lens implements only text-2-image, SD.Next adds image-2-image and inpaint workflows as well
- [Ideogram 4](https://huggingface.co/ideogram-ai/ideogram-4) open-weight 9.3B flow-matching single-stream DiT
with dual-transformer architecture (9.5b) and qwen3 (8b) text encoder
too many notes to add here, check out the dedicated [Ideogram-4 wiki page](wiki/Ideogram) for all details!
- **Features**
- **SDNQ** new quantization algorithm: *Hadamard Rotations*
much higher quality than base SDNQ, but runs slightly slower
still faster than SVD and can be combined together with SVD for combined benefits
- **Captioning**
new feature: analyze existing images for prompt adherence
*tip*: image analysis requires larger VLM model to produce quality output
new api endpoint: `/sdapi/v1/analyze`
cleanup list of predefined models, new models added and some old removed
add support for prequantized models
improved default values plus some new params like min length and `custom args` so you can pass anything to an llm model
improved system prompts
- **Prompt Enhance** tons of features
cleanup list of predefined models, new models added and some old removed
improved default values plus some new params like min length and `custom args` so you can pass anything to an llm model
improved system prompts
add support for prequantized models
new processing engine! now you can steer the model as its generating
add words to list and model will either steer away from them towards safe choices or you choose specific replacements for them
*for example*: `child:person, toy:airplane, dog:cat`
will do exactly as you'd expect, steer away from first word towards (optional) second word
and it expands the functionality with customizable embedding similarity:
*for example*, `child` can match `kid`, `girl`, `boy`
and it expands the functionality with customizable semantic matching:
*for example*, `young ...` will match before next word appears in the prompt and steer away from it towards desired choices
- **Detailer** available as post-processing task for existing images
- **Masking** updated interface and capabilities
you can now also select mask type instead of focing alpha mask with all models
- **Samplers** reorganized into clear sampler categories
- **Gallery** add clear cache button to folder menu
- **Finetunes** improved support for loading model finetunes
this also includes detecting compatibility and falbacks
- **UV** much updated `--uv` support for fast installs
now also supports global `uv` if present in the system
- **Attention Dispatcher** new attention backends dispatcher
in *settings -> attention Dispatcher*
allows to use pluggable kernels defines either in packages or in new [kernels](https://huggingface.co/docs/kernels/index) library
see [backends](https://huggingface.co/docs/diffusers/optimization/attention_backends#available-backends) for list of available attention backends
*note* compatibility matrix between torch backend, torch version and model specifics is relatively small at the moment
*note* does not replace existing *attention* settings
- **Image metadata** add *wildcards* (if used) info to image
if wildcards or styles modify prompt, add original prompt to image metadata as *template*
- **Video metadata** add processing info to video metadata as well, thanks @ryanmeador
- **Kanvas** image resize is now two-way, you can resize in kanvas or in main ui
- **Changes**
- all **Guidance** params are now set to *-1* by default to allow using model defaults and avoid confusion with different model behaviour
log will print default values used by model if not set by user
- **Shared components** additional support for shared model components
avoids unnecessary downloads and allows to share components between different models
enabled by default, see *settings -> text encoder -> use shared instance*
- restore params from image metadata will now prefer *template* field if present, otherwise use *prompt* field
this allows to preserve original prompt in case of wildcards or styles modifying the prompt
- **HF download** use `XET` by default
see *settings -> huggingface -> download method* for options
- **Nunchaku** consider *DEV* builds when auto-installing
- **Video** save image thumbnail for generated video is now optional, thanks @ryanmeador
- **Docs**
- new [Contributing & Development](https://vladmandic.github.io/sdnext-docs/Dev-Home/) home page
includes pages on *development setup, code structure, coding standards, ui development, themes, docs, hints* and more!
- **AI**
- Cognitive analysis and improvements to *all* AI prompts
- Automated fixes using `/check-` skills
- Automated syntax, spelling and readability improvements to `/wiki` pages
- Multiple quality fixes based on *CoPilot* review
- Multiple quality fixes based on *Claude* review, thanks @QualiaRain
- **Internal**
- new native transformers loader!
massive new codebase, but improves modularity and compatibility with different model architectures
- new model finetunes loader!
better compatibility for different finetunes and automatic detection of compatibility with base model
- refactor shared components loader
now takes into effect desired pre-quant precision and allows to share components between different models
- update all model loading code to use consistent paths:
`diffusers_dir` for image pipelines
`hfcache_dir` for model components and auxiliary models
- update `torch==2.12` for *CUDA, ROCm, IPEX*
- complete refactor of `core` JavaScript codebase to TypeScript!
- complete refactor of `modernui` JavaScript codebase to TypeScript!
- remove of `/html` and `/javascript` folders
- add `/ui` folder for all ui-related code/css/assets
- large refactor of `lora` native loader
- improve `kanvas` typing
- additional strong typing in core, thanks @awsr
- full `codespell` coverage
*note* this resulted in large one-time changeset
- enhance automated testing
`pnpm test` (uses `--test`) flag runs pipeline init checks
`pnpm compile` (new) runs static python compile and import checks
- **Fixes**
- `hidream-o1` prequant loading
- `gradio` initial hijack
- `SmolVLM` captioning
- `gradio` temp files guard against large image
- `diffusers` patch custom pipelines for `qk_norm`
- *GHSA* fixes, thanks @SSJCorpSec for reporting
- custom `vae` loader
- `attention` execution guard against `cpu` tensors
- downloaded diffuser model use `snapshot` path
- improve `settings` search
- `nunchaku` z-image loader
- `ui` server log monitor
- `kanvas` enable toolbar on *send-to* action
- `hf download` model card lookup
- `ltx video` padding logic
- `prompt enhance` custom model loader
- `styles` loader exception handling
- `kanvas` image change notification
- `reinstall` force reinstall of transformers and diffusers
- `ipex` torch install error, thanks @liutyi
- `taesd` preview constant size with reduced layers
- `output path` use correct base folder for initial folders
- `ltx` prompt embeds move to device, thanks @ryanmeador
- `openpose` processor
- `img2img` api default sampler
- `sdnq` default dynamic loss value
- `sdnq` prequant save/load
- `samplers` ui sigma methods
- `xpu` generator on non-cpu
- `compel` compatibility with *transformers==5*
- `gallery` open folder
- `seedvr` unload after upscale
- `tinyvae` with anima
- `mixture-tiling` fix for non-square images, thanks @QualiaRain
- `prompts-from-file` fix metadata handling, thanks @QualiaRain
- `hypertile` correct width/height assignment, thanks @QualiaRain
- custom allowed-paths, thanks @QualiaRain
- bias dtype, thanks @QualiaRain
- `ipadapter` mask accumulation, thanks @QualiaRain
- `lora` no-lora check, thanks @QualiaRain
- control `video` processing, thanks @QualiaRain
- `freescale` correct width/height assignment, thanks @QualiaRain
- noise `lerp` inversion, thanks @QualiaRain
- additional safety checks, thanks @QualiaRain
- `remote vae` shadowing, thanks @QualiaRain
## Update for 2026-05-13
### Highlights for 2026-05-13
@@ -57,11 +225,17 @@ For full details, see [ChangeLog](https://github.com/vladmandic/automatic/blob/m
- **Ernie-Image** add native *LoRA* support, *img2img* and *inpaint* workflows
- **Chroma** add native *LoRA* support
- **Flux.2** add native *LoRA* support
- **Prompt enhance** add info to image metadata
- custom **VAE** loader for all pipelines
*note*: vae still needs to be compatible with the model
- **Schedulers** new option in ui: *fallback on invalid*
if you choose scheduler that is not compatible with the model and fallback is not enabled, it will raise an error,
if fallback is enabled, it will try to find closest scheduler that is compatible with the model instead of just default scheduler
any change of requested-vs-active is logged as warning
plus add *beta start, beta end, steps offset* params to most schedulers
- **Prompt enhance** add info to image metadata
- **CivitAI** downloaded thumbnails now include metadata
- **Installer** support for `git+http` style references
- **XYZ Grid** add option *continue on error* to allow processing to continue even if one of the grid cells fails
- **UI**
- **Networks** using networks to load model or auto-download a reference model will now be reflected in the UI
- ability to manually reorient *input/output* panels
@@ -124,7 +298,7 @@ For full details, see [ChangeLog](https://github.com/vladmandic/automatic/blob/m
*What's New?*
- New image models! **ERNIE-Image**, **Zeta-Chroma**, **Nucleus**, **Bria-FIBO**, **Anima-v3**, **SDXS-1B**
- New video model: **LTX 2.3 v1.1** *(with audio, refiner and upscaler)*
- Major **Kanvas** update for enhanced inpaint/outpaint and overal more responsive **UI**
- Major **Kanvas** update for enhanced inpaint/outpaint and overall more responsive **UI**
- Built-in **Tag-Autocomplete** with support for *10+* tag databases and support for networks!
- Additional *Schedulers*, updates to *NudeNet*, *RIFE*, *OpenVINO* and *ROCm* and other features
- [Launcher](https://github.com/vladmandic/sdnext-launcher) tweaks
@@ -181,7 +355,7 @@ For full details, see [ChangeLog](https://github.com/vladmandic/automatic/blob/m
if you want to skip preview, but show finished images, works with batch progression
- add **xet cache** to *settings -> paths* and initialize on startup
- **Compute**
- **ROCm** futher work on advanced configuration and tuning, thanks @resonantsky
- **ROCm** further work on advanced configuration and tuning, thanks @resonantsky
now covers both ROCm on Windows and Linux
see *main interface -> scripts -> rocm advanced config*
- **OpenVINO**
@@ -230,7 +404,7 @@ For full details, see [ChangeLog](https://github.com/vladmandic/automatic/blob/m
- new GET `/sdapi/v1/wildcards` endpoint
- **Docs**
- validation of all links
- syntax/structure/language corrections accross all documents
- syntax/structure/language corrections across all documents
- **Obsoleted**
- removed *system-info* from *extensions-builtin*
- **Internal**
@@ -267,7 +441,7 @@ For full details, see [ChangeLog](https://github.com/vladmandic/automatic/blob/m
- controlnet processor error handling
- error handling for same-device check
- error handling for undefined pipeline
- erorr handling for `scripts` loader
- error handling for `scripts` loader
- patch `z-image` for fp16 compatibility, thanks @resonantsky
- patch `unipc` for timesteps device placement, thanks @resonantsky
- `civitai` search and base-model discovery improvements
@@ -323,7 +497,7 @@ Just how big? Some stats: *~530 commits over 880 files*
apply professional lut-table using .cube file
*hint* color grading is available as step during generate or as processing item for already existing images
- **Upscaling**
add support for [spandrel](https://github.com/chaiNNer-org/spandrel) engine with suport for new upscaling model families
add support for [spandrel](https://github.com/chaiNNer-org/spandrel) engine with support for new upscaling model families
add two new ai upscalers: *RealPLKSR NomosWebPhoto* and *RealPLKSR AnimeSharpV2*
add two new **interpolation** methods: *HQX* and *ICB*
use high-quality [sharpfin](https://github.com/drhead/Sharpfin) accelerated library
@@ -373,7 +547,7 @@ Just how big? Some stats: *~530 commits over 880 files*
*note* Enso is work-in-progress and alpha-ready
- legacy panels **T2I** and **I2I** are disabled by default
you can re-enable them in *settings -> ui -> hide legacy tabs*
- new panel: **Server Info** with detailed runtime informaton
- new panel: **Server Info** with detailed runtime information
- rename **Scripts** to **Extras** and reorganize to split internal functionality vs external extensions
- **Networks** add **UNet/DiT**
- **Localization** improved translation quality and new translations locales:
@@ -396,7 +570,7 @@ Just how big? Some stats: *~530 commits over 880 files*
- prototype **v2 API** (`/sdapi/v2/`)
job-based generation with queue, per-job WebSocket progress, file uploads with TTL, model/network enumeration
and a plethora of other improvements *(work-in-progress)*
for the time being ships with Enso, which must be enabled wih `--enso` flag on startup for v2 API to be available
for the time being ships with Enso, which must be enabled with `--enso` flag on startup for v2 API to be available
- **rate limiting**: global for all endpoints, guards against abuse and denial-of-service type of attacks
configurable in *settings -> server settings*
- new `/sdapi/v1/upload` endpoint with support for both POST with form-data or PUT using raw-bytes
@@ -440,7 +614,7 @@ Just how big? Some stats: *~530 commits over 880 files*
- replace `timestamp` based startup checks with state caching
- split monolithic `shared` module and introduce `ui_definitions`
- modularize all imports and avoid re-imports
- use `threading` for deferable operatios
- use `threading` for deferable operations
- use `threading` for io-independent parallel operations
- remove requirements: `clip`, `open-clip`
- add new build of `insightface`, thanks @hameerabbasi
@@ -471,7 +645,7 @@ Just how big? Some stats: *~530 commits over 880 files*
- model detection for `anima`
- handle `lora` unwanted unload
- improve `preview` error handler
- handle `gallery` over remote/unsecure connections
- handle `gallery` over remote/insecure connections
- fix `ltx2-i2v`
- handle missing `preview` image
- kandinsky 5 t2i/i2i model type detection
@@ -549,7 +723,7 @@ Also here are updates to `torch` and additional GPU archs support for `ROCm` bac
- further work on type consistency and type checking, thanks @awsr
- log captured exceptions
- improve temp folder handling and cleanup
- remove torch errors/warings on fast server shutdown
- remove torch errors/warnings on fast server shutdown
- add ui placeholders for future agent-scheduler work, thanks @ryanmeador
- implement abort system on repeated errors, thanks @awsr
currently used by lora and textual-inversion loaders
@@ -591,7 +765,7 @@ For full list of changes, see full changelog.
- **Models**
- [Flux.2 Klein](https://bfl.ai/blog/flux2-klein-towards-interactive-visual-intelligence)
Flux.2-Klein is a new family of compact models from BFL in *4B and 9B sizes* and avaialable as *destilled and base* variants
Flux.2-Klein is a new family of compact models from BFL in *4B and 9B sizes* and available as *destilled and base* variants
also includes are *sdnq prequantized variants*
*note*: 9B variant is [gated](https://vladmandic.github.io/sdnext-docs/Gated/)
- [Qwen-Image-2512](https://qwen.ai/blog?id=qwen-image-2512)
@@ -627,7 +801,7 @@ For full list of changes, see full changelog.
add support for *pre-fill* mode where prompt enhance can continue from existing caption
- **chroma**: add inpaint pipeline support
- **taesd preview**: support for more models, thanks @alerikaisattera
- **image ouput paths**: better handling of relative/absolute paths, thanks @CalamitousFelicitousness
- **image output paths**: better handling of relative/absolute paths, thanks @CalamitousFelicitousness
- **UI**
- kanvas add send-to functionality
- kanvas improve support for standardui
@@ -671,7 +845,7 @@ For full list of changes, see full changelog.
- lora handle null description, thanks @CalamitousFelicitousness
- lora loading when using torch without distributed support
- lora skip with strength zero
- lora: generate slowdown when consequtive lora-diffusers enabled
- lora: generate slowdown when consecutive lora-diffusers enabled
- model: google-genai auth, thanks @CalamitousFelicitousness
- model: improve qwen i2i handling
- model: kandinsky-5 image and video on non-cuda platforms
@@ -737,7 +911,7 @@ End of year release update, just two weeks after previous one, with several new
- control input media with non-english locales
- handle embeds when on meta device
- improve offloading when model has manual modules
- ui section colapsible state, thanks @awsr
- ui section collapsible state, thanks @awsr
- ui filter by model type
## Update for 2025-12-11
@@ -797,7 +971,7 @@ Plus a lot of internal improvements and fixes
- support for `XiaomiMiMo`
ui:
- ability to annotate actual image, not just generate captions/answers
e.g. actualy mark detected regions/points
e.g. actually mark detected regions/points
features:
- ui indicator of model capabilities
- support for *prefill* style of prompting/answering
@@ -976,11 +1150,11 @@ Less than 2 weeks since last release, here's a service-pack style update with a
- [Tencent HunyuanImage 2.1](https://huggingface.co/tencent/HunyuanImage-2.1) in *full*, *distilled* and *refiner* variants
*HunyuanImage-2.1* is a large (51GB) T2I model capable of natively generating 2K images and uses Qwen2.5 + T5 text-encoders and 32x VAE
- [Tencent HunyuanImage 3.0](https://huggingface.co/tencent/HunyuanImage-3.0) in [pre-quant](https://huggingface.co/Disty0/HunyuanImage3-SDNQ-uint4-svd-r32) only variant due to massive size
*HunyuanImage 3.0* is very large at 47GB pre-quantized (oherwise its 157GB) that unifies multimodal understanding and generation within an autoregressive framework
*HunyuanImage 3.0* is very large at 47GB pre-quantized (otherwise its 157GB) that unifies multimodal understanding and generation within an autoregressive framework
- [nVidia ChronoEdit](https://huggingface.co/nvidia/ChronoEdit-14B-Diffusers)
*ChronoEdit* is a 14B image editing model based on *WAN*
this model reframes image editing as a video generation task, using input and edited images as start/end frames to leverage pretrained video models with temporal consistency
to extend temporal consistency for image editing, set *settings -> model options -> chrono temporal steps* to desired number of temporaly reasoning steps
to extend temporal consistency for image editing, set *settings -> model options -> chrono temporal steps* to desired number of temporary reasoning steps
- [Kandinsky 5 Lite 10s](https://huggingface.co/ai-forever/Kandinsky-5.0-T2V-Lite-sft-10s-Diffusers') in *SFT, CFG-distilled and Steps-distilled* variants
second series of models in *Kandinsky5* series is T2V model optimized for 10sec videos and uses Qwen2.5 text encoder
- [Pony 7](https://huggingface.co/purplesmartai/pony-v7-base)
@@ -1035,7 +1209,7 @@ Less than 2 weeks since last release, here's a service-pack style update with a
- fix networks display with extended characters, thanks @awsr
- installer handle different `opencv` package variants
- fix using pre-quantized shared-t5
- fix `wan-2.2-14b-vace` single-stage exectution
- fix `wan-2.2-14b-vace` single-stage execution
- fix `wan-2.2-5b` tiled vae decode
- fix `controlnet` loading with quantization
- video use pre-quantized text-encoder if selected model is pre-quantized
@@ -1239,7 +1413,7 @@ Highlight are:
- fix hf token with extra chars
- image viewer refocus on gallery after returning from full screen mode
- fix attention guidance metadata save/restore
- vae preview add explicity cuda.sync
- vae preview add explicitly cuda.sync
## Update for 2025-09-15
@@ -1345,7 +1519,7 @@ And check out new **history** tab in the right panel, it now shows visualization
- allow setting denoise strength to 0 in control/img2img
this allows to run workflows which only refine or detail existing image without changing it
- **Fixes**
- normalize path hanlding when deleting images
- normalize path handling when deleting images
- unified compile upscalers
- fix OpenVINO with ControlNet
- fix hidden model tags in networks display
@@ -1476,7 +1650,7 @@ SD.Next will warn on startup on unused cache entries that can be removed. Also,
**Docs** search: fully-local and works in real-time on all document pages
**Wiki** search: uses github api to search online wiki pages
- updated real-time hints, thanks @CalamitousFelicitousness
- add **Wilcards** UI
- add **Wildcards** UI
in networks display
- every heading element is collapsible!
- quicksettings reset button to restore all quicksettings to default values
@@ -1516,7 +1690,7 @@ SD.Next will warn on startup on unused cache entries that can be removed. Also,
- new `offload during pre-forward` option
in *settings -> model offloading*
switches from explicit offloading to implicit offloading on module execution change
- new `diffusers_offload_nonblocking` exerimental setting
- new `diffusers_offload_nonblocking` experimental setting
instructs torch to use non-blocking move operations when possible
- **Features**
- new `T5: Use shared instance of text encoder` option
@@ -1526,10 +1700,10 @@ SD.Next will warn on startup on unused cache entries that can be removed. Also,
*note* this will not reduce size of your already downloaded models, but will reduce size of future downloads
- **Wan** select which stage to run: *first/second/both* with configurable *boundary ration* when running both stages
in settings -> model options
- prompt parser allow explict `BOS` and `EOS` tokens in prompt
- prompt parser allow explicit `BOS` and `EOS` tokens in prompt
- **Nunchaku** support for *FLUX.1-Fill* and *FLUX.1-Depth* models
- update requirements/packages
- use model vae scale-factor for image width/heigt calculations
- use model vae scale-factor for image width/height calculations
- **SDNQ** add `modules_dtype_dict` to quantize *Qwen Image* with mixed dtype
- **prompt enhance**
add `allura-org/Gemma-3-Glitter-4B`, `Qwen/Qwen3-4B-Instruct-2507`, `Qwen/Qwen2.5-VL-3B-Instruct` model support
@@ -1689,7 +1863,7 @@ For details, see [ChangeLog](https://github.com/vladmandic/automatic/blob/master
with *t2i, i2i, flf2v* workflows
LoRA support, prompt enhance, etc.
now fully integrated instead of being a separate extension
- support for optmized [LTXVideo](https://vladmandic.github.io/sdnext-docs/LTX)
- support for optimized [LTXVideo](https://vladmandic.github.io/sdnext-docs/LTX)
with *t2i, i2i, v2v* workflows
optional native upsampling and video refine workflows
LoRA support with different conditioning types such as Canny/Depth/Pose, etc.
@@ -1722,7 +1896,7 @@ For details, see [ChangeLog](https://github.com/vladmandic/automatic/blob/master
- support **TAESD** preview and remote VAE for **AuraFlow**
- support **TAESD** preview for **WanAI**
- SD.Next now starts with *locked* state preventing model loading until startup is complete
- warn when modifying legacy settings that are no longer supported, but available for compatibilty
- warn when modifying legacy settings that are no longer supported, but available for compatibility
- warn on incompatible sampler and automatically restore default sampler
- **XYZ grid** can now work with control tab:
if controlnet or processor are selected in xyz grid, they will overwrite settings from first unit in control tab,
@@ -1752,7 +1926,7 @@ For details, see [ChangeLog](https://github.com/vladmandic/automatic/blob/master
- fix Cosmos-Predict2 retrying TAESD download
- better handle startup import errors
- fix traceback width preventing copy&paste
- fix ansi controle output from scripts/extensions
- fix ansi controls output from scripts/extensions
- fix diffusers models non-unique hash
- fix loading of manually downloaded diffuser models
- fix api `/sdapi/v1/embeddings` endpoint
@@ -1992,7 +2166,7 @@ Take a look at [Docs](https://github.com/vladmandic/sdnext/wiki/Docs), [Hints](h
- Fix high RAM usage with pre mode
- Fix scale and zero_point not being offloaded
- **IPEX**
- Disabe Dynamic Attention by default on PyTorch 2.7
- Disable Dynamic Attention by default on PyTorch 2.7
- Remove GradScaler hijack and use `torch.amp.GradScaler` instead
- **Feature**
- TeaCache support for HiDream I1
@@ -2100,7 +2274,7 @@ And if you're a ROCm user, this release brings much faster compile times on Linu
## Update for 2025-05-06
Minor refesh with several bugfixes and updates to core libraries
Minor refresh with several bugfixes and updates to core libraries
Plus new features with **FramePack** and **HiDream-E1**
- **Features**
@@ -2534,7 +2708,7 @@ Primarily a hotfix/service release plus few UI improvements and one exciting new
- add `--extensions-dir` cli arg and `SD_EXTENSIONSDIR` env variable to specify extensions directory
- update `zluda==3.9.0`
- **Fixes**
- skip trying to register legacy/incompatibile extensions in control ui
- skip trying to register legacy/incompatible extensions in control ui
- add additional scripts/extensions callbacks
- remove ui splash screen on auth fail
- log full config path, full log path, system name, extensions path
@@ -2563,7 +2737,7 @@ We're back with another update with nearly 100 commits!
now with redesigned captioning UI, batch support, and much more
plus **JoyTag**, **JoyCaption**, **PaliGemma**, **ToriiGate**, **Ovis2** added to list of supported models
- Some changes to **prompt parsing** to allow more control as well as
more flexibility when mouting SDNext server to custom URL
more flexibility when mounting SDNext server to custom URL
- Of course, cumulative fixes...
*...and more* - see [changelog](https://github.com/vladmandic/sdnext/blob/dev/CHANGELOG.md) for full details!
@@ -2634,10 +2808,10 @@ We're back with another update with nearly 100 commits!
due to binary/build dependencies, it should not be done automatically,
see [flash-attn](https://github.com/Dao-AILab/flash-attention) for installation instructions
- **Docker**
- updated **CUDA** receipe to `torch==2.6.0` with `cuda==12.6` and add prebuilt image
- added **ROCm** receipe and prebuilt image
- added **IPEX** receipe and add prebuilt image
- added **OpenVINO** receipe and prebuilt image
- updated **CUDA** recipe to `torch==2.6.0` with `cuda==12.6` and add prebuilt image
- added **ROCm** recipe and prebuilt image
- added **IPEX** recipe and add prebuilt image
- added **OpenVINO** recipe and prebuilt image
- **System**
- improve **python==3.12** compatibility
- **Torch**
@@ -2661,7 +2835,7 @@ We're back with another update with nearly 100 commits!
- **Access tokens**
persist *models -> hugginface -> token*
persist *models -> civitai -> token*
- global switch to lancosz method for all interal resize ops and bicubic for interpolation ops
- global switch to lancosz method for all internal resize ops and bicubic for interpolation ops
- **Text encoder**
add advanced per-model options for text encoder
set in *settings -> text encoder -> Optional*
@@ -2741,7 +2915,7 @@ Just one week after latest release and what a week it was with over 50 commits!
- new sota remove background model: [BEN2](https://huggingface.co/PramaLLC/BEN2)
select in *process -> remove background* or enable postprocessing for txt2img/img2img operations
- **Other**:
- **networks**: imporove search/filter and add visual indicators for types
- **networks**: improve search/filter and add visual indicators for types
- **balanced offload** new defaults: *lowvram/4gb min threshold: 0, medvram/8gb min threshold: 0, default min threshold 0.25*
- **prompt parser**: log stats with tokens, sections and min/avg/max weights
- **prompt parser**: add setting to ignore line breaks in prompt
@@ -2888,7 +3062,7 @@ Two weeks since last release, time for update!
### Highlights for 2025-01-15
Two weeks since last release, time for update!
This time a bit shorter highligh reel as this is primarily a service release, but still there is more than few updates
This time a bit shorter highlight reel as this is primarily a service release, but still there is more than few updates
*(actually, there are ~60 commits, so its not that tiny)*
*What's New?"
@@ -2959,7 +3133,7 @@ This time a bit shorter highligh reel as this is primarily a service release, bu
- **XYZ Grid**: add prompt search&replace options: *primary, refine, detailer, all*
- **SysInfo**: update to collected data and benchmarks
- **Fixes**:
- explict clear caches on model load
- explicit clear caches on model load
- lock adetailer commit: `#a89c01d`
- xyzgrid progress calculation
- xyzgrid detailer
@@ -3122,9 +3296,9 @@ All-in-all, we're around ~180 commits worth of updates, check the changelog for
- [Style Aligned Image Generation](https://style-aligned-gen.github.io/)
enable in scripts, compatible with sd-xl
enter multiple prompts in prompt field separated by new line
style-aligned applies selected attention layers uniformly to all images to achive consistency
style-aligned applies selected attention layers uniformly to all images to achieve consistency
can be used with or without input image in which case first prompt is used to establish baseline
*note:* all prompts are processes as a single batch, so vram is limiting factor
*note:* all prompts are processed as a single batch, so vram is limiting factor
- [FreeScale](https://github.com/ali-vilab/FreeScale)
enable in scripts, compatible with sd-xl for text and img2img
run iterative generation of images at different scales to achieve better results
@@ -3137,22 +3311,22 @@ All-in-all, we're around ~180 commits worth of updates, check the changelog for
model size: 27.75gb
support for 0.9.0, 0.9.1 and custom safetensor-based models with full quantization and offloading support
support for text-to-video and image-to-video, to use, select in *scripts -> ltx-video*
*refrence values*: steps 50, width 704, height 512, frames 161, guidance scale 3.0
*reference values*: steps 50, width 704, height 512, frames 161, guidance scale 3.0
- [Hunyuan Video](https://huggingface.co/tencent/HunyuanVideo)
model size: 40.92gb
support for text-to-video, to use, select in *scripts -> hunyuan video*
basic support only
*refrence values*: steps 50, width 1280, height 720, frames 129, guidance scale 6.0
*reference values*: steps 50, width 1280, height 720, frames 129, guidance scale 6.0
- [Genmo Mochi.1 Preview](https://huggingface.co/genmo/mochi-1-preview)
support for text-to-video, to use, select in *scripts -> mochi.1 video*
basic support only
*refrence values*: steps 64, width 848, height 480, frames 19, guidance scale 4.5
*reference values*: steps 64, width 848, height 480, frames 19, guidance scale 4.5
*Notes*:
- all video models are very large and resource intensive!
any use on gpus below 16gb and systems below 48gb ram is experimental at best
- sdnext support for video models is relatively basic with further optimizations pending community interest
any future optimizations would likely have to go into partial loading and excecution instead of offloading inactive parts of the model
any future optimizations would likely have to go into partial loading and execution instead of offloading inactive parts of the model
- new video models use generic llms for prompting and due to that requires very long and descriptive prompt
- you may need to enable sequential offload for maximum gpu memory savings
- optionally enable pre-quantization using bnb for additional memory savings
@@ -3200,7 +3374,7 @@ All-in-all, we're around ~180 commits worth of updates, check the changelog for
- improved accordion behavior
- auto-size networks height for sidebar
- control: hide preview column by default
- control: optionn to hide input column
- control: option to hide input column
- control: add stats
- settings: reorganized and simplified
- browser -> server logging framework
@@ -3257,7 +3431,7 @@ All-in-all, we're around ~180 commits worth of updates, check the changelog for
- uninstall conflicting `wandb` package
- dont skip diffusers version check if quick is specified
- notify on torch install
- detect pipeline fro diffusers folder-style model
- detect pipeline from diffusers folder-style model
- do not recast flux quants
- fix xyz-grid with lora none
- fix svd image2video
@@ -3303,7 +3477,7 @@ For full list and details see changelog...
- new top-level **info** tab with access to [changelog](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) and [wiki](https://github.com/vladmandic/automatic/wiki)
- UI built-in [changelog](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) search
since changelog is the best up-to-date source of info
go to info -> changelog and search/highligh/navigate directly in UI!
go to info -> changelog and search/highlight/navigate directly in UI!
- UI built-in [wiki](https://github.com/vladmandic/automatic/wiki)
go to info -> wiki and search wiki pages directly in UI!
- major [Wiki](https://github.com/vladmandic/automatic/wiki) and [Home](https://github.com/vladmandic/automatic) updates
@@ -3389,9 +3563,9 @@ For full list and details see changelog...
- refactor command line params
run `webui.sh`/`webui.bat` with `--help` to see all options
- added `cli/model-metadata.py` to display metadata in any safetensors file
- added `cli/model-keys.py` to quicky display content of any safetensors file
- added `cli/model-keys.py` to quickly display content of any safetensors file
- Internal:
- Auto pipeline switching coveres wrapper classes and nested pipelines
- Auto pipeline switching covers wrapper classes and nested pipelines
- Full settings validation on load of `config.json`
- Refactor of all params in main processing classes
- Improve API scripts usage resiliency
@@ -3425,7 +3599,7 @@ This release can be considered an LTS release before we kick off the next round
- fix diffusers load from folder
- fix lora enum logging on windows
- fix xyz grid with batch count
- move dowwloads of some auxillary models to hfcache instead of models folder
- move dowwloads of some auxiliary models to hfcache instead of models folder
## Update for 2024-10-29
@@ -3534,7 +3708,7 @@ A month later and with nearly 300 commits, here is the latest [SD.Next](https://
- Tons of work on **dynamic quantization** that can be applied *on-the-fly* during model load to any model type (*you do not need to use pre-quantized models*)
Supported quantization engines include `BitsAndBytes`, `TorchAO`, `Optimum.quanto`, `NNCF` compression, and more...
- Auto-detection of best available **device/dtype** settings for your platform and GPU reduces neeed for manual configuration
- Auto-detection of best available **device/dtype** settings for your platform and GPU reduces need for manual configuration
*Note*: This is a breaking change to default settings and its recommended to check your preferred settings after upgrade
- Full rewrite of **sampler options**, not far more streamlined with tons of new options to tweak scheduler behavior
- Improved **LoRA** detection and handling for all supported models
@@ -3695,7 +3869,7 @@ And there are also other goodies like multiple *XYZ grid* improvements, addition
- [Meissonic](https://github.com/viiika/Meissonic)
- Select from *networks -> models -> reference*
- Experimental as upstream implemenation code is unstable
- Experimental as upstream implementation code is unstable
- Must set scheduler:default, generator:unset
- [SageAttention](https://github.com/thu-ml/SageAttention)
@@ -3708,7 +3882,7 @@ And there are also other goodies like multiple *XYZ grid* improvements, addition
- previously `cuda_dtype` in settings defaulted to `fp16` if available
- now `cuda_type` defaults to **Auto** which executes `bf16` and `fp16` tests on startup and selects best available dtype
if you have specific requirements, you can still set to fp32/fp16/bf16 as desired
if you have gpu that incorrectly identifies bf16 or fp16 availablity, let us know so we can improve the auto-detection
if you have gpu that incorrectly identifies bf16 or fp16 availability, let us know so we can improve the auto-detection
- support for torch **expandable segments**
enable in *settings -> compute -> torch expandable segments*
can provide significant memory savings for some models
@@ -3910,7 +4084,7 @@ Examples:
enable via *scripts -> color-grading*
- **hires** workflow now allows for full resize options
not just limited width/height/scale
- **xyz grid** is now availabe as both local and global script!
- **xyz grid** is now available as both local and global script!
- **prompt enhance**: improve quality and/or verbosity of your prompts
simply select in *scripts -> prompt enhance*
uses [gokaygokay/Flux-Prompt-Enhance](https://huggingface.co/gokaygokay/Flux-Prompt-Enhance) model
@@ -3987,9 +4161,9 @@ But...For a good reason, new *balanced offload* is magic when it comes to memory
To use and of the new models, simply select model from *Networks -> Reference* and it will be auto-downloaded on first use
- [Black Forest Labs FLUX.1](https://blackforestlabs.ai/announcing-black-forest-labs/)
FLUX.1 models are based on a hybrid architecture of multimodal and parallel diffusion transformer blocks, scaled to 12B parameters and builing on flow matching
FLUX.1 models are based on a hybrid architecture of multimodal and parallel diffusion transformer blocks, scaled to 12B parameters and building on flow matching
This is a very large model at ~32GB in size, its recommended to use a) offloading, b) quantization
For more information on variations, requirements, options, and how to donwload and use FLUX.1, see [Wiki](https://github.com/vladmandic/automatic/wiki/FLUX)
For more information on variations, requirements, options, and how to download and use FLUX.1, see [Wiki](https://github.com/vladmandic/automatic/wiki/FLUX)
SD.Next supports:
- [FLUX.1 Dev](https://huggingface.co/black-forest-labs/FLUX.1-dev) and [FLUX.1 Schnell](https://huggingface.co/black-forest-labs/FLUX.1-schnell) original variations
- additional [qint8](https://huggingface.co/Disty0/FLUX.1-dev-qint8) and [qint4](https://huggingface.co/Disty0/FLUX.1-dev-qint4) quantized variations
@@ -4039,7 +4213,7 @@ To use and of the new models, simply select model from *Networks -> Reference* a
- don't enable Dynamic Attention by default on platforms that support Flash Attention, thanks @Disty0!
- convert offload options into a single choice list, thanks @Disty0!
*note*: requires reset of selected offload option
- control module allows reszing of indivudual process override images to match input image
- control module allows reszing of individual process override images to match input image
for example: set size->before->method:nearest, mode:fixed or mode:fill
- control tab includes superset of txt and img scripts
- automatically offload disabled controlnet units
@@ -4099,7 +4273,7 @@ This release is primary service release with cumulative fixes and several improv
Following zero-day **SD3** release, a 10 days later heres a refresh with 10+ improvements
including full prompt attention, support for compressed weights, additional text-encoder quantization modes.
But theres more than SD3:
But there's more than SD3:
- support for quantized **T5** text encoder *FP16/FP8/FP4/INT8* in all models that use T5: SD3, PixArt-Σ, etc.
- support for **PixArt-Sigma** in small/medium/large variants
- support for **HunyuanDiT 1.1**
@@ -4353,7 +4527,7 @@ a completely different backend/engine and a change of focus, it is time to give
Search or sort by path, name, size, width, height, mtime or any image metadata item, also with extended syntax like *width > 1000*
*Settings*: optional additional user-defined folders, thumbnails in fixed or variable aspect-ratio
- [HiDiffusion](https://github.com/megvii-research/HiDiffusion):
Generate high-resolution images using your standard models without duplicates/distorsions AND improved performance
Generate high-resolution images using your standard models without duplicates/distortions AND improved performance
For example, *SD15* can now go up to *2024x2048* and *SDXL* up to *4k* natively
Simply enable checkbox in advanced menu and set desired resolution
Additional settings are available in *settings -> inference settings -> hidiffusion*
@@ -4481,11 +4655,11 @@ a completely different backend/engine and a change of focus, it is time to give
*note*: you can use other samplers as well with SDXL-Lightning models
- Add *CMSI* sampler, optimized for consistency models
- Add option *timestep spacing* to sampler settings and sampler section in main ui
Note: changing timestep spacing changes behavior of sampler and can help to make any sampler turbo/lightning compatibile
Note: changing timestep spacing changes behavior of sampler and can help to make any sampler turbo/lightning compatible
- Add option *timesteps* to manually set timesteps instead of relying on steps+spacing
Additionally, presets from nVidias align-you-steps reasearch are provided
Additionally, presets from nVidias align-you-steps research are provided
Result is that perfectly aligned steps can drastically reduce number of steps needed!
For example, **AYS** preset alows DPM++2M to run in ~10 steps with quality equallying ~30 steps!
For example, **AYS** preset allows DPM++2M to run in ~10 steps with quality equallying ~30 steps!
- **IPEX**, thanks @Disty0
- Update to *IPEX 2.1.20* on Linux
requires removing the venv folder to update properly
@@ -4548,7 +4722,7 @@ New pipelines and features:
- **Face-HiRes**: simple built-in detailer for face refinements
- Even simpler outpaint: when resizing image, simply pick outpaint method and if image has different aspect ratio, blank areas will be outpainted!
- UI aspect-ratio controls and other UI improvements
- User controllable invisibile and visible watermarking
- User controllable invisible and visible watermarking
- Native composable LoRA
What else?
@@ -4583,7 +4757,7 @@ Further details:
- context aware img2img method with image analysis and positive/negative prompt handling
- enable via img2img -> scripts -> ledit
- uses following params from standard img2img: cfg scale (recommended ~3), steps (recommended ~50), denoise strength (recommended ~0.7)
- can use postive and/or negative prompt to guide editing process
- can use positive and/or negative prompt to guide editing process
- positive prompt: what to enhance, strength and threshold for auto-masking
- negative prompt: what to remove, strength and threshold for auto-masking
- *note*: not compatible with model offloading
@@ -4591,7 +4765,7 @@ Further details:
- independent upscale and hires options: run hires without upscale or upscale without hires or both
- upscale can now run 0.1-8.0 scale and will also run if enabled at 1.0 to allow for upscalers that simply improve image quality
- update ui section to reflect changes
- *note*: behavior using backend:original is unchanged for backwards compatibilty
- *note*: behavior using backend:original is unchanged for backwards compatibility
- **Visual Query** visual query & answer in process tab
- go to process -> visual query
- ask your questions, e.g. "describe the image", "what is behind the subject", "what are predominant colors of the image?"
@@ -4611,7 +4785,7 @@ Further details:
- for svd 1.0, use frames=~14, for xt models use frames=~25
- **Composable LoRA**, thanks @AI-Casanova
- control lora strength for each step
for example: `<xxx:0.1@0,0.9@1>` means strength=0.1 for step at 0% and intepolate towards strength=0.9 for step at 100%
for example: `<xxx:0.1@0,0.9@1>` means strength=0.1 for step at 0% and interpolate towards strength=0.9 for step at 100%
- *note*: this is a very experimental feature and may not work as expected
- **Control**
- added *refiner/hires* workflows
@@ -4636,7 +4810,7 @@ Further details:
- set as default face restorer in settings -> postprocessing
- disabled by default, to enable simply check *face restore* in your generate advanced settings
- strength, steps and sampler are set using by hires section in refine menu
- strength can be overriden in settings -> postprocessing
- strength can be overridden in settings -> postprocessing
- will use secondary prompt and secondary negative prompt if present in refine
- **Watermarking**
- SD.Next disables all known watermarks in models, but does allow user to set custom watermark
@@ -4721,7 +4895,7 @@ This time release schedule was shorter as we wanted to get some of the fixes out
### Highlights 2024-02-22
- **IP-Adapters** & **FaceID**: multi-adapter and multi-image suport
- **IP-Adapters** & **FaceID**: multi-adapter and multi-image support
- New optimization engines: [DeepCache](https://github.com/horseee/DeepCache), [ZLUDA](https://github.com/vosen/ZLUDA) and **Dynamic Attention Slicing**
- New built-in pipelines: [Differential diffusion](https://github.com/exx8/differential-diffusion) and [Regional prompting](https://github.com/huggingface/diffusers/blob/main/examples/community/README.md#regional-prompting-pipeline)
- Big updates to: **Outpainting** (noised-edge-extend), **Clip-skip** (interpolate with non-integrer values!), **CFG end** (prevent overburn on high CFG scales), **Control** module masking functionality
@@ -4742,7 +4916,7 @@ Further details:
*note*: you cannot mix & match ip adapters that use different *CLiP* models, for example `Base` and `Base ViT-G`
- add **adapter start/end** to settings, thanks @AI-Casanova
having adapter start late can help with better control over composition and prompt adherence
having adapter end early can help with overal quality and performance
having adapter end early can help with overall quality and performance
- unified interface in txt2img, img2img and control
- enhanced xyz grid support
- **FaceID** now also works with multiple input images!
@@ -4763,7 +4937,7 @@ Further details:
- [ZLUDA](https://github.com/vosen/ZLUDA) experimental support, thanks @lshqqytiger
- ZLUDA is CUDA wrapper that can be used for GPUs without native support
- best use case is *AMD GPUs on Windows*, see [wiki](https://github.com/vladmandic/automatic/wiki/ZLUDA) for details
- **Outpaint** control outpaint now uses new alghorithm: noised-edge-extend
- **Outpaint** control outpaint now uses new algorithm: noised-edge-extend
new method allows for much larger outpaint areas in a single pass, even outpaint 512->1024 works well
note that denoise strength should be increased for larger the outpaint areas, for example outpainting 512->1024 works well with denoise 0.75
outpaint can run in *img2img* mode (default) and *inpaint* mode where original image is masked (if inpaint masked only is selected)
@@ -4775,7 +4949,7 @@ Further details:
for example, when used with ip-adapters or controlnet, high cfg scale can overpower the guided image
- **Control**
- when performing inpainting, you can specify processing resolution using **size->mask**
- units now have extra option to re-use current preview image as processor input
- units now have extra option to reuse current preview image as processor input
- **Cross-attention** refactored cross-attention methods, thanks @Disty0
- for backend:original, its unchanged: SDP, xFormers, Doggettxs, InvokeAI, Sub-quadratic, Split attention
- for backend:diffuers, list is now: SDP, xFormers, Batch matrix-matrix, Split attention, Dynamic Attention BMM, Dynamic Attention SDP
@@ -4900,7 +5074,7 @@ Further details:
if you dont provide mask or mask is empty, you can instead use auto-mask to automatically generate mask
this is especially useful if you want to use advanced masking on batch or video inputs and dont want to manually mask each image
*note*: such auto-created mask is also subject to all other selected settings such as auto-segmentation, blur, erode and dilate
- optional **object removal** using LaMA model
- optional **object removal** using LAMA model
remove selected objects from images with a single click
works best when combined with auto-segmentation to remove smaller objects
- masking can be combined with control processors in which case mask is applied before processor
@@ -4935,7 +5109,7 @@ Further details:
- support controlnets with non-default yaml config files
- implement resize modes for override images
- allow any selection of units
- dynamically install depenencies required by specific processors
- dynamically install dependencies required by specific processors
- fix input image size
- fix video color mode
- fix correct image mode
@@ -4979,7 +5153,7 @@ Further details:
- support for create and load custom mixes will be added in the future
- [Mixture Tiling](https://arxiv.org/abs/2302.02412)
- uses multiple prompts to guide different parts of the grid during diffusion process
- can be used ot create complex scenes with multiple subjects
- can be used to create complex scenes with multiple subjects
- simply select from scripts
- [Self-attention guidance](https://github.com/SusungHong/Self-Attention-Guidance)
- simply select scale in advanced menu
@@ -5061,7 +5235,7 @@ Further details:
- correct font scaling, thanks @nCoderGit
- **hypertile**
- enable vae tiling
- add autodetect optimial value
- add autodetect optimal value
set tile size to 0 to use autodetected value
- **cli**
- `sdapi.py` allow manual api invoke
@@ -5092,7 +5266,7 @@ Further details:
- **IPEX**, thanks @disty0
- see [wiki](https://github.com/vladmandic/automatic/wiki/Intel-ARC) for details
- rewrite ipex hijacks without CondFunc
improves compatibilty and performance
improves compatibility and performance
fixes random memory leaks
- out of the box support for Intel Data Center GPU Max Series
- remove IPEX / Torch 2.0 specific hijacks
@@ -5194,7 +5368,7 @@ To wrap up this amazing year, were releasing a new version of [SD.Next](https://
- Better onboarding experience (first install)
with all model types available for single click download & load (networks -> reference)
- Performance optimizations!
For comparisment of different processing options and compile backends, see [Wiki](https://github.com/vladmandic/automatic/wiki/Benchmark)
For comparison of different processing options and compile backends, see [Wiki](https://github.com/vladmandic/automatic/wiki/Benchmark)
As a highlight, were reaching **~100 it/s** (no tricks, this is with full features enabled and end-to-end on a standard nVidia RTX4090)
- New [custom pipelines](https://github.com/vladmandic/automatic/blob/dev/scripts/example.py) framework for quickly porting any new pipeline
@@ -5294,7 +5468,7 @@ Plus some nifty new modules such as **FaceID** automatic face guidance using emb
use if you have multiple complex loras that may be causing performance degradation
as it fuses lora with model during load instead of interpreting lora on-the-fly
- **CivitAI downloader** allow usage of access tokens for download of gated or private models
- **Extra networks** new *settting -> extra networks -> build info on first access*
- **Extra networks** new *setting -> extra networks -> build info on first access*
indexes all networks on first access instead of server startup
- **IPEX**, thanks @disty0
- update to **Torch 2.1**
@@ -5328,7 +5502,7 @@ Plus some nifty new modules such as **FaceID** automatic face guidance using emb
- **chaiNNer** fix `NaN` issues due to autocast
- **Upscale** increase limit from 4x to 8x given the quality of some upscalers
- **Networks** fix sort
- reduced default **CFG scale** from 6 to 4 to be more out-of-the-box compatibile with LCM/Turbo models
- reduced default **CFG scale** from 6 to 4 to be more out-of-the-box compatible with LCM/Turbo models
- disable google fonts check on server startup
- fix torchvision/basicsr compatibility
- fix styles quick save
@@ -5379,7 +5553,7 @@ Also new is support for **SDXL-Turbo** as well as new **Kandinsky 3** models and
- model params count is at 11.9B (compared to SD-XL at 3.3B) and its trained on mixed resolutions from 256px to 1024px
- use either model offload or sequential cpu offload to be able to use it
- better autodetection of *inpaint* and *instruct* pipelines
- support long seconary prompt for refiner
- support long secondary prompt for refiner
- **Video support**
- applies to any model that supports video generation, e.g. AnimateDiff and StableVideoDiffusion
- support for **animated-GIF**, **animated-PNG** and **MP4**
@@ -6173,7 +6347,7 @@ Trying to unify settings for both original and diffusers backend without introdu
Another big one, but now improvements to both **diffusers** and **original** backends as well plus ability to dynamically switch between them!
- swich backend between diffusers and original on-the-fly
- switch backend between diffusers and original on-the-fly
- you can still use `--backend <backend>` and now that only means in which mode app will start,
but you can change it anytime in ui settings
- for example, you can even do things like generate image using sd-xl,
@@ -6210,7 +6384,7 @@ Service release with some fixes and enhancements:
note that **sd-xl** img2img workflows are architecturaly different so it will take longer to implement
- updated hints for settings
- extra networks:
- fix corrupt display on refesh when new extra network type found
- fix corrupt display on refresh when new extra network type found
- additional ui tweaks
- generate thumbnails from previews only if preview resolution is above 1k
- image viewer:
@@ -6328,7 +6502,7 @@ Both some **new functionality** as well as **massive merges** from upstream
if disabled, model will be loaded on first request, e.g. when you click generate
useful when you want to start server to perform other tasks like upscaling which do not rely on model
- updated `accelerate` and `xformers`
- huge nubmer of changes ported from **A1111** upstream
- huge number of changes ported from **A1111** upstream
this was a massive merge, hopefully this does not cause any regressions
and still a bit more pending...
@@ -6388,7 +6562,7 @@ Some quality-of-life improvements while working on larger stuff in the backgroun
but they are saved correctly. and cant beat raw quality of 32-bit `tiff` or `psd` :)
- change in behavior: `xformers` will be uninstalled on startup if they are not active
if you do have `xformers` selected as your desired cross-optimization method, then they will be used
reason is that a lot of libaries try to blindly import xformers even if they are not selected or not functional
reason is that a lot of libraries try to blindly import xformers even if they are not selected or not functional
## Update for 2023-05-30
@@ -6448,7 +6622,7 @@ Major internal work with perhaps not that much user-facing to show for it ;)
- redo api authentication
now api authentication will use same user/pwd (if specified) for ui and strictly enforce it using httpbasicauth
new authentication is also fully supported in combination with ssl for both sync and async calls
if you want to use api programatically, see examples in `cli/sdapi.py`
if you want to use api programmatically, see examples in `cli/sdapi.py`
- add dark/light theme mode toggle
- redo some `clip-skip` functionality
- better matching for vae vs model
+19 -23
View File
@@ -1,27 +1,23 @@
# Contributing Guidelines
# Contributing to SD.Next
Pull requests from everyone are welcome
Welcome! Were glad you want to help improve SD.Next.
Procedure for contributing:
This repository accepts contributions for code, UI, extensions, scripts, themes, documentation, and more.
- Select SD.Next `dev` branch:
<https://github.com/vladmandic/sdnext/tree/dev>
- Create a fork of the repository on github
In a top right corner of a GitHub, select "Fork"
Its recommended to fork latest version from main branch to avoid any possible conflicting code updates
- Clone your forked repository to your local system
`git clone https://github.com/<your-username>/<your-fork>`
- Make your changes
- Test your changes
- Lint your changes against code guidelines
- `ruff check`
- `pylint <folder>/<filename>.py`
- Push changes to your fork
- Submit a PR (pull request)
- Make sure that PR is against `dev` branch
- Update your fork before createing PR so that it is based on latest code
- Make sure that PR does NOT include any unrelated edits
- Make sure that PR does not include changes to submodules
## How to start
Your pull request will be reviewed and pending review results, merged into `dev` branch
Dev merges to main are performed regularly and any PRs that are merged to `dev` will be included in the next main release
- Read `CODE_OF_CONDUCT` first.
- Visit `wiki/Dev-Home.md` for the projects conventions and development workflow.
- Search existing issues and pull requests before creating a new one.
## Keep it simple
- Focus each contribution on one clear change.
- Link related issues or discussions when you open a PR.
- Keep your branch small and easy to review.
- Explain what you changed and why in the PR description.
## When in doubt
- Ask in [Discord Server](https://discord.gg/sd-next-federal-batch-inspectors-1101998836328697867)
- Ask in [GitHub Discussions](https://github.com/vladmandic/sdnext/discussions)
+65 -56
View File
@@ -1,75 +1,99 @@
<div align="center">
<img src="https://github.com/vladmandic/sdnext/raw/master/html/logo-transparent.png" width=200 alt="SD.Next: AI art generator logo">
<img src="https://github.com/vladmandic/sdnext/raw/dev/ui/assets/logo-transparent.png" width=200 alt="SD.Next: AI art generator logo">
# SD.Next: All-in-one WebUI
SD.Next is a powerful, open-source WebUI app for AI image and video generation, built on Stable Diffusion and supporting dozens of advanced models. Create, caption, and process images and videos with a modern, cross-platform interface—perfect for artists, researchers, and AI enthusiasts.
SD.Next is a state-of-the-art, open-source server application and web interface (WebUI) for AI image and video generation, built on Stable Diffusion and supporting dozens of advanced models. Create, refine, caption, upscale and process images and videos with a modern, cross-platform application — perfect for artists, researchers, and AI enthusiasts.
[![Stars](https://img.shields.io/github/stars/vladmandic/sdnext?style=for-the-badge&color=%237DD3FC)](https://ossinsight.io/analyze/vladmandic/sdnext#overview)
[![Forks](https://img.shields.io/github/forks/vladmandic/sdnext?style=for-the-badge&color=%2360A5FA)](https://github.com/vladmandic/sdnext/forks)
[![Contributors](https://img.shields.io/github/contributors/vladmandic/sdnext?style=for-the-badge&color=%233B82F6)](https://github.com/vladmandic/sdnext/graphs/contributors)
[![License](https://img.shields.io/github/license/vladmandic/sdnext?style=for-the-badge&color=%232563EB)](LICENSE.txt)
![Stars](https://img.shields.io/github/stars/vladmandic/sdnext?style=social)
![Forks](https://img.shields.io/github/forks/vladmandic/sdnext?style=social)
![Contributors](https://img.shields.io/github/contributors/vladmandic/sdnext)
![Last update](https://img.shields.io/github/last-commit/vladmandic/sdnext?svg=true)
![License](https://img.shields.io/github/license/vladmandic/sdnext?svg=true)
[![Discord](https://img.shields.io/discord/1101998836328697867?logo=Discord&svg=true)](https://discord.gg/VjvR2tabEX)
[![DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/vladmandic/sdnext)
[![Sponsors](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/vladmandic)
![Last release](https://img.shields.io/github/v/tag/vladmandic/sdnext?style=for-the-badge&color=%231E40AF)
![Last commit](https://img.shields.io/github/last-commit/vladmandic/sdnext?style=for-the-badge&color=%231D4ED8)
[![Dev](https://img.shields.io/github/commits-difference/vladmandic/sdnext?base=master&head=dev&style=for-the-badge&color=%231E3A8A)](https://github.com/vladmandic/sdnext/compare/master...dev)
[Docs](https://vladmandic.github.io/sdnext-docs/) | [Wiki](https://github.com/vladmandic/sdnext/wiki) | [Discord](https://discord.gg/VjvR2tabEX) | [Changelog](CHANGELOG.md)
[![Home](https://img.shields.io/badge/Home-teal?style=for-the-badge&logo=artstation&logoColor=white&color=%2314B8A6)](https://vladmandic.github.io/sdnext/)
[![Code](https://img.shields.io/badge/Code-blue?style=for-the-badge&logo=github&logoColor=white&color=%232563EB)](https://github.com/vladmandic/sdnext)
[![Docs](https://img.shields.io/badge/Docs-purple?style=for-the-badge&logo=gitbook&logoColor=white&color=%237C3AED)](https://vladmandic.github.io/sdnext-docs/)
[![Wiki](https://img.shields.io/badge/Wiki-purple?style=for-the-badge&logo=wearos&logoColor=white&color=%23A78BFA)](https://github.com/vladmandic/sdnext/wiki)
[![Changelog](https://img.shields.io/badge/Changelog-purple?style=for-the-badge&logo=git&logoColor=white&color=%23C4B5FD)](CHANGELOG.md)
[![Discord](https://img.shields.io/discord/1101998836328697867?style=for-the-badge&logo=Discord&logoColor=white&color=%233B82F6&svg=true)](https://discord.gg/VjvR2tabEX)
[![Sponsors](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23FB7185&style=for-the-badge)](https://github.com/sponsors/vladmandic)
</div>
</br>
<br>
## Table of contents
- [Documentation](https://vladmandic.github.io/sdnext-docs/)
- [Features & Capabilities](#features-and-capabilities)
- [Why SD.Next?](#why-sdnext)
- [Screenshots](#screenshots)
- [Supported Workflows](#supported-workflows)
- [Supported AI Models](#supported-ai-models)
- [Supported Platforms & Hardware](#supported-platforms-and-hardware)
- [Getting started](#getting-started)
- [Community and Support](#community-and-support)
- [Credits](#credits)
- [Development and Contributing](#development-and-contributing)
### Screenshot: Desktop interface
## Why SD.Next?
SD.Next is feature-rich open-source AI art generation platform with a focus on performance, flexibility, and user experience.
In addition to supporting all popular [workflows](#supported-workflows), a wide range of [platforms](#supported-platforms-and-hardware) and [models](#supported-ai-models), SD.Next includes many features not found in other WebUIs, such as:
- Support for many [Diffusion models](https://vladmandic.github.io/sdnext-docs/Model-Support/)!
- **Automatic model download**: simply select a model from the list of reference models and it will be downloaded and ready to use
Or download and add your own models and they will be automatically detected and available in the UI
- **SDNQ**: State-of-the-Art model quantization engine
Use pre-quantized or run with quantization on-the-fly for up to 4x VRAM reduction with no or minimal quality and performance impact
- **Balanced Offload**: Dynamically balance CPU and GPU memory to run larger models on limited hardware
- **Caption and Enhance** with 25+ built-in **LLM** and **VLM** models, **OpenCLiP** models, **Tagger** with **WaifuDiffusion** and **DeepDanbooru** models
- **Image Processing** with full image correction color-grading suite of tools
- [Multi-platform](https://vladmandic.github.io/sdnext-docs/Platforms/)!
Platform specific auto-detection and tuning performed on install
- Fully **Localized** to ~15 languages and with support for many [UI themes](https://vladmandic.github.io/sdnext-docs/Themes/)!
- **Desktop** and **mobile** interfaces
- Built in **installer** with automatic updates and dependency management
## Screenshots
<div align="right">Desktop interface</div>
<div align="center">
<img src="https://github.com/vladmandic/sdnext/raw/dev/html/screenshot-robot.jpg" alt="SD.Next: AI art generator desktop interface screenshot" width="90%">
<img src="https://github.com/vladmandic/sdnext/raw/dev/ui/assets/screenshot-robot.jpg" alt="SD.Next: AI art generator desktop interface screenshot" width="90%">
</div>
### Screenshot: Mobile interface
<div align="right">Mobile interface</div>
<div align="center">
<img src="https://github.com/user-attachments/assets/ced9fe0c-d2c2-46d1-94a7-8f9f2307ce38" alt="SD.Next: AI art generator mobile interface screenshot" width="35%">
</div>
</div>
<br>
## Features and Capabilities
SD.Next is feature-rich with a focus on performance, flexibility, and user experience. Key features include:
- [Multi-platform](#platform-support!
- Many [diffusion models](https://vladmandic.github.io/sdnext-docs/Model-Support/)!
- Fully localized to ~15 languages and with support for many [UI themes](https://vladmandic.github.io/sdnext-docs/Themes/)!
- [Desktop](#screenshot-desktop-interface) and [Mobile](#screenshot-mobile-interface) support!
- Platform specific auto-detection and tuning performed on install
- Built in installer with automatic updates and dependency management
### Unique features
SD.Next includes many features not found in other WebUIs, such as:
- **SDNQ**: State-of-the-Art quantization engine
Use pre-quantized or run with quantization on-the-fly for up to 4x VRAM reduction with no or minimal quality and performance impact
- **Balanced Offload**: Dynamically balance CPU and GPU memory to run larger models on limited hardware
- **Captioning** with 150+ **OpenCLiP** models, **Tagger** with **WaifuDiffusion** and **DeepDanbooru** models, and 25+ built-in **VLMs**
- **Image Processing** with full image correction color-grading suite of tools
<br>
## Supported Workflows
- Generate with *Text-to-Image*, *Image-to-Image*, *Text-to-Video*, *Image-to-Video*, etc.
- Edit with *Detailer*, **HiRes/Refine**, *Image-Edit*, *Inpainting*, *Outpainting*, etc.
- Enhance guidance with *LoRA*, *ControlNet*, *IPAdapters*, *Prompt Enhance*, etc.
- Process with *Caption*, *Tag*, *Upscale*, *Interpolate*, *Colorize*, *Filter*, etc.
- and many more with support for custom scripts and extensions
## Supported AI Models
SD.Next supports broad range of models: [supported models](https://vladmandic.github.io/sdnext-docs/Model-Support/) and [model specs](https://vladmandic.github.io/sdnext-docs/Models/)
SD.Next supports broad range of models and its frequently updated with latest models
For full list, see [supported models](https://vladmandic.github.io/sdnext-docs/Model-Support/) and [model specs](https://vladmandic.github.io/sdnext-docs/Models/)
## Supported Platforms and Hardware
SD.Next is designed to run on a wide range of hardware and platforms, with optimizations for various GPU architectures with acceleration and support for CPU-only execution. Supported platforms include:
- *nVidia* GPUs using **CUDA** libraries on both *Windows and Linux*
- *AMD* GPUs using **ROCm** libraries on both *Linux and Windows*
- *AMD* GPUs on Windows using **ZLUDA** libraries
@@ -105,7 +129,6 @@ webui.ps1 # PowerShell
> [!WARNING]
> If you run into issues, check out [troubleshooting](https://vladmandic.github.io/sdnext-docs/Troubleshooting/) and [debugging](https://vladmandic.github.io/sdnext-docs/Debug/) guides
## Community and Support
If you're unsure how to use a feature, best place to start is [Docs](https://vladmandic.github.io/sdnext-docs/) and if its not there,
@@ -113,24 +136,10 @@ check [ChangeLog](https://vladmandic.github.io/sdnext-docs/CHANGELOG/) for when
And for any question, reach out on [Discord](https://discord.gg/VjvR2tabEX) or open an [issue](https://github.com/vladmandic/sdnext/issues) or [discussion](https://github.com/vladmandic/sdnext/discussions)
### Contributing
### Credits
Please see [Contributing](CONTRIBUTING) for details on how to contribute to this project
Main credit goes to [Automatic1111 WebUI](https://github.com/AUTOMATIC1111/stable-diffusion-webui) for the original codebase
## License & Credits
### Development and Contributing
- SD.Next is licensed under the [Apache License 2.0](LICENSE.txt)
- Main credit goes to [Automatic1111 WebUI](https://github.com/AUTOMATIC1111/stable-diffusion-webui) for the original codebase
## Evolution
<a href="https://star-history.com/#vladmandic/sdnext&Date">
<picture width=640>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=vladmandic/sdnext&type=Date&theme=dark" />
<img src="https://api.star-history.com/svg?repos=vladmandic/sdnext&type=Date" alt="starts" width="320">
</picture>
</a>
- [OSS Stats](https://ossinsight.io/analyze/vladmandic/sdnext#overview)
<br>
Please see [Dev Home](https://vladmandic.github.io/sdnext-docs/Dev-Home/) for details on how to contribute to this project
+23 -23
View File
@@ -1,16 +1,18 @@
# TODO
## Issues
- Inpaint: https://discord.com/channels/1101998836328697867/1130536562422186044/1506850651035144322
## Features
### Assigned
- Chat-based interface, @vladmandic
- Control tab verify overrides handling, @vladmandic
- Reimplement `llama` remover for Kanvas, @vladmandic
- Implement [pruna](https://github.com/PrunaAI/pruna), @vladmandic
- Change params to default, @vladmandic
- [nVidia LocateAnything](https://huggingface.co/nvidia/LocateAnything-3B) detection for Detailer, @vladmandic
- [Object clear](https://huggingface.co/jixin0101/ObjectClear) remover for Kanvas, @vladmandic
- Detailer postprocessing, @CalamitousFelicitousness
- Cloud providers, @CalamitousFelicitousness
- Video processing add full API support, @CalamitousFelicitousness
@@ -27,10 +29,10 @@
- JSON image metadata
- Integrate natural language image search: [ImageDB](https://github.com/vladmandic/imagedb)
- Unify *huggingface* and *diffusers* model folders
- Refactor [GGUF](https://huggingface.co/docs/diffusers/main/en/quantization/gguf)
### OnHold
- Implement [pruna](https://github.com/PrunaAI/pruna), @vladmandic, pending support for transformers 5.5
- LoRA add OMI format support for SD35/FLUX.1, on-hold
- Remote Text-Encoder support, sidelined for the moment
- Multi-user support
@@ -54,13 +56,13 @@ TODO: Investigate which models are diffusers-compatible and prioritize!
### Image
- [JoyAI-Image-Edit](https://github.com/huggingface/diffusers/pull/13444) (pr in-progress)
- [nVidia Cosmos-Predict-2.5](https://huggingface.co/nvidia/Cosmos-Predict2.5-2B) (in diffusers)
- [nVidia Cosmos-Transfer-2.5](https://huggingface.co/nvidia/Cosmos-Transfer2.5-2B) (in diffusers)
- [Tencent HY-WU](https://huggingface.co/tencent/HY-WU) (transformers-compatible)
### Video
- [ByteDance Lance](https://github.com/bytedance/Lance)
- [HY-OmniWeaving](https://huggingface.co/tencent/HY-OmniWeaving)
- [OpenMOSS MOVA](https://huggingface.co/OpenMOSS-Team/MOVA-720p)
- [Wan2.2-Animate](https://huggingface.co/Wan-AI/Wan2.2-Animate-14B)
@@ -87,6 +89,8 @@ TODO: Investigate which models are diffusers-compatible and prioritize!
### Other/Unsorted
- [TryOnDiffusion](https://github.com/fashn-AI/tryondiffusion)
- [GPEN Face Restoration](https://github.com/yangxy/GPEN)
- [ByteDance DreamO](https://github.com/bytedance/DreamO)
- Unified image customization framework combining face identity preservation, virtual try-on, style transfer, etc.
- Created: 2025-05 | Updated: 2025-08 | Stars: 1,700
@@ -152,23 +156,19 @@ TODO: Investigate which models are diffusers-compatible and prioritize!
## Code TODO
> npm run todo
> pnpm run todo
```code
installer.py:TODO rocm: switch to pytorch source when it becomes available
modules/control/run.py:TODO modernui: monkey-patch for missing tabs.select event
modules/history.py:TODO: apply metadata, preview, load/save
modules/image/resize.py:TODO resize image: enable full VAE mode for resize-latent
modules/lora/lora_load.py:TODO lora: add t5 key support for sd35/f1
modules/masking.py:TODO: additional masking algorithms
modules/modular_guiders.py:TODO: guiders
modules/processing_class.py:TODO processing: remove duplicate mask params
modules/sd_hijack_hypertile.py:TODO hypertile: vae breaks when using non-standard sizes
modules/sd_models.py:TODO model load: implement model in-memory caching
modules/sd_samplers_diffusers.py:TODO enso-required
modules/sd_unet.py:TODO model load: force-reloading entire model as loading transformers only leads to massive memory usage
modules/transformer_cache.py:TODO fc: autodetect distilled based on model
modules/transformer_cache.py:TODO fc: autodetect tensor format based on model
modules/ui_models_load.py:TODO loader: load receipe
modules/ui_models_load.py:TODO loader: save receipe
installer.py:652:15: W0511: TODO rocm: switch to pytorch source when it becomes available (fixme)
modules/sd_models_compile.py:90:5: W0511: TODO pruna: enable when it supports transformers==5.5 (fixme)
modules/transformer_cache.py:29:61: W0511: TODO fc: autodetect tensor format based on model (fixme)
modules/transformer_cache.py:30:50: W0511: TODO fc: autodetect distilled based on model (fixme)
modules/processing_class.py:406:32: W0511: TODO processing: remove duplicate mask params (fixme)
modules/sd_samplers_diffusers.py:370:31: W0511: TODO enso-required (fixme)
modules/sd_models.py:1424:5: W0511: TODO model load: implement model in-memory caching (fixme)
modules/ui_models_load.py:257:5: W0511: TODO loader: load receipe (fixme)
modules/ui_models_load.py:264:5: W0511: TODO loader: save receipe (fixme)
modules/sd_hijack_hypertile.py:123:17: W0511: TODO hypertile: vae breaks when using non-standard sizes (fixme)
modules/sd_unet.py:77:39: W0511: TODO model load: force-reloading entire model as loading transformers only leads to massive memory usage (fixme)
modules/modular_guiders.py:66:51: W0511: TODO: guiders (fixme)
```
+4 -1
View File
@@ -20,7 +20,10 @@ exclude = ['a', 'in', 'on', 'out', 'at', 'the', 'and', 'with', 'next', 'to', 'it
def decode(encoding):
if encoding.startswith("data:image/"):
encoding = encoding.split(";")[1].split(",")[1]
parts = encoding.split(";", 1)
if len(parts) == 2:
parts2 = parts[1].split(",", 1)
encoding = parts2[1] if len(parts2) == 2 else parts2[0]
return Image.open(io.BytesIO(base64.b64decode(encoding)))
+1 -1
View File
@@ -57,7 +57,7 @@ while True:
sampling_step = state.get('sampling_step', 0)
sampling_steps = state.get('sampling_steps', 0)
if job_timestamp is None:
log.warning(f'sdnext montoring cannot get last job info: {status}')
log.warning(f'sdnext monitoring cannot get last job info: {status}')
else:
job_timestamp = datetime.datetime.strptime(job_timestamp, "%Y%m%d%H%M%S") if job_timestamp != '0' else datetime.datetime.now()
elapsed = datetime.datetime.now() - job_timestamp
+7 -3
View File
@@ -198,7 +198,7 @@ def discover_components(model_index: dict[str, Any] | None, files_map: dict[str,
if isinstance(model_index, dict):
keys = list(model_index.keys())
main_keys = sorted([k for k in keys if re.fullmatch(r"(transformer|unet)(_\d+)?", k or "")])
main_keys = sorted([k for k in keys if re.search(r"(transformer|unet)", k or "", flags=re.IGNORECASE)])
components["mains"] = main_keys
text_keys = sorted([k for k in keys if re.fullmatch(r"text_encoder(_\d+)?", k or "")])
@@ -210,7 +210,7 @@ def discover_components(model_index: dict[str, Any] | None, files_map: dict[str,
top_dirs = {f.split("/", 1)[0] for f in files_map if "/" in f}
if not components["mains"]:
components["mains"] = sorted([d for d in top_dirs if re.fullmatch(r"(transformer|unet)(_\d+)?", d or "")])
components["mains"] = sorted([d for d in top_dirs if re.search(r"(transformer|unet)", d or "", flags=re.IGNORECASE)])
if not components["text_encoders"]:
components["text_encoders"] = sorted([d for d in top_dirs if re.fullmatch(r"text_encoder(_\d+)?", d or "")])
@@ -648,9 +648,13 @@ def main() -> int:
return 1
files_map = get_repo_files_map(model_info)
print('files:', json.dumps(files_map, indent=2, sort_keys=False))
model_card_text = load_model_card_text(repo_id, token)
model_index = get_model_index(repo_id, token)
print('index:', json.dumps(model_index, indent=2, sort_keys=False))
components = discover_components(model_index, files_map)
print('components:', json.dumps(components, indent=2, sort_keys=False))
main_components = components["mains"]
text_components = components["text_encoders"]
@@ -739,7 +743,7 @@ def main() -> int:
"ok": True,
"data": data,
}
print(json.dumps(output, indent=2, sort_keys=False))
print('info', json.dumps(output, indent=2, sort_keys=False))
return 0
+2 -2
View File
@@ -21,8 +21,8 @@ grid = importlib.import_module('image-grid').grid
def color_to_df(param):
colors_pre_list = str(param).replace('([(','').split(', (')[0:-1]
df_rgb = [i.split('), ')[0] + ')' for i in colors_pre_list]
df_percent = [i.split('), ')[1].replace(')','') for i in colors_pre_list]
df_rgb = [i.split('), ')[0] + ')' for i in colors_pre_list if len(i.split('), ')) >= 2]
df_percent = [i.split('), ')[1].replace(')','') for i in colors_pre_list if len(i.split('), ')) >= 2]
#convert RGB to HEX code
df_color_up = [rgb2hex(int(i.split(", ")[0].replace("(","")),
int(i.split(", ")[1]),
+1 -1
View File
@@ -7,7 +7,7 @@ from diffusers import StableDiffusionPipeline, StableDiffusionXLPipeline, AutoPi
parser = argparse.ArgumentParser("lcm_convert")
parser.add_argument("--name", help="Name of the new LCM model", type=str)
parser.add_argument("--model", help="A model to convert", type=str)
parser.add_argument("--lora-scale", default=1.0, help="Strenght of the LCM", type=float)
parser.add_argument("--lora-scale", default=1.0, help="Strength of the LCM", type=float)
parser.add_argument("--huggingface", action="store_true", help="Use Hugging Face models instead of safetensors models")
parser.add_argument("--upload", action="store_true", help="Upload the new LCM model to Hugging Face")
parser.add_argument("--no-half", action="store_true", help="Convert the new LCM model to FP32")
+5 -3
View File
@@ -21,7 +21,7 @@ all_images_by_type = {}
class Result():
def __init__(self, typ: str, fn: str, tag: str | None = None, requested: list = []):
def __init__(self, typ: str, fn: str, tag: str | None = None, requested: list | None = None):
self.type = typ
self.input = fn
self.output = ''
@@ -32,7 +32,7 @@ class Result():
self.tag = tag
self.tags = []
self.ops = []
self.steps = requested
self.steps = requested if requested is not None else []
def detect_blur(image: Image.Image):
@@ -163,7 +163,9 @@ def caption_image(res: Result, tag: str | None = None):
for t in res.tag.split(',')[::-1]:
tags.insert(0, t.strip())
pos = 0 if len(tags) == 0 else 1
tags.insert(pos, caption.split(' ')[1])
words = caption.split(' ')
if len(words) > 1:
tags.insert(pos, words[1])
tags = [t for t in tags if len(t) > 2]
if len(tags) > options.process.tag_limit:
tags = tags[:options.process.tag_limit]
+4 -1
View File
@@ -15,7 +15,10 @@ def probe(src: str):
cmd = f"ffprobe -hide_banner -loglevel 0 -print_format json -show_format -show_streams \"{src}\""
result = subprocess.run(cmd, shell = True, capture_output = True, text = True, check = True)
data = json.loads(result.stdout)
stream = [x for x in data['streams'] if x["codec_type"] == "video"][0]
video_streams = [x for x in data['streams'] if x["codec_type"] == "video"]
if not video_streams:
return None
stream = video_streams[0]
fmt = data['format'] if 'format' in data else {}
res = {**stream, **fmt}
video = Map({
+1 -1
View File
@@ -1,3 +1,3 @@
fastapi==0.124.4
numpy==2.1.2
Pillow==10.4.0
Pillow==12.2.0
+3 -1
View File
@@ -26,5 +26,7 @@
"vladmandic--Qwen-Lightning-Edit": "models/Reference/Qwen-Lightning.jpg",
"Wan-AI--Wan2.2-T2V-A14B-Diffusers": "models/Reference/Wan-AI--Wan2.2-T2V-A14B-Diffusers.jpg",
"Wan-AI--Wan2.1-T2V-14B-Diffusers": "models/Reference/Wan-AI--Wan2.1-T2V-14B-Diffusers.jpg",
"linoyts--Wan2.2-VACE-Fun-14B-diffusers": "models/Reference/linoyts--Wan2.2-VACE-Fun-14B-diffusers.jpg"
"linoyts--Wan2.2-VACE-Fun-14B-diffusers": "models/Reference/linoyts--Wan2.2-VACE-Fun-14B-diffusers.jpg",
"vladmandic--Anima-1.0-Base-sdnq-svd-dynamic-uint4": "models/Reference/vladmandic--Anima-1.0-Base.jpg",
"vladmandic--Anima-1.0-Turbo-sdnq-svd-dynamic-uint4": "models/Reference/vladmandic--Anima-1.0-Turbo.jpg"
}
+49 -18
View File
@@ -1,5 +1,5 @@
{
"Tempest-by-Vlad XL": {
"Tempest-by-Vlad XL": {
"path": "tempestByVlad_baseV01.safetensors@https://civitai.com/api/download/models/1301775",
"preview": "tempestByVlad_baseV01.jpg",
"desc": "Flexible SDXL model with custom encoder and finetuned for larger landscape resolutions with high details and high contrast.",
@@ -90,6 +90,36 @@
"date": "2025 May",
"extras": ""
},
"Z-Image-Turbo MoodyRealMix": {
"path": "resonantsky/MoodyRealMix-SDNQ-int8-svd-r32",
"preview": "resonantsky--MoodyRealMix-SDNQ-int8-svd-r32.jpg",
"desc": "BF16 native Z-Image-Turbo Diffusers Pipeline custom int8 quantization of Moody Real Mix https://civitai.com/models/621441/moody-real-mix by https://civitai.com/user/catlover1937",
"skip": true,
"extras": "sampler: Default, cfg_scale: 1.0, steps: 8",
"size": 11.08,
"tags": "community, Z-image",
"date": "2026 March"
},
"Diving Z-Image-Turbo": {
"path": "resonantsky/DivingZImageTurbo-SDNQ-int8-svd-r32",
"preview": "resonantsky--DivingZImageTurbo-SDNQ-int8-svd-r32.jpg",
"desc": "BF16 native Z-Image-Turbo Diffusers Pipeline custom int8 quantization of Diving-Z-Image Turbo https://civitai.red/models/2276359/diving-z-image-turbo by https://civitai.red/user/DivingSuit",
"skip": true,
"extras": "sampler: Default, cfg_scale: 1.0, steps: 8",
"size": 11.08,
"tags": "community, Z-image",
"date": "2026 March"
},
"Unstable Revolution Z-Image-Turbo": {
"path": "resonantsky/unstableRevolution-ZiT-SDNQ-int8-svd-r32",
"preview": "resonantsky--unstableRevolution-ZiT-SDNQ-int8-svd-r32.jpg",
"desc": "BF16 native Z-Image-Turbo Diffusers Pipeline custom int8 quantization of Unstable Revolution Z-Image-Turbo https://civitai.com/models/2193942/unstable-revolution-zit by https://civitai.com/user/Peli86",
"skip": true,
"extras": "sampler: Default, cfg_scale: 1.0, steps: 8",
"size": 11.08,
"tags": "community, Z-image",
"date": "2026 March"
},
"Tiwaz CenKreChro": {
"path": "Tiwaz/CenKreChro",
"preview": "Tiwaz--CenKreChro.jpg",
@@ -97,7 +127,8 @@
"desc": "Based Centerfold Flux 5, trying to merge in Chroma and Krea.",
"extras": "",
"tags": "community",
"date": "2025 September"
"date": "2025 September",
"size": 33.74
},
"purplesmartai Pony 7": {
"path": "purplesmartai/pony-v7-base",
@@ -106,7 +137,8 @@
"desc": "Pony V7 is a versatile character generation model based on AuraFlow architecture. It supports a wide range of styles and species types (humanoid, anthro, feral, and more) and handles character interactions through natural language prompts.",
"extras": "",
"tags": "community",
"date": "2025 October"
"date": "2025 October",
"size": 35.78
},
"ShuttleAI Shuttle 3.0 Diffusion": {
"path": "shuttleai/shuttle-3-diffusion",
@@ -114,7 +146,8 @@
"preview": "shuttleai--shuttle-3-diffusion.jpg",
"tags": "community",
"date": "2024 November",
"skip": true
"skip": true,
"size": 33.72
},
"ShuttleAI Shuttle 3.1 Aesthetic": {
"path": "shuttleai/shuttle-3.1-aesthetic",
@@ -122,7 +155,8 @@
"preview": "shuttleai--shuttle-3.1-aesthetic.jpg",
"tags": "community",
"date": "2024 November",
"skip": true
"skip": true,
"size": 33.72
},
"ShuttleAI Shuttle Jaguar": {
"path": "shuttleai/shuttle-jaguar",
@@ -130,15 +164,8 @@
"preview": "shuttleai--shuttle-jaguar.jpg",
"tags": "community",
"date": "2025 January",
"skip": true
},
"Anima Preview 3": {
"path": "CalamitousFelicitousness/Anima-Preview-3-sdnext-diffusers",
"preview": "CalamitousFelicitousness--Anima-Preview-3-sdnext-diffusers.jpg",
"desc": "Anima Preview V3 with extended 1024-resolution training and expanded dataset coverage for less common artists. A 2B parameter anime-focused text-to-image model based on modified Cosmos-Predict-2B with Qwen3-0.6B text encoder, created by CircleStone Labs and Comfy Org.",
"tags": "community",
"date": "2026 April",
"skip": true
"skip": true,
"size": 33.72
},
"FireRed Image Edit 1.0": {
"path": "FireRedTeam/FireRed-Image-Edit-1.0",
@@ -146,7 +173,8 @@
"desc": "FireRed-Image-Edit is a general-purpose image editing model that delivers high-fidelity and consistent editing across a wide range of scenarios. FireRed is a fine-tune of Qwen-Image-Edit.",
"tags": "community",
"date": "2026 February",
"skip": true
"skip": true,
"size": 57.7
},
"FireRed Image Edit 1.1": {
"path": "FireRedTeam/FireRed-Image-Edit-1.1",
@@ -154,7 +182,8 @@
"desc": "FireRed-Image-Edit is a general-purpose image editing model that delivers high-fidelity and consistent editing across a wide range of scenarios. FireRed is a fine-tune of Qwen-Image-Edit.",
"tags": "community",
"date": "2026 February",
"skip": true
"skip": true,
"size": 57.7
},
"Skywork UniPic3": {
"path": "Skywork/Unipic3",
@@ -162,7 +191,8 @@
"desc": "UniPic3 is an image editing and multi-image composition model based. It is a fine-tune of Qwen-Image-Edit.",
"tags": "community",
"date": "2026 February",
"skip": true
"skip": true,
"size": 57.7
},
"Skywork/Unipic3-DMD": {
"path": "Skywork/Unipic3-DMD",
@@ -170,6 +200,7 @@
"desc": "UniPic3-DMD-Model is a few-step image editing and multi-image composition model trained using Distribution Matching Distillation (DMD) and is a fine-tune of Qwen-Image-Edit.",
"tags": "community",
"date": "2026 February",
"skip": true
"skip": true,
"size": 57.7
}
}
+50 -25
View File
@@ -1,12 +1,13 @@
{
"StabilityAI StableDiffusion XL Turbo": {
"StabilityAI StableDiffusion XL Turbo": {
"path": "stabilityai/sdxl-turbo",
"preview": "stabilityai--sdxl-turbo.jpg",
"desc": "SDXL-Turbo is a fast generative text-to-image model that can synthesize photorealistic images from a text prompt in a 1-4 steps.",
"skip": true,
"variant": "fp16",
"tags": "distilled",
"extras": "steps: 4, cfg_scale: 0.0"
"extras": "steps: 4, cfg_scale: 0.0",
"size": 20.81
},
"StabilityAI Stable Cascade Lite": {
"path": "huggingface/stabilityai/stable-cascade-lite",
@@ -14,7 +15,7 @@
"variant": "bf16",
"desc": "Stable Cascade is a diffusion model built upon the Würstchen architecture and its main difference to other models like Stable Diffusion is that it is working at a much smaller latent space. Why is this important? The smaller the latent space, the faster you can run inference and the cheaper the training becomes. How small is the latent space? Stable Diffusion uses a compression factor of 8, resulting in a 1024x1024 image being encoded to 128x128. Stable Cascade achieves a compression factor of 42, meaning that it is possible to encode a 1024x1024 image to 24x24, while maintaining crisp reconstructions. The text-conditional model is then trained in the highly compressed latent space. Previous versions of this architecture, achieved a 16x cost reduction over Stable Diffusion 1.5",
"preview": "stabilityai--stable-cascade-lite.jpg",
"extras": "sampler: Default, cfg_scale: 4.0, image_cfg_scale: 1.0",
"extras": "sampler: Default, cfg_scale: 4.0, cfg_image: 1.0",
"size": 4.97,
"tags": "distilled",
"date": "2024 February"
@@ -26,7 +27,17 @@
"desc": "Stable Diffusion 3.5 Large Turbo is a Multimodal Diffusion Transformer (MMDiT) text-to-image model with Adversarial Diffusion Distillation (ADD) that features improved performance in image quality, typography, complex prompt understanding, and resource-efficiency, with a focus on fewer inference steps.",
"preview": "stabilityai--stable-diffusion-3_5-large-turbo.jpg",
"tags": "distilled",
"extras": "sampler: Default, cfg_scale: 7.0"
"extras": "sampler: Default, cfg_scale: 7.0",
"size": 38.78
},
"Microsoft Lens Turbo": {
"path": "microsoft/Lens-Turbo",
"preview": "microsoft--Lens-Turbo.jpg",
"desc": "Microsoft Lens-Turbo is the distilled Lens variant optimized for faster text-to-image generation with fewer steps.",
"skip": true,
"tags": "distilled",
"size": 30.53,
"date": "2026 May"
},
"Tencent FLUX.1 Dev SRPO": {
"path": "vladmandic/flux.1-dev-SRPO",
@@ -34,7 +45,8 @@
"desc": "FLUX.1 Dev SRPO is Tencent trained with specific technique: Directly Aligning the Full Diffusion Trajectory with Fine-Grained Human Preference",
"tags": "distilled",
"skip": true,
"extras": "sampler: Default, cfg_scale: 4.5"
"extras": "sampler: Default, cfg_scale: 4.5",
"size": 33.74
},
"HiDream-O1 Image Dev": {
"path": "HiDream-ai/HiDream-O1-Image-Dev",
@@ -52,7 +64,7 @@
"desc": "Qwen-Lightning is step-distilled from Qwen-Image to allow for generation in 8 steps.",
"skip": true,
"extras": "steps: 8",
"size": 56.1,
"size": 57.7,
"tags": "distilled",
"date": "2025 August"
},
@@ -72,7 +84,7 @@
"desc": "ERNIE-Image-Turbo is a distilled ERNIE-Image variant optimized for fast generation with fewer denoising steps.",
"skip": true,
"extras": "sampler: Default, cfg_scale: 1.0, steps: 8",
"size": 23.37,
"size": 23.93,
"tags": "distilled",
"date": "2026 April"
},
@@ -82,7 +94,7 @@
"desc": "Qwen-Lightning-Edit is step-distilled from Qwen-Image-Edit to allow for generation in 8 steps.",
"skip": true,
"extras": "steps: 8",
"size": 56.1,
"size": 57.7,
"tags": "distilled",
"date": "2025 August"
},
@@ -93,7 +105,8 @@
"desc": "This open-source project is based on Qwen-Image and has attempted model pruning, removing 20 layers while retaining the weights of 40 layers, resulting in a model size of 12B parameters.",
"skip": true,
"tags": "distilled",
"date": "2025 October"
"date": "2025 October",
"size": 41.39
},
"Qwen-Image-Edit Pruning-13B": {
"path": "OPPOer/Qwen-Image-Edit-Pruning",
@@ -102,7 +115,8 @@
"desc": "This open-source project is based on Qwen-Image-Edit and has attempted model pruning, removing 20 layers while retaining the weights of 40 layers, resulting in a model size of 13.6B parameters.",
"skip": true,
"tags": "distilled",
"date": "2025 October"
"date": "2025 October",
"size": 44.11
},
"Qwen-Image-Edit-2509 Pruning-13B": {
"path": "OPPOer/Qwen-Image-Edit-2509-Pruning",
@@ -111,7 +125,8 @@
"desc": "This open-source project is based on Qwen-Image-Edit and has attempted model pruning, removing 20 layers while retaining the weights of 40 layers, resulting in a model size of 13.6B parameters.",
"skip": true,
"tags": "distilled",
"date": "2025 October"
"date": "2025 October",
"size": 45.47
},
"lodestones Chroma1 Flash": {
"path": "lodestones/Chroma1-Flash",
@@ -119,7 +134,7 @@
"desc": "Chroma is a 8.9B parameter model based on FLUX.1-schnell. Its fully Apache 2.0 licensed, ensuring that anyone can use, modify, and build on top of it—no corporate gatekeeping. A fine-tuned version of the Chroma1-Base made to find the best way to make these flow matching models faster.",
"skip": true,
"extras": "",
"size": 26.84,
"size": 27.49,
"tags": "distilled",
"date": "2025 July"
},
@@ -136,7 +151,8 @@
"desc": "SANA-Sprint is an ultra-efficient diffusion model for text-to-image (T2I) generation, reducing inference steps from 20 to 1-4 while achieving state-of-the-art performance.",
"preview": "Efficient-Large-Model--Sana15_Sprint_1600M_1024px_diffusers.jpg",
"tags": "distilled",
"skip": true
"skip": true,
"size": 9.7
},
"Segmind SSD-1B": {
"path": "huggingface/segmind/SSD-1B",
@@ -145,7 +161,7 @@
"variant": "fp16",
"skip": true,
"extras": "sampler: Default, cfg_scale: 9.0",
"size": 8.72,
"size": 13.4,
"tags": "distilled",
"date": "2023 October"
},
@@ -154,7 +170,7 @@
"preview": "segmind--tiny-sd.jpg",
"desc": "Segmind's Tiny-SD offers a compact, efficient, and distilled version of Realistic Vision 4.0 and is up to 80% faster than SD1.5",
"extras": "width: 512, height: 512, sampler: Default, cfg_scale: 9.0",
"size": 1.03,
"size": 1.06,
"tags": "distilled",
"date": "2023 July"
},
@@ -165,10 +181,9 @@
"extras": "",
"tags": "distilled",
"skip": true,
"size": 51.93,
"size": 53.18,
"date": "2025 August"
},
"Bria Fibo-Lite": {
"path": "briaai/Fibo-lite",
"preview": "briaai--Fibo-lite.jpg",
@@ -176,7 +191,7 @@
"tags": "distilled",
"skip": true,
"extras": "sampler: Default, cfg_scale: 3.5",
"size": 8.1,
"size": 24.13,
"date": "2025 December"
},
"Tencent HunyuanDiT 1.2 Distilled": {
@@ -184,14 +199,16 @@
"desc": "Hunyuan-DiT : A Powerful Multi-Resolution Diffusion Transformer with Fine-Grained Chinese Understanding.",
"preview": "Tencent-Hunyuan--HunyuanDiT-v1.2-Diffusers-Distilled.jpg",
"tags": "distilled",
"extras": "sampler: Default, cfg_scale: 2.0"
"extras": "sampler: Default, cfg_scale: 2.0",
"size": 14.42
},
"Tencent HunyuanDiT 1.1 Distilled": {
"path": "Tencent-Hunyuan/HunyuanDiT-v1.1-Diffusers-Distilled",
"desc": "Hunyuan-DiT : A Powerful Multi-Resolution Diffusion Transformer with Fine-Grained Chinese Understanding.",
"preview": "Tencent-Hunyuan--HunyuanDiT-v1.1-Diffusers-Distilled.jpg",
"tags": "distilled",
"extras": "sampler: Default, cfg_scale: 2.0"
"extras": "sampler: Default, cfg_scale: 2.0",
"size": 14.49
},
"Black Forest Labs FLUX.2 Klein 4B": {
"path": "black-forest-labs/FLUX.2-klein-4B",
@@ -200,7 +217,7 @@
"skip": true,
"tags": "distilled",
"extras": "sampler: Default, cfg_scale: 1.0, steps: 4",
"size": 8.5,
"size": 15.96,
"date": "2026 January"
},
"Black Forest Labs FLUX.2 Klein 9B": {
@@ -210,19 +227,27 @@
"skip": true,
"tags": "distilled",
"extras": "sampler: Default, cfg_scale: 1.0, steps: 4",
"size": 18.5,
"size": 34.71,
"date": "2026 January"
},
"Black Forest Labs FLUX.2 Klein 9B KV": {
"Black Forest Labs FLUX.2 Klein 9B KV": {
"path": "black-forest-labs/FLUX.2-klein-9b-kv",
"preview": "black-forest-labs--FLUX.2-klein-9b-kv.jpg",
"desc": "FLUX.2 klein 9B KV is an optimized variant of FLUX.2 klein 9B with KV-cache support for accelerated multi-reference editing. This variant caches key-value pairs from reference images during the first denoising step, eliminating redundant computation in subsequent steps for significantly faster multi-image editing workflows.",
"skip": true,
"tags": "distilled",
"extras": "sampler: Default, cfg_scale: 1.0, steps: 4",
"size": 18.5,
"size": 34.71,
"date": "2026 March"
},
"Anima 1.0 Turbo": {
"path": "vladmandic/Anima-1.0-Turbo",
"preview": "vladmandic--Anima-1.0-Turbo.jpg",
"desc": "Anima 1.0 Turbo with extended 1024-resolution training and expanded dataset coverage for less common artists. A 2B parameter anime-focused text-to-image model based on modified Cosmos-Predict-2B with Qwen3-0.6B text encoder, created by CircleStone Labs and Comfy Org.",
"date": "2026 May",
"size": 5.36,
"skip": true
},
"Meituan LongCat Image-Edit Turbo": {
"path": "meituan-longcat/LongCat-Image-Edit-Turbo",
"preview": "meituan-longcat--LongCat-Image-Edit.jpg",
@@ -230,7 +255,7 @@
"skip": true,
"tags": "distilled",
"extras": "",
"size": 27.30,
"size": 29.29,
"date": "2026 February"
}
}
+79 -36
View File
@@ -5,9 +5,12 @@
"preview": "black-forest-labs--FLUX.1-dev.jpg",
"desc": "Nunchaku SVDQuant quantization of FLUX.1-dev transformer with INT4 and SVD rank 32",
"skip": true,
"nunchaku": ["Model", "TE"],
"nunchaku": [
"Model",
"TE"
],
"tags": "nunchaku",
"size": 32.95,
"size": 33.74,
"date": "2025 June"
},
"FLUX.1-Schnell Nunchaku SVDQuant": {
@@ -16,10 +19,13 @@
"preview": "black-forest-labs--FLUX.1-schnell.jpg",
"desc": "Nunchaku SVDQuant quantization of FLUX.1-schnell transformer with INT4 and SVD rank 32",
"skip": true,
"nunchaku": ["Model", "TE"],
"nunchaku": [
"Model",
"TE"
],
"tags": "nunchaku",
"extras": "sampler: Default, cfg_scale: 1.0, steps: 4",
"size": 32.93,
"size": 33.72,
"date": "2025 June"
},
"FLUX.1-Kontext Nunchaku SVDQuant": {
@@ -28,9 +34,12 @@
"preview": "black-forest-labs--FLUX.1-Kontext-dev.jpg",
"desc": "Nunchaku SVDQuant quantization of FLUX.1-Kontext-dev transformer with INT4 and SVD rank 32",
"skip": true,
"nunchaku": ["Model", "TE"],
"nunchaku": [
"Model",
"TE"
],
"tags": "nunchaku",
"size": 32.95,
"size": 33.74,
"date": "2025 June"
},
"FLUX.1-Krea Nunchaku SVDQuant": {
@@ -39,9 +48,12 @@
"preview": "black-forest-labs--FLUX.1-Krea-dev.jpg",
"desc": "Nunchaku SVDQuant quantization of FLUX.1-Krea-dev transformer with INT4 and SVD rank 32",
"skip": true,
"nunchaku": ["Model", "TE"],
"nunchaku": [
"Model",
"TE"
],
"tags": "nunchaku",
"size": 32.95,
"size": 33.74,
"date": "2025 June"
},
"FLUX.1-Fill Nunchaku SVDQuant": {
@@ -51,9 +63,12 @@
"desc": "Nunchaku SVDQuant quantization of FLUX.1-Fill-dev transformer for inpainting",
"skip": true,
"hidden": true,
"nunchaku": ["Model", "TE"],
"nunchaku": [
"Model",
"TE"
],
"tags": "nunchaku",
"size": 33.12,
"size": 33.91,
"date": "2025 June"
},
"FLUX.1-Depth Nunchaku SVDQuant": {
@@ -63,9 +78,12 @@
"desc": "Nunchaku SVDQuant quantization of FLUX.1-Depth-dev transformer for depth-conditioned generation",
"skip": true,
"hidden": true,
"nunchaku": ["Model", "TE"],
"nunchaku": [
"Model",
"TE"
],
"tags": "nunchaku",
"size": 42.66,
"size": 43.68,
"date": "2025 June"
},
"Shuttle Jaguar Nunchaku SVDQuant": {
@@ -74,9 +92,12 @@
"preview": "shuttleai--shuttle-jaguar.jpg",
"desc": "Nunchaku SVDQuant quantization of Shuttle Jaguar transformer",
"skip": true,
"nunchaku": ["Model", "TE"],
"nunchaku": [
"Model",
"TE"
],
"tags": "nunchaku",
"size": 32.93,
"size": 33.72,
"date": "2025 June"
},
"Qwen-Image Nunchaku SVDQuant": {
@@ -85,9 +106,11 @@
"preview": "Qwen--Qwen-Image.jpg",
"desc": "Nunchaku SVDQuant quantization of Qwen-Image transformer with INT4 and SVD rank 128",
"skip": true,
"nunchaku": ["Model"],
"nunchaku": [
"Model"
],
"tags": "nunchaku",
"size": 56.35,
"size": 57.7,
"date": "2025 June"
},
"Qwen-Lightning (8-step) Nunchaku SVDQuant": {
@@ -96,10 +119,12 @@
"preview": "vladmandic--Qwen-Lightning.jpg",
"desc": "Nunchaku SVDQuant quantization of Qwen-Lightning (8-step distilled) transformer with INT4 and SVD rank 128",
"skip": true,
"nunchaku": ["Model"],
"nunchaku": [
"Model"
],
"tags": "nunchaku",
"extras": "steps: 8",
"size": 56.35,
"size": 57.7,
"date": "2025 June"
},
"Qwen-Lightning (4-step) Nunchaku SVDQuant": {
@@ -108,10 +133,12 @@
"preview": "vladmandic--Qwen-Lightning.jpg",
"desc": "Nunchaku SVDQuant quantization of Qwen-Lightning (4-step distilled) transformer with INT4 and SVD rank 128",
"skip": true,
"nunchaku": ["Model"],
"nunchaku": [
"Model"
],
"tags": "nunchaku",
"extras": "steps: 4",
"size": 56.35,
"size": 57.7,
"date": "2025 June"
},
"Qwen-Image-Edit Nunchaku SVDQuant": {
@@ -120,9 +147,11 @@
"preview": "Qwen--Qwen-Image-Edit.jpg",
"desc": "Nunchaku SVDQuant quantization of Qwen-Image-Edit transformer with INT4 and SVD rank 128",
"skip": true,
"nunchaku": ["Model"],
"nunchaku": [
"Model"
],
"tags": "nunchaku",
"size": 56.35,
"size": 57.7,
"date": "2025 June"
},
"Qwen-Lightning-Edit (8-step) Nunchaku SVDQuant": {
@@ -131,10 +160,12 @@
"preview": "vladmandic--Qwen-Lightning-Edit.jpg",
"desc": "Nunchaku SVDQuant quantization of Qwen-Lightning-Edit (8-step distilled editing) transformer with INT4 and SVD rank 128",
"skip": true,
"nunchaku": ["Model"],
"nunchaku": [
"Model"
],
"tags": "nunchaku",
"extras": "steps: 8",
"size": 56.35,
"size": 57.7,
"date": "2025 June"
},
"Qwen-Lightning-Edit (4-step) Nunchaku SVDQuant": {
@@ -143,10 +174,12 @@
"preview": "vladmandic--Qwen-Lightning-Edit.jpg",
"desc": "Nunchaku SVDQuant quantization of Qwen-Lightning-Edit (4-step distilled editing) transformer with INT4 and SVD rank 128",
"skip": true,
"nunchaku": ["Model"],
"nunchaku": [
"Model"
],
"tags": "nunchaku",
"extras": "steps: 4",
"size": 56.35,
"size": 57.7,
"date": "2025 June"
},
"Qwen-Image-Edit-2509 Nunchaku SVDQuant": {
@@ -155,9 +188,11 @@
"preview": "Qwen--Qwen-Image-Edit-2509.jpg",
"desc": "Nunchaku SVDQuant quantization of Qwen-Image-Edit-2509 transformer with INT4 and SVD rank 128",
"skip": true,
"nunchaku": ["Model"],
"nunchaku": [
"Model"
],
"tags": "nunchaku",
"size": 56.35,
"size": 57.7,
"date": "2025 September"
},
"Sana 1.6B 1k Nunchaku SVDQuant": {
@@ -166,9 +201,11 @@
"preview": "Efficient-Large-Model--Sana_1600M_1024px_diffusers.jpg",
"desc": "Nunchaku SVDQuant quantization of Sana 1.6B 1024px transformer with INT4 and SVD rank 32",
"skip": true,
"nunchaku": ["Model"],
"nunchaku": [
"Model"
],
"tags": "nunchaku",
"size": 23.3,
"size": 23.86,
"date": "2025 June"
},
"Z-Image-Turbo Nunchaku SVDQuant": {
@@ -177,10 +214,12 @@
"preview": "Tongyi-MAI--Z-Image-Turbo.jpg",
"desc": "Nunchaku SVDQuant quantization of Z-Image-Turbo transformer with INT4 and SVD rank 128",
"skip": true,
"nunchaku": ["Model"],
"nunchaku": [
"Model"
],
"tags": "nunchaku",
"extras": "sampler: Default, cfg_scale: 1.0, steps: 9",
"size": 32.06,
"size": 32.83,
"date": "2025 June"
},
"SDXL Base Nunchaku SVDQuant": {
@@ -189,9 +228,11 @@
"preview": "stabilityai--stable-diffusion-xl-base-1.0.jpg",
"desc": "Nunchaku SVDQuant quantization of SDXL Base 1.0 UNet with INT4 and SVD rank 32",
"skip": true,
"nunchaku": ["Model"],
"nunchaku": [
"Model"
],
"tags": "nunchaku",
"size": 33.55,
"size": 34.35,
"date": "2025 June"
},
"SDXL Turbo Nunchaku SVDQuant": {
@@ -200,10 +241,12 @@
"preview": "stabilityai--sdxl-turbo.jpg",
"desc": "Nunchaku SVDQuant quantization of SDXL Turbo UNet with INT4 and SVD rank 32",
"skip": true,
"nunchaku": ["Model"],
"nunchaku": [
"Model"
],
"tags": "nunchaku",
"extras": "sampler: Default, cfg_scale: 1.0, steps: 4",
"size": 20.33,
"size": 20.81,
"date": "2025 June"
}
}
+45 -38
View File
@@ -1,11 +1,11 @@
{
"FLUX.1-Dev sdnq-svd-uint4": {
"FLUX.1-Dev sdnq-svd-uint4": {
"path": "Disty0/FLUX.1-dev-SDNQ-uint4-svd-r32",
"preview": "Disty0--FLUX.1-dev-SDNQ-uint4-svd-r32.jpg",
"desc": "Quantization of black-forest-labs/FLUX.1-dev using SDNQ: sdnq-svd 4-bit uint with svd rank 32",
"skip": true,
"tags": "quantized",
"size": 12.60,
"size": 13.53,
"date": "2025 October",
"extras": ""
},
@@ -15,7 +15,7 @@
"desc": "Quantization of black-forest-labs/FLUX.1-schnell using SDNQ: sdnq-svd 4-bit uint with svd rank 32",
"skip": true,
"tags": "quantized",
"size": 12.60,
"size": 13.51,
"date": "2025 October",
"extras": ""
},
@@ -25,7 +25,7 @@
"desc": "Quantization of black-forest-labs/FLUX.1-Krea-dev using SDNQ: sdnq-svd 4-bit uint with svd rank 32",
"skip": true,
"tags": "quantized",
"size": 12.60,
"size": 13.53,
"date": "2025 October",
"extras": ""
},
@@ -35,7 +35,7 @@
"desc": "Quantization of black-forest-labs/FLUX.1-Kontext-dev using SDNQ: sdnq-svd 4-bit uint with svd rank 32",
"skip": true,
"tags": "quantized",
"size": 12.60,
"size": 13.53,
"date": "2025 October",
"extras": ""
},
@@ -46,7 +46,7 @@
"skip": true,
"tags": "quantized",
"extras": "",
"size": 31.58,
"size": 34.24,
"date": "2025 November"
},
"Black Forest Labs FLUX.2 Klein 4B sdnq-uint4-dynamic": {
@@ -56,7 +56,7 @@
"skip": true,
"extras": "sampler: Default, cfg_scale: 1.0, steps: 4",
"tags": "quantized",
"size": 5.1,
"size": 5.46,
"date": "2026 January"
},
"Black Forest Labs FLUX.2 Klein 9B sdnq-uint4-dynamic-svd": {
@@ -66,7 +66,7 @@
"skip": true,
"extras": "sampler: Default, cfg_scale: 1.0, steps: 4",
"tags": "quantized",
"size": 11.7,
"size": 12.59,
"date": "2026 January"
},
"Chroma1-HD sdnq-svd-uint4": {
@@ -75,7 +75,7 @@
"desc": "Quantization of lodestones/Chroma1-HD using SDNQ: sdnq-svd 4-bit uint with svd rank 32",
"skip": true,
"tags": "quantized",
"size": 11.89,
"size": 11.9,
"date": "2025 October",
"extras": ""
},
@@ -86,7 +86,7 @@
"skip": true,
"tags": "quantized",
"date": "2025 October",
"size": 23.54,
"size": 25.26,
"extras": ""
},
"Wan-AI Wan2.2 A14B I2I sdnq-svd-uint4": {
@@ -96,7 +96,7 @@
"skip": true,
"tags": "quantized",
"date": "2025 October",
"size": 23.55,
"size": 25.27,
"extras": ""
},
"Z-Image-Turbo sdnq-svd-uint4": {
@@ -106,7 +106,7 @@
"skip": true,
"tags": "quantized",
"extras": "sampler: Default, cfg_scale: 1.0, steps: 9",
"size": 6.5,
"size": 6.49,
"date": "2025 November"
},
"Qwen-Image sdnq-svd-uint4": {
@@ -116,7 +116,7 @@
"skip": true,
"tags": "quantized",
"date": "2025 October",
"size": 16.09,
"size": 17.27,
"extras": ""
},
"Qwen-Image-2512 sdnq-svd-uint4": {
@@ -126,7 +126,7 @@
"skip": true,
"tags": "quantized",
"extras": "",
"size": 16.10,
"size": 17.27,
"date": "2025 December"
},
"Qwen-Image-2512 sdnq-dynamic-uint4": {
@@ -136,7 +136,7 @@
"skip": true,
"tags": "quantized",
"extras": "",
"size": 17.2,
"size": 18.51,
"date": "2026 January"
},
"Qwen-Image-Edit sdnq-svd-uint4": {
@@ -146,7 +146,7 @@
"skip": true,
"tags": "quantized",
"date": "2025 October",
"size": 16.10,
"size": 17.27,
"extras": ""
},
"Qwen-Image-Edit-2509 sdnq-svd-uint4": {
@@ -156,7 +156,7 @@
"skip": true,
"tags": "quantized",
"date": "2025 October",
"size": 16.10,
"size": 17.27,
"extras": ""
},
"Qwen-Image-Edit-2511 sdnq-svd-uint4": {
@@ -166,7 +166,7 @@
"skip": true,
"tags": "quantized",
"date": "2025 December",
"size": 16.10,
"size": 17.27,
"extras": ""
},
"Qwen-Image-Layered sdnq-svd-uint4": {
@@ -176,7 +176,7 @@
"skip": true,
"tags": "quantized",
"date": "2025 December",
"size": 16.10,
"size": 17.27,
"extras": ""
},
"nVidia ChronoEdit sdnq-svd-uint4": {
@@ -186,7 +186,7 @@
"skip": true,
"tags": "quantized",
"date": "2025 October",
"size": 18.10,
"size": 18.14,
"extras": ""
},
"Tencent HunyuanImage 3.0 sdnq-svd-uint4": {
@@ -204,7 +204,7 @@
"preview": "vladmandic--tempestByVlad_baseV01-SDNQ-uint4-svd.jpg",
"desc": "Quantization of vladmandic/tempestByVlad_baseV01 using SDNQ: sdnq-svd 4-bit uint with svd rank 128",
"tags": "quantized",
"size": 3.37,
"size": 2.84,
"date": "2025 October",
"extras": ""
},
@@ -213,7 +213,7 @@
"preview": "Disty0--NoobAI-XL-v1.1-SDNQ-uint4-svd-r128.jpg",
"desc": "Quantization of Laxhar/noobai-XL-1.1 using SDNQ: sdnq-svd 4-bit uint with svd rank 128",
"tags": "quantized",
"size": 3.37,
"size": 3.62,
"date": "2025 October",
"extras": ""
},
@@ -222,7 +222,7 @@
"preview": "Disty0--NoobAI-XL-Vpred-v1.0-SDNQ-uint4-svd-r128.jpg",
"desc": "Quantization of Laxhar/noobai-XL-Vpred-1.0 using SDNQ: sdnq-svd 4-bit uint with svd rank 128",
"tags": "quantized",
"size": 3.37,
"size": 3.62,
"date": "2025 October",
"extras": ""
},
@@ -232,7 +232,7 @@
"desc": "Quantization of ZAI GLM-Image using SDNQ: sdnq-dynamic 4-bit uint",
"skip": true,
"extras": "sampler: Default, cfg_scale: 1.5, steps: 50",
"size": 11.6,
"size": 5.57,
"tags": "quantized",
"date": "2026 January"
},
@@ -255,22 +255,20 @@
"tags": "distilled",
"date": "2026 April"
},
"Anima Preview 3 sdnq-dynamic-int8": {
"path": "vladmandic/Anima-Preview-3-diffusers-SDNQ-8bit-dynamic",
"preview": "CalamitousFelicitousness--Anima-Preview-3-sdnext-diffusers.jpg",
"desc": "Anima Preview V3 with extended 1024-resolution training and expanded dataset coverage for less common artists. A 2B parameter anime-focused text-to-image model based on modified Cosmos-Predict-2B with Qwen3-0.6B text encoder, created by CircleStone Labs and Comfy Org.",
"tags": "community",
"date": "2026 April",
"size": 3.19,
"Anima 1.0 Base sdnq-svd-dynamic-uint4": {
"path": "vladmandic/Anima-1.0-Base-sdnq-svd-dynamic-uint4",
"preview": "vladmandic--Anima-1.0-Base.jpg",
"desc": "Anima 1.0 Base with extended 1024-resolution training and expanded dataset coverage for less common artists. A 2B parameter anime-focused text-to-image model based on modified Cosmos-Predict-2B with Qwen3-0.6B text encoder, created by CircleStone Labs and Comfy Org.",
"date": "2026 May",
"size": 2.18,
"skip": true
},
"Anima Preview 3 Turbo sdnq-dynamic-int8": {
"path": "vladmandic/Anima-Preview-3-turbo-diffusers-SDNQ-8bit-dynamic",
"preview": "CalamitousFelicitousness--Anima-Preview-3-sdnext-diffusers.jpg",
"desc": "Anima Preview V3 with extended 1024-resolution training and expanded dataset coverage for less common artists. A 2B parameter anime-focused text-to-image model based on modified Cosmos-Predict-2B with Qwen3-0.6B text encoder, created by CircleStone Labs and Comfy Org.",
"tags": "community",
"date": "2026 April",
"size": 3.19,
"Anima 1.0 Turbo sdnq-svd-dynamic-uint4": {
"path": "vladmandic/Anima-1.0-Turbo-sdnq-svd-dynamic-uint4",
"preview": "vladmandic--Anima-1.0-Turbo.jpg",
"desc": "Anima 1.0 Turbo with extended 1024-resolution training and expanded dataset coverage for less common artists. A 2B parameter anime-focused text-to-image model based on modified Cosmos-Predict-2B with Qwen3-0.6B text encoder, created by CircleStone Labs and Comfy Org.",
"date": "2026 May",
"size": 2.19,
"skip": true
},
"HiDream-O1 Image sdnq-dynamic-int8": {
@@ -290,5 +288,14 @@
"extras": "sampler: Default",
"size": 10.34,
"date": "2026 May"
},
"Ideogram 4 sdnq-hadamard-uint4": {
"path": "Disty0/Ideogram-4-SDNQ-4bit-dynamic-hadamard",
"desc": "Ideogram 4 is Ideogram's first open-weight text-to-image model: a two 9.3B flow-matching DiTs that uses a Qwen3-VL vision-language model as its text encoder, with strong in-image text rendering. Requires structured JSON-caption prompts; prompt-enhance (on by default) rewrites a plain prompt into one.",
"preview": "Disty0--Ideogram-4-SDNQ-4bit-dynamic-hadamard.jpg",
"skip": true,
"extras": "sampler: Default, cfg_scale: 7.0, steps: 20, width: 1024, height: 1024",
"size": 16.29,
"date": "2026 June"
}
}
+129 -153
View File
@@ -35,17 +35,33 @@
"skip": true,
"variant": "fp16",
"extras": "",
"size": 6.94,
"size": 34.35,
"date": "2023 July"
},
"Microsoft Lens": {
"path": "microsoft/Lens",
"preview": "microsoft--Lens.jpg",
"desc": "Microsoft Lens is a text-to-image DiT model using GPT-OSS chat-style prompt encoding and Flux2 VAE decoding.",
"skip": true,
"size": 30.53,
"date": "2026 May"
},
"Microsoft Lens Base": {
"path": "microsoft/Lens-Base",
"preview": "microsoft--Lens-Base.jpg",
"desc": "Microsoft Lens-Base is the base variant of Lens for text-to-image generation with GPT-OSS prompt features.",
"skip": true,
"size": 30.53,
"date": "2026 May"
},
"StabilityAI Stable Cascade": {
"path": "huggingface/stabilityai/stable-cascade",
"skip": true,
"variant": "bf16",
"desc": "Stable Cascade is a diffusion model built upon the Würstchen architecture and its main difference to other models like Stable Diffusion is that it is working at a much smaller latent space. Why is this important? The smaller the latent space, the faster you can run inference and the cheaper the training becomes. How small is the latent space? Stable Diffusion uses a compression factor of 8, resulting in a 1024x1024 image being encoded to 128x128. Stable Cascade achieves a compression factor of 42, meaning that it is possible to encode a 1024x1024 image to 24x24, while maintaining crisp reconstructions. The text-conditional model is then trained in the highly compressed latent space. Previous versions of this architecture, achieved a 16x cost reduction over Stable Diffusion 1.5",
"preview": "stabilityai--stable-cascade.jpg",
"extras": "sampler: Default, cfg_scale: 4.0, image_cfg_scale: 1.0",
"size": 11.82,
"extras": "sampler: Default, cfg_scale: 4.0, cfg_image: 1.0",
"size": 2.78,
"date": "2024 February"
},
"StabilityAI Stable Diffusion 3.0 Medium": {
@@ -55,7 +71,7 @@
"desc": "Stable Diffusion 3 Medium is a Multimodal Diffusion Transformer (MMDiT) text-to-image model that features greatly improved performance in image quality, typography, complex prompt understanding, and resource-efficiency",
"preview": "stabilityai--stable-diffusion-3.jpg",
"extras": "sampler: Default, cfg_scale: 7.0",
"size": 15.14,
"size": 31.0,
"date": "2024 June"
},
"StabilityAI Stable Diffusion 3.5 Medium": {
@@ -65,7 +81,7 @@
"desc": "Stable Diffusion 3.5 Medium is a Multimodal Diffusion Transformer with improvements (MMDiT-X) text-to-image model that features improved performance in image quality, typography, complex prompt understanding, and resource-efficiency.",
"preview": "stabilityai--stable-diffusion-3_5-medium.jpg",
"extras": "sampler: Default, cfg_scale: 7.0",
"size": 15.89,
"size": 27.43,
"date": "2024 October"
},
"StabilityAI Stable Diffusion 3.5 Large": {
@@ -75,17 +91,16 @@
"desc": "Stable Diffusion 3.5 Large is a Multimodal Diffusion Transformer (MMDiT) text-to-image model that features improved performance in image quality, typography, complex prompt understanding, and resource-efficiency.",
"preview": "stabilityai--stable-diffusion-3_5-large.jpg",
"extras": "sampler: Default, cfg_scale: 7.0",
"size": 26.98,
"size": 38.78,
"date": "2024 October"
},
"Black Forest Labs FLUX.1 Dev": {
"path": "black-forest-labs/FLUX.1-dev",
"preview": "black-forest-labs--FLUX.1-dev.jpg",
"desc": "FLUX.1 models are based on a hybrid architecture of multimodal and parallel diffusion transformer blocks, scaled to 12B parameters and builing on flow matching",
"skip": true,
"extras": "sampler: Default, cfg_scale: 3.5",
"size": 32.93,
"size": 33.74,
"date": "2024 August"
},
"Black Forest Labs FLUX.1 Schnell": {
@@ -94,7 +109,7 @@
"desc": "FLUX.1 models are based on a hybrid architecture of multimodal and parallel diffusion transformer blocks, scaled to 12B parameters and builing on flow matching. Trained using latent adversarial diffusion distillation, FLUX.1 [schnell] can generate high-quality images in only 1 to 4 steps",
"skip": true,
"extras": "sampler: Default, cfg_scale: 3.5",
"size": 32.93,
"size": 33.72,
"date": "2024 August"
},
"Black Forest Labs FLUX.1 Kontext Dev": {
@@ -103,7 +118,7 @@
"desc": "FLUX.1 Kontext [dev] is a 12 billion parameter rectified flow transformer capable of editing images based on text instructions.",
"skip": true,
"extras": "sampler: Default, cfg_scale: 3.5",
"size": 32.93,
"size": 33.74,
"date": "2025 June"
},
"Black Forest Labs FLUX.1 Krea Dev": {
@@ -112,7 +127,7 @@
"desc": "FLUX.1 Krea [dev] is a 12 billion parameter rectified flow transformer capable of generating images from text descriptions.",
"skip": true,
"extras": "sampler: Default, cfg_scale: 4.5",
"size": 32.93,
"size": 33.74,
"date": "2025 July"
},
"Black Forest Labs FLUX.2 Dev": {
@@ -121,7 +136,7 @@
"desc": "FLUX.2 generates high-quality images while maintaining character and style consistency across multiple reference images, following structured prompts, reading and writing complex text, adhering to brand guidelines, and reliably handling lighting, layouts, and logos.",
"skip": true,
"extras": "",
"size": 104.74,
"size": 112.81,
"date": "2025 November"
},
"Black Forest Labs FLUX.2 Klein Base 4B": {
@@ -130,7 +145,7 @@
"desc": "FLUX.2-klein-base-4B is the undistilled 4 billion parameter base model of FLUX.2-klein. Requires 50 inference steps for full quality but offers flexibility for fine-tuning. Supports text-to-image and multi-reference editing. Apache 2.0 licensed.",
"skip": true,
"extras": "sampler: Default, cfg_scale: 4.0, steps: 50",
"size": 8.5,
"size": 15.96,
"date": "2025 January"
},
"Black Forest Labs FLUX.2 Klein Base 9B": {
@@ -139,27 +154,25 @@
"desc": "FLUX.2-klein-base-9B is the undistilled 9 billion parameter base model of FLUX.2-klein. Requires 50 inference steps for full quality but offers flexibility for fine-tuning. Supports text-to-image and multi-reference editing. Non-commercial license.",
"skip": true,
"extras": "sampler: Default, cfg_scale: 4.0, steps: 50",
"size": 18.5,
"size": 34.71,
"date": "2025 January"
},
"Owen777 UltraFlux-v1": {
"path": "Owen777/UltraFlux-v1",
"preview": "Owen777--UltraFlux-v1.jpg",
"desc": "UltraFlux-v1 is a FLUX.1-dev based text-to-image model optimized for native 4K and multi-aspect-ratio generation with improved composition consistency.",
"skip": true,
"extras": "sampler: Default, cfg_scale: 4.0, steps: 50",
"size": 33.0,
"size": 33.91,
"date": "2025 November"
},
"Z-Image": {
"path": "Tongyi-MAI/Z-Image",
"preview": "Tongyi-MAI--Z-Image.jpg",
"desc": "Z-Image, an efficient image generation foundation model built on a Single-Stream Diffusion Transformer architecture. It preserves the complete training signal with full CFG support, enabling aesthetic versatility from hyper-realistic photography to anime, enhanced output diversity, and robust negative prompting for artifact suppression. Ideal base for LoRA training, ControlNet, and semantic conditioning.",
"skip": true,
"extras": "sampler: Default, cfg_scale: 4.0, steps: 50",
"size": 20.3,
"size": 20.52,
"date": "2026 January"
},
"Z-Image-Turbo": {
@@ -168,10 +181,18 @@
"desc": "Z-Image-Turbo, a distilled version of Z-Image that matches or exceeds leading competitors with only 8 NFEs (Number of Function Evaluations). It excels in photorealistic image generation, bilingual text rendering (English & Chinese), and robust instruction adherence.",
"skip": true,
"extras": "sampler: Default, cfg_scale: 1.0, steps: 9",
"size": 20.3,
"size": 32.83,
"date": "2025 November"
},
"Ideogram 4": {
"path": "CalamitousFelicitousness/Ideogram-4-bf16-Diffusers",
"preview": "CalamitousFelicitousness--Ideogram-4-bf16-Diffusers.jpg",
"desc": "Ideogram 4 is Ideogram's first open-weight text-to-image model: a two 9.3B flow-matching DiTs that uses a Qwen3-VL vision-language model as its text encoder, with strong in-image text rendering. Requires structured JSON-caption prompts; prompt-enhance (on by default) rewrites a plain prompt into one.",
"skip": true,
"extras": "sampler: Default, cfg_scale: 7.0, steps: 20, width: 1024, height: 1024",
"size": 53.58,
"date": "2026 June"
},
"Baidu ERNIE-Image": {
"path": "baidu/ERNIE-Image",
"preview": "baidu--ERNIE-Image.jpg",
@@ -181,7 +202,6 @@
"size": 23.93,
"date": "2026 April"
},
"NucleusAI Nucleus-Image": {
"path": "NucleusAI/Nucleus-Image",
"preview": "NucleusAI--Nucleus-Image.jpg",
@@ -189,17 +209,16 @@
"skip": true,
"variant": "bf16",
"extras": "sampler: Default, cfg_scale: 8.0, steps: 50",
"size": 48.11,
"size": 51.63,
"date": "2026 April"
},
"Qwen-Image": {
"path": "Qwen/Qwen-Image",
"preview": "Qwen--Qwen-Image.jpg",
"desc": "Qwen-Image, an image generation foundation model in the Qwen series that achieves significant advances in complex text rendering and precise image editing.",
"skip": true,
"extras": "",
"size": 56.1,
"size": 57.7,
"date": "2025 August"
},
"Qwen-Image-2512": {
@@ -208,7 +227,7 @@
"desc": "Qwen-Image-2512 is an Qwen Image successor, that significantly reduces the AI-generated look, got finer natural detailils and improved text rendering.",
"skip": true,
"extras": "",
"size": 53.7,
"size": 57.7,
"date": "2025 December"
},
"Qwen-Image-Edit": {
@@ -217,7 +236,7 @@
"desc": "Qwen-Image-Edit, the image editing version of Qwen-Image. Built upon our 20B Qwen-Image model, Qwen-Image-Edit successfully extends Qwen-Images unique text rendering capabilities to image editing tasks, enabling precise text editing.",
"skip": true,
"extras": "",
"size": 56.1,
"size": 57.7,
"date": "2025 August"
},
"Qwen-Image-Edit-2509": {
@@ -226,7 +245,7 @@
"desc": "Qwen-Image-Edit, the image editing version of Qwen-Image. Built upon our 20B Qwen-Image model, Qwen-Image-Edit successfully extends Qwen-Images unique text rendering capabilities to image editing tasks, enabling precise text editing.",
"skip": true,
"extras": "",
"size": 56.1,
"size": 57.7,
"date": "2025 September"
},
"Qwen-Image-Edit-2511": {
@@ -247,7 +266,6 @@
"size": 53.7,
"date": "2025 December"
},
"lodestones Chroma1 HD": {
"path": "lodestones/Chroma1-HD",
"preview": "lodestones--Chroma1-HD.jpg",
@@ -284,14 +302,21 @@
"size": 12.11,
"date": "2026 April"
},
"Anima 1.0 Base": {
"path": "vladmandic/Anima-1.0-Base",
"preview": "vladmandic--Anima-1.0-Base.jpg",
"desc": "Anima 1.0 Base with extended 1024-resolution training and expanded dataset coverage for less common artists. A 2B parameter anime-focused text-to-image model based on modified Cosmos-Predict-2B with Qwen3-0.6B text encoder, created by CircleStone Labs and Comfy Org.",
"date": "2026 May",
"size": 5.5,
"skip": true
},
"Meituan LongCat Image": {
"path": "meituan-longcat/LongCat-Image",
"preview": "meituan-longcat--LongCat-Image.jpg",
"desc": "Pioneering open-source and bilingual (Chinese-English) foundation model for image generation, designed to address core challenges in multilingual text rendering, photorealism, deployment efficiency, and developer accessibility prevalent in current leading models.",
"skip": true,
"extras": "",
"size": 27.30,
"size": 27.3,
"date": "2025 December"
},
"Meituan LongCat Image-Edit": {
@@ -300,10 +325,9 @@
"desc": "Pioneering open-source and bilingual (Chinese-English) foundation model for image generation, designed to address core challenges in multilingual text rendering, photorealism, deployment efficiency, and developer accessibility prevalent in current leading models.",
"skip": true,
"extras": "",
"size": 27.30,
"size": 27.3,
"date": "2025 December"
},
"Ostris Flex.2 Preview": {
"path": "ostris/Flex.2-preview",
"preview": "ostris--Flex.2-preview.jpg",
@@ -322,7 +346,6 @@
"size": 25.65,
"date": "2025 January"
},
"Wan-AI Wan2.1 1.3B": {
"path": "Wan-AI/Wan2.1-T2V-1.3B-Diffusers",
"preview": "Wan-AI--Wan2.1-T2V-1.3B-Diffusers.jpg",
@@ -369,7 +392,6 @@
"skip": true,
"extras": "sampler: Default"
},
"Freepik F-Lite": {
"path": "Freepik/F-Lite",
"preview": "Freepik--F-Lite.jpg",
@@ -397,14 +419,13 @@
"size": 13.89,
"date": "2025 May"
},
"SDXS DreamShaper 512": {
"path": "IDKiro/sdxs-512-dreamshaper",
"preview": "IDKiro--sdxs-512-dreamshaper.jpg",
"desc": "SDXS: Real-Time One-Step Latent Diffusion Models with Image Conditions",
"extras": "width: 512, height: 512, sampler: CMSI, steps: 1, cfg_scale: 0.0"
"extras": "width: 512, height: 512, sampler: CMSI, steps: 1, cfg_scale: 0.0",
"size": 1.72
},
"NVLabs Sana 1.5 1.6B 1k": {
"path": "Efficient-Large-Model/SANA1.5_1.6B_1024px_diffusers",
"desc": "Sana is an efficient model with scaling of training-time and inference time techniques. SANA-1.5 delivers: efficient model growth from 1.6B Sana-1.0 model to 4.8B, achieving similar or better performance than training from scratch and saving 60% training cost; efficient model depth pruning, slimming any model size as you want; powerful VLM selection based inference scaling, smaller model+inference scaling > larger model.",
@@ -426,7 +447,7 @@
"desc": "Sana is a text-to-image framework that can efficiently generate images up to 4096 × 4096 resolution. Sana can synthesize high-resolution, high-quality images with strong text-image alignment at a remarkably fast speed, deployable on laptop GPU.",
"preview": "Efficient-Large-Model--Sana_1600M_4Kpx_BF16_diffusers.jpg",
"skip": true,
"size": 12.63,
"size": 22.58,
"date": "2024 November"
},
"NVLabs Sana 1.0 1.6B 2k": {
@@ -434,7 +455,7 @@
"desc": "Sana is a text-to-image framework that can efficiently generate images up to 4096 × 4096 resolution. Sana can synthesize high-resolution, high-quality images with strong text-image alignment at a remarkably fast speed, deployable on laptop GPU.",
"preview": "Efficient-Large-Model--Sana_1600M_2Kpx_BF16_diffusers.jpg",
"skip": true,
"size": 12.63,
"size": 22.58,
"date": "2024 November"
},
"NVLabs Sana 1.0 1.6B 1k": {
@@ -442,7 +463,7 @@
"desc": "Sana is a text-to-image framework that can efficiently generate images up to 4096 × 4096 resolution. Sana can synthesize high-resolution, high-quality images with strong text-image alignment at a remarkably fast speed, deployable on laptop GPU.",
"preview": "Efficient-Large-Model--Sana_1600M_1024px_diffusers.jpg",
"skip": true,
"size": 12.63,
"size": 25.79,
"date": "2024 November"
},
"NVLabs Sana 1.0 0.6B 0.5k": {
@@ -450,7 +471,7 @@
"desc": "Sana is a text-to-image framework that can efficiently generate images up to 4096 × 4096 resolution. Sana can synthesize high-resolution, high-quality images with strong text-image alignment at a remarkably fast speed, deployable on laptop GPU.",
"preview": "Efficient-Large-Model--Sana_600M_512px_diffusers.jpg",
"skip": true,
"size": 7.51,
"size": 16.51,
"date": "2024 November"
},
"nVidia ChronoEdit": {
@@ -465,7 +486,7 @@
"desc": "Cosmos-Predict2: A family of highly performant pre-trained world foundation models purpose-built for generating physics-aware images, videos and world states for physical AI development.",
"preview": "nvidia--Cosmos-Predict2-2B-Text2Image.jpg",
"skip": true,
"size": 13.32,
"size": 14.15,
"date": "2025 June"
},
"nVidia Cosmos-Predict2 T2I 14B": {
@@ -473,10 +494,9 @@
"desc": "Cosmos-Predict2: A family of highly performant pre-trained world foundation models purpose-built for generating physics-aware images, videos and world states for physical AI development.",
"preview": "nvidia--Cosmos-Predict2-14B-Text2Image.jpg",
"skip": true,
"size": 37.36,
"size": 38.77,
"date": "2025 June"
},
"X-Omni SFT": {
"path": "X-Omni/X-Omni-SFT",
"desc": "X-Omni: Reinforcement learning makes discrete autoregressive image generative models great again",
@@ -486,13 +506,12 @@
"date": "2024 September",
"experimental": true
},
"VectorSpaceLab OmniGen v1": {
"path": "Shitao/OmniGen-v1-diffusers",
"desc": "OmniGen is a unified image generation model that can generate a wide range of images from multi-modal prompts. It is designed to be simple, flexible and easy to use.",
"preview": "Shitao--OmniGen-v1.jpg",
"skip": true,
"size": 15.47,
"size": 8.09,
"date": "2024 October"
},
"VectorSpaceLab OmniGen v2": {
@@ -500,16 +519,15 @@
"desc": "OmniGen2 is a powerful and efficient unified multimodal model. Unlike OmniGen v1, OmniGen2 features two distinct decoding pathways for text and image modalities, utilizing unshared parameters and a decoupled image tokenizer.",
"preview": "OmniGen2--OmniGen2.jpg",
"skip": true,
"size": 30.5,
"size": 16.2,
"date": "2025 June"
},
"AuraFlow 0.3": {
"path": "fal/AuraFlow-v0.3",
"desc": "AuraFlow v0.3 is the fully open-sourced flow-based text-to-image generation model. The model was trained with more compute compared to the previous version, AuraFlow-v0.2. Compared to AuraFlow-v0.2, the model is fine-tuned on more aesthetic datasets and now supports various aspect ratio, (now width and height up to 1536 pixels).",
"preview": "fal--AuraFlow-v0.3.jpg",
"skip": true,
"size": 31.9,
"size": 49.5,
"date": "2024 August"
},
"AuraFlow 0.2": {
@@ -517,10 +535,9 @@
"desc": "AuraFlow v0.2 is the fully open-sourced largest flow-based text-to-image generation model. The model was trained with more compute compared to the previous version, AuraFlow-v0.1",
"preview": "fal--AuraFlow-v0.2.jpg",
"skip": true,
"size": 31.9,
"size": 49.4,
"date": "2024 July"
},
"Segmind Vega": {
"path": "huggingface/segmind/Segmind-Vega",
"preview": "segmind--Segmind-Vega.jpg",
@@ -528,33 +545,36 @@
"variant": "fp16",
"skip": true,
"extras": "sampler: Default, cfg_scale: 9.0",
"size": 6.43,
"size": 9.88,
"date": "2023 November"
},
"Segmind SegMoE SD 4x2": {
"path": "segmind/SegMoE-SD-4x2-v0",
"preview": "segmind--SegMoE-SD-4x2-v0.jpg",
"desc": "SegMoE-SD-4x2-v0 is an untrained Segmind Mixture of Diffusion Experts Model generated using segmoe from 4 Expert SD1.5 models. SegMoE is a powerful framework for dynamically combining Stable Diffusion Models into a Mixture of Experts within minutes without training",
"extras": "width: 512, height: 512, sampler: Default"
"extras": "width: 512, height: 512, sampler: Default",
"size": 3.27
},
"Segmind SegMoE XL 4x2": {
"path": "segmind/SegMoE-4x2-v0",
"preview": "segmind--SegMoE-4x2-v0.jpg",
"desc": "SegMoE-4x2-v0 is an untrained Segmind Mixture of Diffusion Experts Model generated using segmoe from 4 Expert SDXL models. SegMoE is a powerful framework for dynamically combining Stable Diffusion Models into a Mixture of Experts within minutes without training",
"extras": "sampler: Default"
"extras": "sampler: Default",
"size": 16.93
},
"Pixart-α XL 2 Medium": {
"path": "PixArt-alpha/PixArt-XL-2-512x512",
"desc": "PixArt-α is a Transformer-based T2I diffusion model whose image generation quality is competitive with state-of-the-art image generators (e.g., Imagen, SDXL, and even Midjourney), and the training speed markedly surpasses existing large-scale T2I models. Extensive experiments demonstrate that PIXART-α excels in image quality, artistry, and semantic control. It can directly generate 512px images from text prompts within a single sampling process.",
"preview": "PixArt-alpha--PixArt-XL-2-512x512.jpg",
"extras": "width: 512, height: 512, sampler: Default, cfg_scale: 2.0"
"extras": "width: 512, height: 512, sampler: Default, cfg_scale: 2.0",
"size": 31.52
},
"Pixart-α XL 2 Large": {
"path": "PixArt-alpha/PixArt-XL-2-1024-MS",
"desc": "PixArt-α is a Transformer-based T2I diffusion model whose image generation quality is competitive with state-of-the-art image generators (e.g., Imagen, SDXL, and even Midjourney), and the training speed markedly surpasses existing large-scale T2I models. Extensive experiments demonstrate that PIXART-α excels in image quality, artistry, and semantic control. It can directly generate 1024px images from text prompts within a single sampling process.",
"preview": "PixArt-alpha--PixArt-XL-2-1024-MS.jpg",
"extras": "sampler: Default, cfg_scale: 2.0",
"size": 21.3,
"size": 21.83,
"date": "2023 November"
},
"Pixart-Σ Small": {
@@ -562,14 +582,16 @@
"desc": "PixArt-Σ, a Diffusion Transformer model (DiT) capable of directly generating images at 4K resolution. PixArt-Σ represents a significant advancement over its predecessor, PixArt-α, offering images of markedly higher fidelity and improved alignment with text prompts.",
"preview": "PixArt-alpha--PixArt-Sigma-XL-2-512-MS.jpg",
"skip": true,
"extras": "width: 512, height: 512, sampler: Default, cfg_scale: 2.0"
"extras": "width: 512, height: 512, sampler: Default, cfg_scale: 2.0",
"size": 2.44
},
"Pixart-Σ Medium": {
"path": "huggingface/PixArt-alpha/PixArt-Sigma-XL-2-1024-MS",
"desc": "PixArt-Σ, a Diffusion Transformer model (DiT) capable of directly generating images at 4K resolution. PixArt-Σ represents a significant advancement over its predecessor, PixArt-α, offering images of markedly higher fidelity and improved alignment with text prompts.",
"preview": "PixArt-alpha--PixArt-Sigma-XL-2-1024-MS.jpg",
"skip": true,
"extras": "sampler: Default, cfg_scale: 2.0"
"extras": "sampler: Default, cfg_scale: 2.0",
"size": 21.83
},
"Pixart-Σ Large": {
"path": "huggingface/PixArt-alpha/PixArt-Sigma-XL-2-2K-MS",
@@ -577,17 +599,16 @@
"preview": "PixArt-alpha--PixArt-Sigma-XL-2-2K-MS.jpg",
"skip": true,
"extras": "sampler: Default, cfg_scale: 2.0",
"size": 21.3,
"size": 2.44,
"date": "2024 April"
},
"Tencent HunyuanImage 2.1": {
"path": "hunyuanvideo-community/HunyuanImage-2.1-Diffusers",
"desc": "HunyuanImage-2.1, a highly efficient text-to-image model that is capable of generating 2K (2048 × 2048) resolution images.",
"preview": "hunyuanvideo-community--HunyuanImage-2.1-Diffusers.jpg",
"extras": "",
"skip": true,
"size": 51.88,
"size": 53.12,
"date": "2025 August"
},
"Tencent HunyuanImage 2.1 Refiner": {
@@ -596,7 +617,7 @@
"preview": "hunyuanvideo-community--HunyuanImage-2.1-Diffusers.jpg",
"extras": "",
"skip": true,
"size": 48.01,
"size": 49.16,
"date": "2025 August"
},
"Tencent HunyuanDiT 1.2": {
@@ -604,23 +625,23 @@
"desc": "Hunyuan-DiT : A Powerful Multi-Resolution Diffusion Transformer with Fine-Grained Chinese Understanding.",
"preview": "Tencent-Hunyuan--HunyuanDiT-v1.2-Diffusers.jpg",
"extras": "sampler: Default, cfg_scale: 2.0",
"size": 14.09,
"size": 14.42,
"date": "2024 May"
},
"Tencent HunyuanDiT 1.1": {
"path": "Tencent-Hunyuan/HunyuanDiT-v1.1-Diffusers",
"desc": "Hunyuan-DiT : A Powerful Multi-Resolution Diffusion Transformer with Fine-Grained Chinese Understanding.",
"preview": "Tencent-Hunyuan--HunyuanDiT-v1.1-Diffusers.jpg",
"extras": "sampler: Default, cfg_scale: 2.0"
"extras": "sampler: Default, cfg_scale: 2.0",
"size": 14.49
},
"AlphaVLLM Lumina Next SFT": {
"path": "Alpha-VLLM/Lumina-Next-SFT-diffusers",
"desc": "The Lumina-Next-SFT is a Next-DiT model containing 2B parameters and utilizes Gemma-2B as the text encoder, enhanced through high-quality supervised fine-tuning (SFT).",
"preview": "Alpha-VLLM--Lumina-Next-SFT-diffusers.jpg",
"skip": true,
"extras": "sampler: Default",
"size": 8.67,
"size": 8.86,
"date": "2024 June"
},
"AlphaVLLM Lumina 2": {
@@ -629,7 +650,7 @@
"preview": "Alpha-VLLM--Lumina-Image-2.0.jpg",
"skip": true,
"extras": "sampler: Default",
"size": 20.75,
"size": 21.23,
"date": "2025 January"
},
"AlphaVLLM Lumina DiMOO": {
@@ -641,14 +662,13 @@
"size": 0,
"date": "2025 September"
},
"HiDream-I1 Fast": {
"path": "HiDream-ai/HiDream-I1-Fast",
"desc": "HiDream-I1 is a new open-source image generative foundation model with 17B parameters that achieves state-of-the-art image generation quality within seconds.",
"preview": "HiDream-ai--HiDream-I1-Fast.jpg",
"skip": true,
"extras": "sampler: Default",
"size": 58.4,
"size": 47.18,
"date": "2025 April"
},
"HiDream-I1 Dev": {
@@ -657,7 +677,7 @@
"preview": "HiDream-ai--HiDream-I1-Dev.jpg",
"skip": true,
"extras": "sampler: Default",
"size": 58.4,
"size": 47.18,
"date": "2025 April"
},
"HiDream-I1 Full": {
@@ -666,7 +686,7 @@
"preview": "HiDream-ai--HiDream-I1-Full.jpg",
"skip": true,
"extras": "sampler: Default",
"size": 58.4,
"size": 47.18,
"date": "2025 April"
},
"HiDream-O1 Image": {
@@ -683,32 +703,32 @@
"desc": "HiDream-E1 is an image editing model built on HiDream-I1.",
"preview": "HiDream-ai--HiDream-E1-Full.jpg",
"skip": true,
"extras": "sampler: Default"
"extras": "sampler: Default",
"size": 47.18
},
"HiDream-E1.1": {
"path": "HiDream-ai/HiDream-E1-1",
"desc": "HiDream-E1 is an image editing model built on HiDream-I1.",
"preview": "HiDream-ai--HiDream-E1-1.jpg",
"skip": true,
"extras": "sampler: Default"
"extras": "sampler: Default",
"size": 47.18
},
"Kwai Kolors": {
"path": "Kwai-Kolors/Kolors-diffusers",
"desc": "Kolors is a large-scale text-to-image generation model based on latent diffusion, developed by the Kuaishou Kolors team. Trained on billions of text-image pairs, Kolors exhibits significant advantages over both open-source and proprietary models in visual quality, complex semantic accuracy, and text rendering for both Chinese and English characters. Furthermore, Kolors supports both Chinese and English inputs",
"preview": "Kwai-Kolors--Kolors-diffusers.jpg",
"skip": true,
"extras": "width: 1024, height: 1024",
"size": 17.40,
"size": 17.81,
"date": "2024 July"
},
"Kandinsky 2.1": {
"path": "kandinsky-community/kandinsky-2-1",
"desc": "Kandinsky 2.1 is a text-conditional diffusion model based on unCLIP and latent diffusion, composed of a transformer-based image prior model, a unet diffusion model, and a decoder. Kandinsky 2.1 inherits best practices from Dall-E 2 and Latent diffusion while introducing some new ideas. It uses the CLIP model as a text and image encoder, and diffusion image prior (mapping) between latent spaces of CLIP modalities. This approach increases the visual performance of the model and unveils new horizons in blending images and text-guided image manipulation.",
"preview": "kandinsky-community--kandinsky-2-1.jpg",
"extras": "width: 768, height: 768, sampler: Default",
"size": 5.15,
"size": 14.32,
"date": "2023 April"
},
"Kandinsky 2.2": {
@@ -716,7 +736,7 @@
"desc": "Kandinsky 2.2 is a text-conditional diffusion model (+0.1!) based on unCLIP and latent diffusion, composed of a transformer-based image prior model, a unet diffusion model, and a decoder. Kandinsky 2.2 inherits best practices from Dall-E 2 and Latent diffusion while introducing some new ideas. It uses the CLIP model as a text and image encoder, and diffusion image prior (mapping) between latent spaces of CLIP modalities. This approach increases the visual performance of the model and unveils new horizons in blending images and text-guided image manipulation.",
"preview": "kandinsky-community--kandinsky-2-2-decoder.jpg",
"extras": "width: 768, height: 768, sampler: Default",
"size": 5.15,
"size": 10.02,
"date": "2023 July"
},
"Kandinsky 3.0": {
@@ -725,7 +745,7 @@
"preview": "kandinsky-community--kandinsky-3.jpg",
"variant": "fp16",
"extras": "sampler: Default",
"size": 27.72,
"size": 27.85,
"date": "2023 November"
},
"Kandinsky 5.0 T2I Lite": {
@@ -733,7 +753,7 @@
"desc": "Kandinsky 5.0 Image Lite is a 6B image generation models 1K resulution, high visual quality and strong text-writing",
"preview": "kandinskylab--Kandinsky-5.0-T2I-Lite-sft-Diffusers.jpg",
"skip": true,
"size": 33.20,
"size": 32.22,
"date": "2025 November"
},
"Kandinsky 5.0 I2I Lite": {
@@ -741,35 +761,37 @@
"desc": "Kandinsky 5.0 Image Lite is a 6B image editing models 1K resulution, high visual quality and strong text-writing",
"preview": "kandinskylab--Kandinsky-5.0-T2I-Lite-sft-Diffusers.jpg",
"skip": true,
"size": 33.20,
"size": 32.22,
"date": "2025 November"
},
"Playground v1": {
"path": "playgroundai/playground-v1",
"desc": "Playground v1 is a latent diffusion model that improves the overall HDR quality to get more stunning images.",
"preview": "playgroundai--playground-v1.jpg",
"extras": "width: 512, height: 512, sampler: Default",
"size": 4.95,
"size": 3.85,
"date": "2023 December"
},
"Playground v2 Small": {
"path": "playgroundai/playground-v2-256px-base",
"desc": "Playground v2 is a diffusion-based text-to-image generative model. The model was trained from scratch by the research team at Playground. Images generated by Playground v2 are favored 2.5 times more than those produced by Stable Diffusion XL, according to Playgrounds user study.",
"preview": "playgroundai--playground-v2-256px-base.jpg",
"extras": "width: 256, height: 256, sampler: Default"
"extras": "width: 256, height: 256, sampler: Default",
"size": 41.63
},
"Playground v2 Medium": {
"path": "playgroundai/playground-v2-512px-base",
"desc": "Playground v2 is a diffusion-based text-to-image generative model. The model was trained from scratch by the research team at Playground. Images generated by Playground v2 are favored 2.5 times more than those produced by Stable Diffusion XL, according to Playgrounds user study.",
"preview": "playgroundai--playground-v2-512px-base.jpg",
"extras": "width: 512, height: 512, sampler: Default"
"extras": "width: 512, height: 512, sampler: Default",
"size": 41.63
},
"Playground v2 Large": {
"path": "playgroundai/playground-v2-1024px-aesthetic",
"desc": "Playground v2 is a diffusion-based text-to-image generative model. The model was trained from scratch by the research team at Playground. Images generated by Playground v2 are favored 2.5 times more than those produced by Stable Diffusion XL, according to Playgrounds user study.",
"preview": "playgroundai--playground-v2-1024px-aesthetic.jpg",
"extras": "sampler: Default"
"extras": "sampler: Default",
"size": 41.63
},
"Playground v2.5": {
"path": "playgroundai/playground-v2.5-1024px-aesthetic",
@@ -777,16 +799,15 @@
"preview": "playgroundai--playground-v2.5-1024px-aesthetic.jpg",
"variant": "fp16",
"extras": "sampler: DPM++ 2M EDM",
"size": 13.35,
"size": 41.63,
"date": "2023 December"
},
"CogView 4": {
"path": "zai-org/CogView4-6B",
"desc": "An innovative cascaded framework that enhances the performance of text-to-image diffusion. CogView is the first model implementing relay diffusion in the realm of text-to-image generation, executing the task by first creating low-resolution images and subsequently applying relay-based super-resolution.",
"preview": "THUDM--CogView4-6B.jpg",
"skip": true,
"size": 30.39,
"size": 31.11,
"date": "2025 March"
},
"CogView 3 Plus": {
@@ -794,10 +815,9 @@
"desc": "An innovative cascaded framework that enhances the performance of text-to-image diffusion. CogView is the first model implementing relay diffusion in the realm of text-to-image generation, executing the task by first creating low-resolution images and subsequently applying relay-based super-resolution.",
"preview": "THUDM--CogView3-Plus-3B.jpg",
"skip": true,
"size": 24.96,
"size": 25.56,
"date": "2024 October"
},
"Bria 3.2": {
"path": "briaai/BRIA-3.2",
"desc": "Bria 3.2 is the next-generation commercial-ready text-to-image model. With just 4 billion parameters, it provides exceptional aesthetics and text rendering, evaluated to provide on par results to leading open-source models, and outperforming other licensed models.",
@@ -806,39 +826,14 @@
"size": 18.66,
"date": "2025 June"
},
"Meissonic": {
"path": "MeissonFlow/Meissonic",
"desc": "Meissonic is a non-autoregressive mask image modeling text-to-image synthesis model that can generate high-resolution images. It is designed to run on consumer graphics cards.",
"preview": "MeissonFlow--Meissonic.jpg",
"skip": true,
"size": 3.64,
"size": 8.17,
"date": "2024 October"
},
"aMUSEd 256": {
"path": "huggingface/amused/amused-256",
"skip": true,
"desc": "Amused is a lightweight text to image model based off of the muse architecture. Amused is particularly useful in applications that require a lightweight and fast model such as generating many images quickly at once.",
"preview": "amused--amused-256.jpg",
"extras": "width: 256, height: 256, sampler: Default"
},
"aMUSEd 512": {
"path": "amused/amused-512",
"desc": "Amused is a lightweight text to image model based off of the muse architecture. Amused is particularly useful in applications that require a lightweight and fast model such as generating many images quickly at once.",
"preview": "amused--amused-512.jpg",
"extras": "width: 512, height: 512, sampler: Default"
},
"Warp Wuerstchen": {
"path": "warp-ai/wuerstchen",
"desc": "Würstchen is a diffusion model whose text-conditional model works in a highly compressed latent space of images. Why is this important? Compressing data can reduce computational costs for both training and inference by magnitudes. Training on 1024x1024 images, is way more expensive than training at 32x32. Usually, other works make use of a relatively small compression, in the range of 4x - 8x spatial compression. Würstchen takes this to an extreme. Through its novel design, we achieve a 42x spatial compression. Würstchen employs a two-stage compression, what we call Stage A and Stage B. Stage A is a VQGAN, and Stage B is a Diffusion Autoencoder (more details can be found in the paper). A third model, Stage C, is learned in that highly compressed latent space. This training requires fractions of the compute used for current top-performing models, allowing also cheaper and faster inference.",
"preview": "warp-ai--wuerstchen.jpg",
"extras": "sampler: Default, cfg_scale: 4.0, image_cfg_scale: 0.0",
"size": 12.16,
"date": "2023 August"
},
"KOALA 700M": {
"path": "huggingface/etri-vilab/koala-700m-llava-cap",
"variant": "fp16",
@@ -846,57 +841,45 @@
"desc": "Fast text-to-image model, called KOALA, by compressing SDXL's U-Net and distilling knowledge from SDXL into our model. KOALA-700M can generate a 1024x1024 image in less than 1.5 seconds on an NVIDIA 4090 GPU, which is more than 2x faster than SDXL.",
"preview": "etri-vilab--koala-700m-llava-cap.jpg",
"extras": "sampler: Default",
"size": 6.58,
"size": 13.88,
"date": "2024 January"
},
"AIDC Ovis-Image 7B": {
"path": "AIDC-AI/Ovis-Image-7B",
"skip": true,
"desc": "Built upon Ovis-U1, Ovis-Image is a 7B text-to-image model specifically optimized for high-quality text rendering, designed to operate efficiently under stringent computational constraints.",
"preview": "AIDC-AI--Ovis-Image-7B.jpg",
"size": 23.38,
"size": 21.79,
"date": "2025 December",
"extras": ""
},
"HDM-XUT 340M Anime": {
"path": "KBlueLeaf/HDM-xut-340M-anime",
"skip": true,
"desc": "HDM(Home made Diffusion Model) is a project to investigate specialized training recipe/scheme for pretraining T2I model at home which require the training setup should be exectuable on customer level hardware or cheap enough second handed server hardware.",
"preview": "KBlueLeaf--HDM-xut-340M-anime.jpg",
"extras": ""
"extras": "",
"size": 2.36
},
"Tsinghua UniDiffuser": {
"path": "thu-ml/unidiffuser-v1",
"desc": "UniDiffuser is a unified diffusion framework to fit all distributions relevant to a set of multi-modal data in one transformer. UniDiffuser is able to perform image, text, text-to-image, image-to-text, and image-text pair generation by setting proper timesteps without additional overhead.\nSpecifically, UniDiffuser employs a variation of transformer, called U-ViT, which parameterizes the joint noise prediction network. Other components perform as encoders and decoders of different modalities, including a pretrained image autoencoder from Stable Diffusion, a pretrained image ViT-B/32 CLIP encoder, a pretrained text ViT-L CLIP encoder, and a GPT-2 text decoder finetuned by ourselves.",
"preview": "thu-ml--unidiffuser-v1.jpg",
"extras": "width: 512, height: 512, sampler: Default",
"size": 5.37,
"date": "2023 May"
},
"SalesForce BLIP-Diffusion": {
"path": "salesforce/blipdiffusion",
"desc": "BLIP-Diffusion, a new subject-driven image generation model that supports multimodal control which consumes inputs of subject images and text prompts. Unlike other subject-driven generation models, BLIP-Diffusion introduces a new multimodal encoder which is pre-trained to provide subject representation.",
"preview": "salesforce--blipdiffusion.jpg",
"size": 7.23,
"size": 4.27,
"date": "2023 July"
},
"InstaFlow 0.9B": {
"path": "XCLiu/instaflow_0_9B_from_sd_1_5",
"desc": "InstaFlow is an ultra-fast, one-step image generator that achieves image quality close to Stable Diffusion. This efficiency is made possible through a recent Rectified Flow technique, which trains probability flows with straight trajectories, hence inherently requiring only a single step for fast inference.",
"preview": "XCLiu--instaflow_0_9B_from_sd_1_5.jpg"
"preview": "XCLiu--instaflow_0_9B_from_sd_1_5.jpg",
"size": 4.27
},
"DeepFloyd IF Medium": {
"path": "DeepFloyd/IF-I-M-v1.0",
"desc": "DeepFloyd-IF is a pixel-based text-to-image triple-cascaded diffusion model, that can generate pictures with new state-of-the-art for photorealism and language understanding. The result is a highly efficient model that outperforms current state-of-the-art models, achieving a zero-shot FID-30K score of 6.66 on the COCO dataset. It is modular and composed of frozen text mode and three pixel cascaded diffusion modules, each designed to generate images of increasing resolution: 64x64, 256x256, and 1024x1024.",
"preview": "DeepFloyd--IF-I-M-v1.0.jpg",
"extras": "sampler: Default",
"size": 12.79,
"size": 81.47,
"date": "2023 April"
},
"DeepFloyd IF Large": {
@@ -904,66 +887,61 @@
"desc": "DeepFloyd-IF is a pixel-based text-to-image triple-cascaded diffusion model, that can generate pictures with new state-of-the-art for photorealism and language understanding. The result is a highly efficient model that outperforms current state-of-the-art models, achieving a zero-shot FID-30K score of 6.66 on the COCO dataset. It is modular and composed of frozen text mode and three pixel cascaded diffusion modules, each designed to generate images of increasing resolution: 64x64, 256x256, and 1024x1024.",
"preview": "DeepFloyd--IF-I-L-v1.0.jpg",
"extras": "sampler: Default",
"size": 15.48,
"size": 88.23,
"date": "2023 April"
},
"Photoroom PRX 1024": {
"path": "Photoroom/prx-1024-t2i-beta",
"desc": "PRX (Photoroom Experimental) is a 1.3-billion-parameter text-to-image model trained entirely from scratch and released under an Apache 2.0 license.",
"preview": "Photoroom--prx-1024-t2i-beta.jpg",
"skip": true
"skip": true,
"size": 20.7
},
"ZAI GLM-Image": {
"path": "zai-org/GLM-Image",
"preview": "zai-org--GLM-Image.jpg",
"desc": "GLM-Image is a two-stage image generation model combining autoregressive token generation (9B vision-language encoder) with diffusion refinement (7B DiT transformer). Features strong text rendering and compositional capabilities.",
"skip": true,
"extras": "sampler: Default, cfg_scale: 1.5, steps: 50",
"size": 15.3,
"size": 15.54,
"date": "2025 January"
},
"AiArtLab SDXS-1B": {
"path": "AiArtLab/sdxs-1b",
"preview": "AiArtLab--sdxs-1b.jpg",
"desc": "Simple Diffusion XS (train in progress) combines Qwen3.5-1.8B text encoder with SDXL-style UNET with only 1.6B parameters and custom 32ch VAE",
"skip": true,
"extras": "sampler: Default",
"size": 15.3,
"size": 11.23,
"date": "2026 January"
},
"Bria FIBO": {
"path": "briaai/FIBO",
"preview": "briaai--FIBO.jpg",
"desc": "BRIA FIBO is an 8-billion parameter text-to-image diffusion model using Flow Matching and featuring a lightweight SmolLM3-3B text encoder. Delivers high-quality, detailed image generation with efficient inference.",
"skip": true,
"extras": "sampler: Default, cfg_scale: 3.5",
"size": 16.2,
"size": 25.54,
"date": "2025 December"
},
"Bria Fibo-Edit": {
"path": "briaai/Fibo-Edit",
"preview": "briaai--Fibo-Edit.jpg",
"desc": "BRIA Fibo-Edit is the image editing variant of FIBO, enabling precise image manipulation through text instructions while maintaining consistency and quality.",
"skip": true,
"extras": "sampler: Default, cfg_scale: 3.5",
"size": 16.2,
"size": 24.13,
"date": "2025 December"
},
"StepFun Step1X-Edit v1.1": {
"path": "stepfun-ai/Step1X-Edit-v1p1-diffusers",
"preview": "stepfun-ai--Step1X-Edit-v1p1-diffusers.jpg",
"desc": "Multimodal image editing model using Step1X transformer architecture with Qwen2.5-VL text encoding, trained with Flow Matching scheduler for high-quality in-context image edits and refinements.",
"skip": true,
"extras": "sampler: Default",
"size": 24.85,
"size": 41.78,
"date": "2025 September"
},
"VIBE Image Edit": {
"path": "vladmandic/VIBE-Image-Edit",
"preview": "vladmandic--VIBE-Image-Edit.jpg",
@@ -973,15 +951,13 @@
"size": 9.27,
"date": "2025 December"
},
"JoyAI Image Edit": {
"path": "jdopensource/JoyAI-Image-Edit-Diffusers",
"preview": "jdopensource--JoyAI-Image-Edit-Diffusers.jpg",
"desc": "JoyAI Image Edit is a Diffusers-native image editing model that combines a JoyImageEdit transformer with Qwen3-VL multimodal conditioning for instruction-guided edits.",
"skip": true,
"size": 50.31,
"size": 50.32,
"extras": "sampler: Default",
"date": "2026 April"
}
}
+36 -109
View File
@@ -29,88 +29,6 @@ const jsConfig = defineConfig([
...globals.builtin,
...globals.browser,
...globals.jquery,
panzoom: 'readonly',
authFetch: 'readonly',
initServerInfo: 'readonly',
log: 'readonly',
debug: 'readonly',
error: 'readonly',
timer: 'readonly',
xhrGet: 'readonly',
xhrPost: 'readonly',
gradioApp: 'readonly',
executeCallbacks: 'readonly',
onAfterUiUpdate: 'readonly',
onOptionsChanged: 'readonly',
optionsChangedCallbacks: 'readonly',
onUiLoaded: 'readonly',
onUiUpdate: 'readonly',
onUiTabChange: 'readonly',
onUiReady: 'readonly',
uiCurrentTab: 'writable',
uiElementIsVisible: 'readonly',
uiElementInSight: 'readonly',
getUICurrentTabContent: 'readonly',
waitForFlag: 'readonly',
logFn: 'readonly',
logTimers: 'readonly',
generateForever: 'readonly',
showContributors: 'readonly',
opts: 'writable',
monitorOption: 'readonly',
sortUIElements: 'readonly',
all_gallery_buttons: 'readonly',
selected_gallery_button: 'readonly',
selected_gallery_index: 'readonly',
switch_to_txt2img: 'readonly',
switch_to_img2img_tab: 'readonly',
switch_to_img2img: 'readonly',
switch_to_sketch: 'readonly',
switch_to_inpaint: 'readonly',
witch_to_inpaint_sketch: 'readonly',
switch_to_extras: 'readonly',
get_tab_index: 'readonly',
create_submit_args: 'readonly',
restartReload: 'readonly',
markSelectedCards: 'readonly',
updateInput: 'readonly',
toggleCompact: 'readonly',
setFontSize: 'readonly',
setTheme: 'readonly',
registerDragDrop: 'readonly',
getToken: 'readonly',
getENActiveTab: 'readonly',
quickApplyStyle: 'readonly',
quickSaveStyle: 'readonly',
setupExtraNetworks: 'readonly',
showNetworks: 'readonly',
localization: 'readonly',
randomId: 'readonly',
requestProgress: 'readonly',
setRefreshInterval: 'readonly',
modalPrevImage: 'readonly',
modalNextImage: 'readonly',
galleryClickEventHandler: 'readonly',
getExif: 'readonly',
jobStatusEl: 'readonly',
removeSplash: 'readonly',
initGPU: 'readonly',
startGPU: 'readonly',
disableNVML: 'readonly',
hash: 'readonly',
idbGet: 'readonly',
idbPut: 'readonly',
idbDel: 'readonly',
idbAdd: 'readonly',
initTableSorter: 'readonly',
idbCount: 'readonly',
idbFolderCleanup: 'readonly',
idbClearAll: 'readonly',
idbIsReady: 'readonly',
initChangelog: 'readonly',
sendNotification: 'readonly',
monitorConnection: 'readonly',
ConnectionMonitorState: 'readonly',
},
},
},
@@ -145,14 +63,16 @@ const jsConfig = defineConfig([
'no-redeclare': 'off',
'no-restricted-globals': 'off',
'no-restricted-syntax': 'off',
'no-underscore-dangle': 'off',
'no-unused-vars': 'off',
'no-use-before-define': 'warn',
'no-useless-escape': 'warn',
'prefer-destructuring': 'off',
'prefer-rest-params': 'off',
'prefer-template': 'warn',
'prefer-template': 'off',
'promise/no-nesting': 'off',
'@typescript-eslint/no-for-in-array': 'off',
'import-x/no-extraneous-dependencies': 'off',
radix: 'off',
'@stylistic/brace-style': [
'error',
@@ -205,22 +125,28 @@ const jsConfig = defineConfig([
},
]);
// const typescriptConfig = defineConfig([
// // TypeScript ESLint plugin
// plugins.typescriptEslint,
// // Airbnb base TypeScript config
// ...configs.base.typescript,
// {
// name: 'sdnext/typescript',
// files: helpers.extensions.tsFiles,
// rules: {
// '@typescript-eslint/ban-ts-comment': 'off',
// '@typescript-eslint/explicit-module-boundary-types': 'off',
// '@typescript-eslint/no-shadow': 'error',
// '@typescript-eslint/no-var-requires': 'off',
// },
// },
// ]);
const typescriptConfig = defineConfig([
// TypeScript ESLint plugin
plugins.typescriptEslint,
// Airbnb base TypeScript config
...configs.base.typescript,
{
name: 'sdnext/ts',
files: ['ui/**/*.ts', 'src/*.ts'],
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-for-in-array': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/prefer-destructuring': 'off',
'@typescript-eslint/naming-convention': 'off',
'import-x/prefer-default-export': 'off',
'import-x/no-extraneous-dependencies': 'off',
},
},
]);
const nodeConfig = defineConfig([
// Node plugin
@@ -308,6 +234,7 @@ const htmlConfig = defineConfig([
2,
],
'html/no-duplicate-class': 'error',
'html/no-extra-spacing-tags': 'off',
'html/no-extra-spacing-attrs': [
'error',
{
@@ -332,21 +259,21 @@ export default defineConfig([
// Ignore files and folders listed in .gitignore
includeIgnoreFile(gitignorePath),
globalIgnores([
'**/venv',
'**/node_modules',
'**/extensions',
'**/extensions-builtin',
'**/repositories',
'**/venv',
'**/panZoom.js',
'**/split.js',
'**/exifr.js',
'**/jquery.js',
'**/sparkline.js',
'**/sha256.js',
'**/iframeResizer.min.js',
'**/*.mjs',
'**/*.esm.js',
'**/dist',
'src/vendor/*',
'javascript/*',
'**/Vlad-Neomorph.css', // Waiting on plugin fix https://github.com/eslint/css/pull/411
'javascript/*',
'ui/js/*',
]),
...jsConfig,
// ...typescriptConfig,
...typescriptConfig,
...nodeConfig,
...jsonConfig,
...markdownConfig,
-710
View File
@@ -1,710 +0,0 @@
<style>
#licenses h2 {font-size: 1.2em; font-weight: bold; margin-bottom: 0.2em;}
#licenses small {font-size: 0.95em; opacity: 0.85;}
#licenses pre { margin: 1em 0 2em 0;}
</style>
<h2><a href="https://github.com/victorca25/iNNfer/blob/main/LICENSE">ESRGAN</a></h2>
<small>Code for architecture and reading models copied.</small>
<pre>
MIT License
Copyright (c) 2021 victorca25
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
</pre>
<h2><a href="https://github.com/xinntao/Real-ESRGAN/blob/master/LICENSE">Real-ESRGAN</a></h2>
<small>Some code is copied to support ESRGAN models.</small>
<pre>
BSD 3-Clause License
Copyright (c) 2021, Xintao Wang
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</pre>
<h2><a href="https://github.com/invoke-ai/InvokeAI/blob/main/LICENSE">InvokeAI</a></h2>
<small>Some code for compatibility with OSX is taken from lstein's repository.</small>
<pre>
MIT License
Copyright (c) 2022 InvokeAI Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
</pre>
<h2><a href="https://github.com/Hafiidz/latent-diffusion/blob/main/LICENSE">LDSR</a></h2>
<small>Code added by contirubtors, most likely copied from this repository.</small>
<pre>
MIT License
Copyright (c) 2022 Machine Vision and Learning Group, LMU Munich
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
</pre>
<h2><a href="https://github.com/pharmapsychotic/clip-interrogator/blob/main/LICENSE">CLIP Interrogator</a></h2>
<small>Some small amounts of code borrowed and reworked.</small>
<pre>
MIT License
Copyright (c) 2022 pharmapsychotic
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
</pre>
<h2><a href="https://github.com/JingyunLiang/SwinIR/blob/main/LICENSE">SwinIR</a></h2>
<small>Code added by contributors, most likely copied from this repository.</small>
<pre>
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [2021] [SwinIR Authors]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
</pre>
<h2><a href="https://github.com/AminRezaei0x443/memory-efficient-attention/blob/main/LICENSE">Memory Efficient Attention</a></h2>
<small>The sub-quadratic cross attention optimization uses modified code from the Memory Efficient Attention package that Alex Birch optimized for 3D tensors. This license is updated to reflect that.</small>
<pre>
MIT License
Copyright (c) 2023 Alex Birch
Copyright (c) 2023 Amin Rezaei
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
</pre>
<h2><a href="https://github.com/huggingface/diffusers/blob/c7da8fd23359a22d0df2741688b5b4f33c26df21/LICENSE">Scaled Dot Product Attention</a></h2>
<small>Some small amounts of code borrowed and reworked.</small>
<pre>
Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
</pre>
<h2><a href="https://github.com/Dao-AILab/flash-attention/blob/main/LICENSE">Flash Attention</a></h2>
<small>Fast and memory-efficient exact attention</small>
<pre>
BSD 3-Clause License
Copyright (c) 2022, the respective contributors, as shown by the AUTHORS file.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</pre>
<h2><a href="https://github.com/explosion/curated-transformers/blob/main/LICENSE">Curated transformers</a></h2>
<small>The MPS workaround for nn.Linear on macOS 13.2.X is based on the MPS workaround for nn.Linear created by danieldk for Curated transformers</small>
<pre>
The MIT License (MIT)
Copyright (C) 2021 ExplosionAI GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
</pre>
<h2><a href="https://github.com/madebyollin/taesd/blob/main/LICENSE">TAESD</a></h2>
<small>Tiny AutoEncoder for Stable Diffusion option for live previews</small>
<pre>
MIT License
Copyright (c) 2023 Ollin Boer Bohan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
</pre>
<h2><a href="https://github.com/microsoft/Olive/blob/main/LICENSE">Olive</a></h2>
<small>An easy-to-use hardware-aware model optimization tool that composes industry-leading techniques across model compression, optimization, and compilation.</small>
<pre>
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
</pre>
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 473 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

+98 -45
View File
@@ -208,13 +208,45 @@ def uninstall(package, quiet = False):
return txt
def uv_info():
uv_version = None
uv_cache_dir = None
uv_cache_active = False
uv_local = os.path.join(sys.prefix, "bin", "uv") # Prefer uv inside the venv
if os.path.exists(uv_local):
uv_version = subprocess.check_output([uv_local, "--version"], text=True).strip()
uv_cache_dir = subprocess.check_output([uv_local, "cache", "dir"], text=True).strip()
uv_global = shutil.which("uv") # Fallback: system uv
if uv_global:
uv_version = subprocess.check_output([uv_global, "--version"], text=True).strip()
uv_cache_dir = subprocess.check_output([uv_global, "cache", "dir"], text=True).strip()
uv_cache_disabled = os.environ.get("UV_NO_CACHE") == "1"
site = next(p for p in sys.path if p.endswith("site-packages"))
if uv_cache_dir and not uv_cache_disabled:
for root, _dirs, files in os.walk(site):
for f in files:
full = os.path.join(root, f)
try:
st = os.stat(full)
except FileNotFoundError:
continue
if st.st_nlink > 1: # Hardlink count > 1 means deduped
uv_cache_active = True
cache_path = os.path.join(uv_cache_dir, f) # Or check if inode matches something in cache
if os.path.exists(cache_path):
if os.stat(cache_path).st_ino == st.st_ino:
uv_cache_active = True
log.debug(f'Package manager: app=uv version="{uv_version}" folder="{uv_cache_dir}" dedup={uv_cache_active}')
def run(cmd: str, *nargs: str, **kwargs):
options = {
"check": False,
"env": os.environ,
}
options |= kwargs # Override defaults with passed kwargs
result = subprocess.run(f'"{cmd}" {" ".join(nargs)}', **options, shell=True, capture_output=True, text=True)
argstr = " ".join(nargs)
result = subprocess.run(f'"{cmd}" {argstr}', **options, shell=True, capture_output=True, text=True)
result.stdout = result.stdout.strip()
result.stderr = result.stderr.strip()
txt = result.stdout
@@ -252,7 +284,8 @@ def pip(arg: str, ignore: bool = False, quiet: bool = True, *, uv = True, constr
log.warning('Offline mode enabled')
return None, 'offline'
package = arg.replace("install", "").replace("--upgrade", "").replace("--no-deps", "").replace("--force-reinstall", "").strip()
uv = uv and args.uv and not package.startswith('git+')
# uv = uv and args.uv and not package.startswith('git+')
uv = uv and args.uv
pipCmd = "uv pip" if uv else "pip"
if not quiet and '-r ' not in arg:
log.info(f'Install: package="{package}" mode={"uv" if uv else "pip"}')
@@ -263,12 +296,15 @@ def pip(arg: str, ignore: bool = False, quiet: bool = True, *, uv = True, constr
all_args.append(arg)
if env_args:
all_args.append(env_args)
if constraints and "-c " not in env_args:
if constraints and "-c " not in env_args and arg.startswith("install"):
all_args.append("-c constraints.txt")
if not quiet:
log.debug(f'Running: {pipCmd}="{" ".join(all_args)}"')
result, output = run(sys.executable, "-m", pipCmd, *all_args)
if uv:
result, output = run("uv", "pip", *all_args)
else:
result, output = run(sys.executable, "-m", pipCmd, *all_args)
if len(result.stderr) > 0:
if uv and result.returncode != 0:
@@ -276,7 +312,8 @@ def pip(arg: str, ignore: bool = False, quiet: bool = True, *, uv = True, constr
debug(f'Install: uv pip error: {result.stderr}')
cleanup_broken_packages()
return pip(originalArg, ignore, quiet, uv=False)
debug(f'Install {pipCmd}: {output}')
if os.environ.get('SD_INSTALL_DEBUG', None) is not None:
log.debug(f'PIP cmd="{pipCmd}": {output}')
if result.returncode != 0 and not ignore:
errors.append(f'pip: {package}')
log.error(f'Install: {pipCmd}: {arg}')
@@ -293,7 +330,7 @@ def install(package, friendly: str | None = None, ignore: bool = False, reinstal
if args.reinstall or args.upgrade:
global quick_allowed # pylint: disable=global-statement
quick_allowed = False
if (args.reinstall) or (reinstall) or (not installed(package, friendly, quiet=quiet)):
if args.reinstall or reinstall or not installed(package, friendly, quiet=quiet):
deps = '' if not no_deps else '--no-deps '
isolation = '' if not no_build_isolation else '--no-build-isolation '
cmd = f"install{' --upgrade' if not args.uv else ''}{' --force-reinstall' if force else ''} {deps}{isolation}{package}"
@@ -321,7 +358,7 @@ def git(arg: str, folder: str | None= None, ignore: bool = False, optional: bool
elif "no submodule mapping found" in txt:
log.warning(f'Git: folder="{folder}" submodules changed')
elif 'or stash them' in txt:
log.error(f'Git: folder="{folder}" local changes detected')
log.warning(f'Git: folder="{folder}" local changes detected')
else:
log.error(f'Git: folder="{folder}" arg="{arg}" output={txt}')
errors.append(f'git: {folder}')
@@ -341,8 +378,9 @@ def branch(folder=None):
b = git('branch --show-current', folder, optional=True)
if b == '':
branches = git('branch', folder).split('\n')
if len(branches) > 0:
b = [x for x in branches if x.startswith('*')][0]
marked = [x for x in branches if x.startswith('*')]
if len(branches) > 0 and len(marked) > 0:
b = marked[0]
if 'detached' in b and len(branches) > 1:
b = branches[1].strip()
log.debug(f'Git detached head detected: folder="{folder}" reattach={b}')
@@ -380,7 +418,7 @@ def update(folder, keep_branch = False, rebase = True):
debug(f'Install update: folder={folder} args={arg} {res}')
else:
b = branch(folder)
if branch is None:
if b is None:
res = git(f'pull {arg}', folder)
debug(f'Install update: folder={folder} branch={b} args={arg} {res}')
else:
@@ -431,6 +469,8 @@ def get_platform():
'locale': locale.getlocale(),
'setuptools': package_version('setuptools'),
'docker': os.environ.get('SD_DOCKER', None) is not None,
'pip': package_version('pip'),
'uv': package_version('uv'),
# 'host': platform.node(),
# 'version': platform.version(),
}
@@ -494,11 +534,12 @@ def check_diffusers():
t_start = time.time()
if args.skip_all:
return
target_commit = "015da50b40ee7a082ea8c17a8c43dff717c9653e" # diffusers commit hash == 0.37.1.dev-0427
target_commit = "d1f8e55c3b6e3ac42d6303a8805ded1c2a4bdd0e" # diffusers commit hash == 0.39.0.dev0 == 06-15-2026
# if args.use_rocm or args.use_zluda or args.use_directml:
# sha = '043ab2520f6a19fce78e6e060a68dbc947edb9f9' # lock diffusers versions for now
pkg = package_spec('diffusers')
minor = int(pkg.version.split('.')[1] if pkg is not None else -1)
parts = pkg.version.split('.') if pkg is not None else []
minor = int(parts[1]) if len(parts) > 1 else -1
current = opts.get('diffusers_version', '') if minor > -1 else ''
if (minor == -1) or ((current != target_commit) and (not args.experimental)):
if minor == -1:
@@ -522,8 +563,8 @@ def check_transformers():
pkg_transformers = package_spec('transformers')
pkg_tokenizers = package_spec('tokenizers')
# target_commit = '753d61104116eefc8ffc977327b441ee0c8d599f' # transformers commit hash == 4.57.6
# target_commit = "aad13b87ed59f2afcfaebc985f403301887a35fc" # transformers commit hash == 5.3.0
target_commit = "380e3cc5d59912a48508cb6d4959a31cd460e12e" # transformers commit hash == 5.5.0.dev-0409
# target_commit = "380e3cc5d59912a48508cb6d4959a31cd460e12e" # transformers commit hash == 5.5.0.dev-0409
target_commit = "d242bb790bcbbe6c9a20e46cf9d70648739a90bf" # transformers commit hash == 5.13.0.dev0 == 06-15-2026
if args.use_directml:
target_transformers = '4.52.4'
target_tokenizers = '0.21.4'
@@ -533,25 +574,25 @@ def check_transformers():
target_tokenizers = '0.23.1'
if target_transformers is not None:
# Pinned release version (e.g. DirectML)
if (pkg_transformers is None) or ((pkg_transformers.version != target_transformers) or (pkg_tokenizers is None) or ((pkg_tokenizers.version != target_tokenizers) and (not args.experimental))):
if args.reinstall or (pkg_transformers is None) or ((pkg_transformers.version != target_transformers) or (pkg_tokenizers is None) or ((pkg_tokenizers.version != target_tokenizers) and (not args.experimental))):
if pkg_transformers is None:
log.info(f'Install: package="transformers" version={target_transformers}')
else:
log.info(f'Update: package="transformers" current={pkg_transformers.version} target={target_transformers}')
pip('uninstall --yes transformers', ignore=True, quiet=True, uv=False)
pip(f'install --upgrade tokenizers=={target_tokenizers}', ignore=False, quiet=True, uv=False)
pip(f'install --upgrade transformers=={target_transformers}', ignore=False, quiet=True, uv=False)
pip('uninstall --yes transformers', ignore=True, quiet=True)
pip(f'install --upgrade tokenizers=={target_tokenizers}', ignore=False, quiet=True)
pip(f'install --upgrade transformers=={target_transformers}', ignore=False, quiet=True)
else:
# Git commit-pinned version
current = opts.get('transformers_version', '')
if (pkg_transformers is None) or (pkg_transformers.version.startswith('4')) or (current != target_commit):
if args.reinstall or (pkg_transformers is None) or (pkg_transformers.version.startswith('4')) or (current != target_commit):
if pkg_transformers is None:
log.info(f'Install: package="transformers" commit={target_commit}')
else:
log.info(f'Update: package="transformers" current={pkg_transformers.version} hash={current} target={target_commit}')
pip('uninstall --yes transformers', ignore=True, quiet=True, uv=False)
pip(f'install --upgrade tokenizers=={target_tokenizers}', ignore=False, quiet=True, uv=False)
pip(f'install --upgrade git+https://github.com/huggingface/transformers@{target_commit}', ignore=False, quiet=True, uv=False)
pip('uninstall --yes transformers', ignore=True, quiet=True)
pip(f'install --upgrade tokenizers=={target_tokenizers}', ignore=False, quiet=True)
pip(f'install --upgrade git+https://github.com/huggingface/transformers@{target_commit}', ignore=False, quiet=True)
global transformers_commit # pylint: disable=global-statement
transformers_commit = target_commit
ts('transformers', t_start)
@@ -574,9 +615,9 @@ def install_cuda():
log.info('CUDA: nVidia toolkit detected')
ts('cuda', t_start)
if args.use_nightly:
cmd = os.environ.get('TORCH_COMMAND', '--upgrade --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu128 --extra-index-url https://download.pytorch.org/whl/nightly/cu130')
cmd = os.environ.get('TORCH_COMMAND', '--upgrade --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu132 --extra-index-url https://download.pytorch.org/whl/nightly/cu130')
else:
cmd = os.environ.get('TORCH_COMMAND', 'torch==2.11.0+cu130 torchvision==0.26.0+cu130 --index-url https://download.pytorch.org/whl/cu130')
cmd = os.environ.get('TORCH_COMMAND', 'torch==2.12.0+cu130 torchvision==0.27.0+cu130 --index-url https://download.pytorch.org/whl/cu130')
return cmd
@@ -667,9 +708,9 @@ def install_rocm_zluda():
torch_command = os.environ.get('TORCH_COMMAND', '--upgrade --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/rocm7.1')
else:
if rocm.version is None or float(rocm.version) >= 7.2: # assume the latest if version check fails
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.11.0+rocm7.2 torchvision==0.26.0+rocm7.2 --index-url https://download.pytorch.org/whl/rocm7.2')
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.12.0+rocm7.2 torchvision==0.27.0+rocm7.2 --index-url https://download.pytorch.org/whl/rocm7.2')
elif rocm.version == "7.1":
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.11.0+rocm7.1 torchvision==0.26.0+rocm7.1 --index-url https://download.pytorch.org/whl/rocm7.1')
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.12.0+rocm7.1 torchvision==0.27.0+rocm7.1 --index-url https://download.pytorch.org/whl/rocm7.1')
elif rocm.version == "7.0":
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.10.0+rocm7.0 torchvision==0.25.0+rocm7.0 --index-url https://download.pytorch.org/whl/rocm7.0')
elif rocm.version == "6.4":
@@ -705,9 +746,9 @@ def install_ipex():
args.use_ipex = True # pylint: disable=attribute-defined-outside-init
log.info('IPEX: Intel OneAPI toolkit detected')
if args.use_nightly:
torch_command = os.environ.get('TORCH_COMMAND', '--upgrade --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/xpu')
torch_command = os.environ.get('TORCH_COMMAND', '--upgrade --pre torch torchvision --extra-index-url https://download.pytorch.org/whl/nightly/xpu')
else:
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.11.0+xpu torchvision==0.26.0+xpu --index-url https://download.pytorch.org/whl/xpu')
torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.12.0+xpu torchvision==0.27.0+xpu --extra-index-url https://download.pytorch.org/whl/xpu')
ts('ipex', t_start)
return torch_command
@@ -1019,8 +1060,8 @@ def run_extension_installer(folder):
env = os.environ.copy()
env['PYTHONPATH'] = os.path.abspath(".")
if os.environ.get('PYTHONPATH', None) is not None:
seperator = ';' if sys.platform == 'win32' else ':'
env['PYTHONPATH'] += seperator + os.environ.get('PYTHONPATH', None)
separator = ';' if sys.platform == 'win32' else ':'
env['PYTHONPATH'] += separator + os.environ.get('PYTHONPATH', None)
result, txt = run(sys.executable, path_installer, env=env, cwd=folder)
debug(f'Extension installer: file="{path_installer}" {result.stdout}')
if result.returncode != 0:
@@ -1139,7 +1180,10 @@ def install_submodules(force=True):
res = []
for submodule in submodules:
try:
name = submodule.split()[1].strip()
parts = submodule.split()
if len(parts) < 2:
continue
name = parts[1].strip()
if args.upgrade:
res.append(update(name))
else:
@@ -1185,26 +1229,26 @@ def install_gradio():
def install_compel():
if installed('compel', quiet=True):
return
install("compel==2.3.1", no_deps=True)
install("compel==2.4.0", no_deps=True)
def install_pydantic():
install('pydantic==2.12.5', ignore=True, quiet=True)
reload('pydantic', '2.12.5')
install('pydantic==2.13.4', ignore=True, quiet=True)
reload('pydantic', '2.13.4')
def install_scipy():
if args.new or (sys.version_info >= (3, 14)):
install('scipy==1.17.0', ignore=True, quiet=True)
install('scipy==1.17.1', ignore=True, quiet=True)
else:
install('scipy==1.14.1', ignore=True, quiet=True)
def install_opencv():
install('opencv-python==4.12.0.88', ignore=True, quiet=True)
install('opencv-python-headless==4.12.0.88', ignore=True, quiet=True)
install('opencv-contrib-python==4.12.0.88', ignore=True, quiet=True)
install('opencv-contrib-python-headless==4.12.0.88', ignore=True, quiet=True)
install('opencv-python==4.13.0.92', ignore=True, quiet=True)
install('opencv-python-headless==4.13.0.92', ignore=True, quiet=True)
install('opencv-contrib-python==4.13.0.92', ignore=True, quiet=True)
install('opencv-contrib-python-headless==4.13.0.92', ignore=True, quiet=True)
def install_insightface():
@@ -1241,7 +1285,7 @@ def install_optional():
install('hf_xet', ignore=True, quiet=True)
install('nvidia-ml-py', ignore=True, quiet=True)
install('pillow-jxl-plugin==1.3.7', ignore=True, quiet=True)
install('ultralytics==8.3.40', ignore=True, quiet=True)
install('ultralytics==8.4.67', ignore=True, quiet=True)
install('open-clip-torch', no_deps=True, quiet=True)
install('git+https://github.com/tencent-ailab/IP-Adapter.git', 'ip_adapter', ignore=True, quiet=True)
# install('git+https://github.com/openai/CLIP.git', 'clip', quiet=True, no_build_isolation=True)
@@ -1285,7 +1329,7 @@ def install_requirements():
ts('requirements', t_start)
# set environment variables controling the behavior of various libraries
# set environment variables controlling the behavior of various libraries
def set_environment():
log.debug('Setting environment tuning')
os.environ.setdefault('ACCELERATE', 'True')
@@ -1489,6 +1533,8 @@ def check_venv():
import site
pkg_path = [try_relpath(p) for p in site.getsitepackages() if os.path.exists(p)]
log.debug(f'Packages: prefix={try_relpath(sys.prefix)} site={pkg_path}')
if args.uv:
uv_info()
for p in pkg_path:
invalid = []
for f in os.listdir(p):
@@ -1790,12 +1836,18 @@ def read_options():
def ensure_base_requirements():
t_start = time.time()
setuptools_version = '69.5.1'
if (args.uv or '--uv' in sys.argv) and (shutil.which('uv') is not None): # early enable uv
args.uv = True # pylint: disable=attribute-defined-outside-init
uv_info()
def update_setuptools():
local_log = logging.getLogger('sdnext.installer')
global setuptools, distutils # pylint: disable=global-statement
# python may ship with incompatible setuptools
subprocess.run(f'"{sys.executable}" -m pip install setuptools=={setuptools_version}', shell=True, check=False, env=os.environ, capture_output=True)
if args.uv:
subprocess.run(f'uv pip install setuptools=={setuptools_version} wheel', shell=True, check=False, env=os.environ, capture_output=True)
else:
subprocess.run(f'"{sys.executable}" -m pip install setuptools=={setuptools_version} wheel', shell=True, check=False, env=os.environ, capture_output=True)
# need to delete all references to modules to be able to reload them otherwise python will use cached version
modules = [m for m in sys.modules if m.startswith('setuptools') or m.startswith('distutils')]
for m in modules:
@@ -1824,20 +1876,21 @@ def ensure_base_requirements():
try:
global setuptools # pylint: disable=global-statement
import wheel # pylint: disable=unused-import
import setuptools # pylint: disable=redefined-outer-name
if setuptools.__version__ != setuptools_version:
update_setuptools()
except ImportError:
update_setuptools()
# used by installler itself so must be installed before requirements
install('rich==14.1.0', 'rich', quiet=True)
# used by installer itself so must be installed before requirements
install('rich==15.0.0', 'rich', quiet=True)
install('psutil', 'psutil', quiet=True)
install('requests==2.32.3', 'requests', quiet=True)
ts('base', t_start)
# startup
# startup
ensure_base_requirements()
from modules.logger import setup_logging # must be loaded after ensure_base_requirements
from modules.logger import log as log_instance
-34
View File
@@ -1,34 +0,0 @@
let user;
let token;
async function getToken() {
if (token === undefined || user === undefined) {
const res = await fetch(`${window.subpath}/token`);
if (res.ok) {
const data = await res.json();
user = data.user;
token = data.token;
log('getToken', user);
}
}
return { user, token };
}
async function authFetch(url, options = {}) {
await getToken();
if (user && token) {
if (!options.headers) options.headers = {};
const encoded = btoa(`${user}:${token}`);
options.headers.Authorization = `Basic ${encoded}`;
}
let res;
try {
res = await fetch(url, options);
if (!res.ok) error('fetch', { status: res?.status || 503, url, user, token });
} catch (err) {
if (ConnectionMonitorState.online) {
error('fetch', { status: res?.status || 503, url, user, token, error: err });
}
}
return res;
}
-24
View File
@@ -1,24 +0,0 @@
let lastGitHubSearch = '';
let lastDocsSearch = '';
async function clickGitHubWikiPage(page) {
log(`clickGitHubWikiPage: page="${page}"`);
lastGitHubSearch = page;
const el = gradioApp().getElementById('github_md_btn');
if (el) el.click();
}
function getGitHubWikiPage() {
return lastGitHubSearch;
}
async function clickDocsPage(page) {
log(`clickDocsPage: page="${page}"`);
lastDocsSearch = page;
const el = gradioApp().getElementById('docs_md_btn');
if (el) el.click();
}
function getDocsPage() {
return lastDocsSearch;
}
File diff suppressed because one or more lines are too long
-53
View File
@@ -1,53 +0,0 @@
function extensions_apply(extensions_disabled_list, extensions_update_list, disable_all) {
const disable = [];
const update = [];
gradioApp().querySelectorAll('#extensions input[type="checkbox"]').forEach((x) => {
if (x.name.startsWith('enable_') && !x.checked) disable.push(x.name.substring(7));
if (x.name.startsWith('update_') && x.checked) update.push(x.name.substring(7));
});
restartReload();
log('Extensions apply:', { disable, update });
return [JSON.stringify(disable), JSON.stringify(update), disable_all];
}
function extensions_check(info, extensions_disabled_list, search_text, sort_column) {
const disable = [];
gradioApp().querySelectorAll('#extensions input[type="checkbox"]').forEach((x) => {
if (x.name.startsWith('enable_') && !x.checked) disable.push(x.name.substring(7));
});
const id = randomId();
log('Extensions check:', { disable });
return [id, JSON.stringify(disable), search_text, sort_column];
}
function install_extension(button, url) {
button.disabled = 'disabled';
button.value = 'Installing...';
button.innerHTML = 'installing';
const textarea = gradioApp().querySelector('#extension_to_install textarea');
textarea.value = url;
updateInput(textarea);
log('Extension install:', { url });
gradioApp().querySelector('#install_extension_button').click();
}
function uninstall_extension(button, url) {
button.disabled = 'disabled';
button.value = 'Uninstalling...';
button.innerHTML = 'uninstalling';
const textarea = gradioApp().querySelector('#extension_to_install textarea');
textarea.value = url;
updateInput(textarea);
log('Extension uninstall:', { url });
gradioApp().querySelector('#uninstall_extension_button').click();
}
function update_extension(button, url) {
button.value = 'Updating...';
button.innerHTML = 'updating';
const textarea = gradioApp().querySelector('#extension_to_install textarea');
textarea.value = url;
updateInput(textarea);
log('Extension update:', { url });
gradioApp().querySelector('#update_extension_button').click();
}
-44
View File
@@ -1,44 +0,0 @@
// attaches listeners to the txt2img and img2img galleries to update displayed generation param text when the image changes
function attachGalleryListeners(tabName) {
const gallery = gradioApp().querySelector(`#${tabName}_gallery`);
if (!gallery) return null;
gallery.addEventListener('click', () => {
// log('galleryItemSelected:', tabName);
const btn = gradioApp().getElementById(`${tabName}_generation_info_button`);
if (btn) btn.click();
});
gallery?.addEventListener('keydown', (e) => {
if (e.keyCode === 37 || e.keyCode === 39) gradioApp().getElementById(`${tabName}_generation_info_button`).click(); // left or right arrow
});
return gallery;
}
let txt2img_gallery;
let img2img_gallery;
let control_gallery;
let modal;
async function initiGenerationParams() {
const t0 = performance.now();
if (!modal) modal = gradioApp().getElementById('lightboxModal');
if (!modal) return;
const modalObserver = new MutationObserver((mutations) => {
mutations.forEach((mutationRecord) => {
const tabName = getENActiveTab();
if (mutationRecord.target.style.display === 'none') {
const btn = gradioApp().getElementById(`${tabName}_generation_info_button`);
if (btn) btn.click();
}
});
});
if (!txt2img_gallery) txt2img_gallery = attachGalleryListeners('txt2img');
if (!img2img_gallery) img2img_gallery = attachGalleryListeners('img2img');
if (!control_gallery) control_gallery = attachGalleryListeners('control');
modalObserver.observe(modal, { attributes: true, attributeFilter: ['style'] });
const t1 = performance.now();
log('initGenerationParams', Math.round(t1 - t0));
timer('initGenerationParams', t1 - t0);
}
-10
View File
@@ -1,10 +0,0 @@
function onCalcResolutionHires(width, height, hr_scale, hr_resize_x, hr_resize_y, hr_upscaler) {
const setInactive = (elem, inactive) => elem.classList.toggle('inactive', !!inactive);
const hrUpscaleBy = gradioApp().getElementById('txt2img_hr_scale');
const hrResizeX = gradioApp().getElementById('txt2img_hr_resize_x');
const hrResizeY = gradioApp().getElementById('txt2img_hr_resize_y');
setInactive(hrUpscaleBy, hr_resize_x > 0 || hr_resize_y > 0);
setInactive(hrResizeX, hr_resize_x === 0);
setInactive(hrResizeY, hr_resize_y === 0);
return [width, height, hr_scale, hr_resize_x, hr_resize_y, hr_upscaler];
}
File diff suppressed because one or more lines are too long
-2
View File
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
-408
View File
@@ -1,408 +0,0 @@
// SHA-256 (+ HMAC and PBKDF2) for JavaScript.
//
// Written in 2014-2016 by Dmitry Chestnykh.
// Public domain, no warranty.
//
// Functions (accept and return Uint8Arrays):
//
// sha256(message) -> hash
// sha256.hmac(key, message) -> mac
// sha256.pbkdf2(password, salt, rounds, dkLen) -> dk
//
// Classes:
//
// new sha256.Hash()
// new sha256.HMAC(key)
//
const digestLength = 32;
const blockSize = 64;
// SHA-256 constants
var K = new Uint32Array([
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b,
0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01,
0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7,
0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152,
0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,
0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc,
0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819,
0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08,
0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f,
0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
]);
function hashBlocks(w, v, p, pos, len) {
var a, b, c, d, e, f, g, h, u, i, j, t1, t2;
while (len >= 64) {
a = v[0];
b = v[1];
c = v[2];
d = v[3];
e = v[4];
f = v[5];
g = v[6];
h = v[7];
for (i = 0; i < 16; i++) {
j = pos + i * 4;
w[i] = (((p[j] & 0xff) << 24) | ((p[j + 1] & 0xff) << 16) |
((p[j + 2] & 0xff) << 8) | (p[j + 3] & 0xff));
}
for (i = 16; i < 64; i++) {
u = w[i - 2];
t1 = (u >>> 17 | u << (32 - 17)) ^ (u >>> 19 | u << (32 - 19)) ^ (u >>> 10);
u = w[i - 15];
t2 = (u >>> 7 | u << (32 - 7)) ^ (u >>> 18 | u << (32 - 18)) ^ (u >>> 3);
w[i] = (t1 + w[i - 7] | 0) + (t2 + w[i - 16] | 0);
}
for (i = 0; i < 64; i++) {
t1 = (((((e >>> 6 | e << (32 - 6)) ^ (e >>> 11 | e << (32 - 11)) ^
(e >>> 25 | e << (32 - 25))) + ((e & f) ^ (~e & g))) | 0) +
((h + ((K[i] + w[i]) | 0)) | 0)) | 0;
t2 = (((a >>> 2 | a << (32 - 2)) ^ (a >>> 13 | a << (32 - 13)) ^
(a >>> 22 | a << (32 - 22))) + ((a & b) ^ (a & c) ^ (b & c))) | 0;
h = g;
g = f;
f = e;
e = (d + t1) | 0;
d = c;
c = b;
b = a;
a = (t1 + t2) | 0;
}
v[0] += a;
v[1] += b;
v[2] += c;
v[3] += d;
v[4] += e;
v[5] += f;
v[6] += g;
v[7] += h;
pos += 64;
len -= 64;
}
return pos;
}
// Hash implements SHA256 hash algorithm.
var Hash = /** @class */ (function () {
function Hash() {
this.digestLength = digestLength;
this.blockSize = blockSize;
// Note: Int32Array is used instead of Uint32Array for performance reasons.
this.state = new Int32Array(8); // hash state
this.temp = new Int32Array(64); // temporary state
this.buffer = new Uint8Array(128); // buffer for data to hash
this.bufferLength = 0; // number of bytes in buffer
this.bytesHashed = 0; // number of total bytes hashed
this.finished = false; // indicates whether the hash was finalized
this.reset();
}
// Resets hash state making it possible
// to re-use this instance to hash other data.
Hash.prototype.reset = function () {
this.state[0] = 0x6a09e667;
this.state[1] = 0xbb67ae85;
this.state[2] = 0x3c6ef372;
this.state[3] = 0xa54ff53a;
this.state[4] = 0x510e527f;
this.state[5] = 0x9b05688c;
this.state[6] = 0x1f83d9ab;
this.state[7] = 0x5be0cd19;
this.bufferLength = 0;
this.bytesHashed = 0;
this.finished = false;
return this;
};
// Cleans internal buffers and re-initializes hash state.
Hash.prototype.clean = function () {
for (var i = 0; i < this.buffer.length; i++) {
this.buffer[i] = 0;
}
for (var i = 0; i < this.temp.length; i++) {
this.temp[i] = 0;
}
this.reset();
};
// Updates hash state with the given data.
//
// Optionally, length of the data can be specified to hash
// fewer bytes than data.length.
//
// Throws error when trying to update already finalized hash:
// instance must be reset to use it again.
Hash.prototype.update = function (data, dataLength) {
if (dataLength === void 0) { dataLength = data.length; }
if (this.finished) {
throw new Error("SHA256: can't update because hash was finished.");
}
var dataPos = 0;
this.bytesHashed += dataLength;
if (this.bufferLength > 0) {
while (this.bufferLength < 64 && dataLength > 0) {
this.buffer[this.bufferLength++] = data[dataPos++];
dataLength--;
}
if (this.bufferLength === 64) {
hashBlocks(this.temp, this.state, this.buffer, 0, 64);
this.bufferLength = 0;
}
}
if (dataLength >= 64) {
dataPos = hashBlocks(this.temp, this.state, data, dataPos, dataLength);
dataLength %= 64;
}
while (dataLength > 0) {
this.buffer[this.bufferLength++] = data[dataPos++];
dataLength--;
}
return this;
};
// Finalizes hash state and puts hash into out.
//
// If hash was already finalized, puts the same value.
Hash.prototype.finish = function (out) {
if (!this.finished) {
var bytesHashed = this.bytesHashed;
var left = this.bufferLength;
var bitLenHi = (bytesHashed / 0x20000000) | 0;
var bitLenLo = bytesHashed << 3;
var padLength = (bytesHashed % 64 < 56) ? 64 : 128;
this.buffer[left] = 0x80;
for (var i = left + 1; i < padLength - 8; i++) {
this.buffer[i] = 0;
}
this.buffer[padLength - 8] = (bitLenHi >>> 24) & 0xff;
this.buffer[padLength - 7] = (bitLenHi >>> 16) & 0xff;
this.buffer[padLength - 6] = (bitLenHi >>> 8) & 0xff;
this.buffer[padLength - 5] = (bitLenHi >>> 0) & 0xff;
this.buffer[padLength - 4] = (bitLenLo >>> 24) & 0xff;
this.buffer[padLength - 3] = (bitLenLo >>> 16) & 0xff;
this.buffer[padLength - 2] = (bitLenLo >>> 8) & 0xff;
this.buffer[padLength - 1] = (bitLenLo >>> 0) & 0xff;
hashBlocks(this.temp, this.state, this.buffer, 0, padLength);
this.finished = true;
}
for (var i = 0; i < 8; i++) {
out[i * 4 + 0] = (this.state[i] >>> 24) & 0xff;
out[i * 4 + 1] = (this.state[i] >>> 16) & 0xff;
out[i * 4 + 2] = (this.state[i] >>> 8) & 0xff;
out[i * 4 + 3] = (this.state[i] >>> 0) & 0xff;
}
return this;
};
// Returns the final hash digest.
Hash.prototype.digest = function () {
var out = new Uint8Array(this.digestLength);
this.finish(out);
return out;
};
// Internal function for use in HMAC for optimization.
Hash.prototype._saveState = function (out) {
for (var i = 0; i < this.state.length; i++) {
out[i] = this.state[i];
}
};
// Internal function for use in HMAC for optimization.
Hash.prototype._restoreState = function (from, bytesHashed) {
for (var i = 0; i < this.state.length; i++) {
this.state[i] = from[i];
}
this.bytesHashed = bytesHashed;
this.finished = false;
this.bufferLength = 0;
};
return Hash;
}());
window.Hash = Hash;
// HMAC implements HMAC-SHA256 message authentication algorithm.
var HMAC = /** @class */ (function () {
function HMAC(key) {
this.inner = new Hash();
this.outer = new Hash();
this.blockSize = this.inner.blockSize;
this.digestLength = this.inner.digestLength;
var pad = new Uint8Array(this.blockSize);
if (key.length > this.blockSize) {
(new Hash()).update(key).finish(pad).clean();
}
else {
for (var i = 0; i < key.length; i++) {
pad[i] = key[i];
}
}
for (var i = 0; i < pad.length; i++) {
pad[i] ^= 0x36;
}
this.inner.update(pad);
for (var i = 0; i < pad.length; i++) {
pad[i] ^= 0x36 ^ 0x5c;
}
this.outer.update(pad);
this.istate = new Uint32Array(8);
this.ostate = new Uint32Array(8);
this.inner._saveState(this.istate);
this.outer._saveState(this.ostate);
for (var i = 0; i < pad.length; i++) {
pad[i] = 0;
}
}
// Returns HMAC state to the state initialized with key
// to make it possible to run HMAC over the other data with the same
// key without creating a new instance.
HMAC.prototype.reset = function () {
this.inner._restoreState(this.istate, this.inner.blockSize);
this.outer._restoreState(this.ostate, this.outer.blockSize);
return this;
};
// Cleans HMAC state.
HMAC.prototype.clean = function () {
for (var i = 0; i < this.istate.length; i++) {
this.ostate[i] = this.istate[i] = 0;
}
this.inner.clean();
this.outer.clean();
};
// Updates state with provided data.
HMAC.prototype.update = function (data) {
this.inner.update(data);
return this;
};
// Finalizes HMAC and puts the result in out.
HMAC.prototype.finish = function (out) {
if (this.outer.finished) {
this.outer.finish(out);
}
else {
this.inner.finish(out);
this.outer.update(out, this.digestLength).finish(out);
}
return this;
};
// Returns message authentication code.
HMAC.prototype.digest = function () {
var out = new Uint8Array(this.digestLength);
this.finish(out);
return out;
};
return HMAC;
}());
window.HMAC = HMAC;
// Returns SHA256 hash of data.
function hash(data) {
var h = (new Hash()).update(data);
var digest = h.digest();
h.clean();
return digest;
}
window.hash = hash;
// Function hash is both available as module.hash and as default export.
// Returns HMAC-SHA256 of data under the key.
function hmac(key, data) {
var h = (new HMAC(key)).update(data);
var digest = h.digest();
h.clean();
return digest;
}
window.hmac = hmac;
// Fills hkdf buffer like this:
// T(1) = HMAC-Hash(PRK, T(0) | info | 0x01)
function fillBuffer(buffer, hmac, info, counter) {
// Counter is a byte value: check if it overflowed.
var num = counter[0];
if (num === 0) {
throw new Error("hkdf: cannot expand more");
}
// Prepare HMAC instance for new data with old key.
hmac.reset();
// Hash in previous output if it was generated
// (i.e. counter is greater than 1).
if (num > 1) {
hmac.update(buffer);
}
// Hash in info if it exists.
if (info) {
hmac.update(info);
}
// Hash in the counter.
hmac.update(counter);
// Output result to buffer and clean HMAC instance.
hmac.finish(buffer);
// Increment counter inside typed array, this works properly.
counter[0]++;
}
var hkdfSalt = new Uint8Array(digestLength); // Filled with zeroes.
function hkdf(key, salt, info, length) {
if (salt === void 0) { salt = hkdfSalt; }
if (length === void 0) { length = 32; }
var counter = new Uint8Array([1]);
// HKDF-Extract uses salt as HMAC key, and key as data.
var okm = hmac(salt, key);
// Initialize HMAC for expanding with extracted key.
// Ensure no collisions with `hmac` function.
var hmac_ = new HMAC(okm);
// Allocate buffer.
var buffer = new Uint8Array(hmac_.digestLength);
var bufpos = buffer.length;
var out = new Uint8Array(length);
for (var i = 0; i < length; i++) {
if (bufpos === buffer.length) {
fillBuffer(buffer, hmac_, info, counter);
bufpos = 0;
}
out[i] = buffer[bufpos++];
}
hmac_.clean();
buffer.fill(0);
counter.fill(0);
return out;
}
window.hkdf = hkdf;
// Derives a key from password and salt using PBKDF2-HMAC-SHA256
// with the given number of iterations.
//
// The number of bytes returned is equal to dkLen.
//
// (For better security, avoid dkLen greater than hash length - 32 bytes).
function pbkdf2(password, salt, iterations, dkLen) {
var prf = new HMAC(password);
var len = prf.digestLength;
var ctr = new Uint8Array(4);
var t = new Uint8Array(len);
var u = new Uint8Array(len);
var dk = new Uint8Array(dkLen);
for (var i = 0; i * len < dkLen; i++) {
var c = i + 1;
ctr[0] = (c >>> 24) & 0xff;
ctr[1] = (c >>> 16) & 0xff;
ctr[2] = (c >>> 8) & 0xff;
ctr[3] = (c >>> 0) & 0xff;
prf.reset();
prf.update(salt);
prf.update(ctr);
prf.finish(u);
for (var j = 0; j < len; j++) {
t[j] = u[j];
}
for (var j = 2; j <= iterations; j++) {
prf.reset();
prf.update(u).finish(u);
for (var k = 0; k < len; k++) {
t[k] ^= u[k];
}
}
for (var j = 0; j < len && i * len + j < dkLen; j++) {
dk[i * len + j] = t[j];
}
}
for (var i = 0; i < len; i++) {
t[i] = u[i] = 0;
}
for (var i = 0; i < 4; i++) {
ctr[i] = 0;
}
prf.clean();
return dk;
}
window.pbkdf2 = pbkdf2;
File diff suppressed because one or more lines are too long
-104
View File
@@ -1,104 +0,0 @@
/* eslint-disable no-undef */
window.api = '/sdapi/v1';
window.subpath = '';
const startupPromises = [];
async function waitForOpts() {
// make sure all of the ui is ready and options are loaded
const t0 = performance.now();
let t1 = performance.now();
while (true) {
if (t1 - t0 > 120000) {
log('waitForOpts timeout');
break;
}
if (window.opts && Object.keys(window.opts).length > 0) {
ok = window.opts.theme_type === 'Modern' ? 'uiux_separator_appearance' in window.opts : true;
if (ok) {
log('waitForOpts', Math.round(t1 - t0));
timer('waitForOpts', t1 - t0);
break;
}
}
await sleep(100);
t1 = performance.now();
}
}
async function postStartup() {
log('postStartup');
// if (window.gradioObserver) window.gradioObserver.disconnect();
if (window.hintsObserver) window.hintsObserver.disconnect();
logTimers();
}
async function initStartup() {
const t0 = performance.now();
log('initGradio', Math.round(t0 - appStartTime));
timer('initGradio', t0 - appStartTime);
log('initUi');
if (window.setupLogger) await setupLogger();
// all items here are non-blocking async calls
startupPromises.push(initModels());
startupPromises.push(getUIDefaults());
startupPromises.push(initPromptChecker());
startupPromises.push(initContextMenu());
startupPromises.push(initDragDrop());
startupPromises.push(initAccordions());
startupPromises.push(initSettings());
startupPromises.push(initImageViewer());
startupPromises.push(initGallery());
startupPromises.push(initiGenerationParams());
startupPromises.push(initChangelog());
startupPromises.push(setupControlUI());
// reconnect server session
await reconnectUI();
await waitForOpts();
log('mountURL', window.opts.subpath);
if (window.opts.subpath?.length > 0) {
window.subpath = window.opts.subpath;
window.api = `${window.subpath}/sdapi/v1`;
}
executeCallbacks(uiReadyCallbacks);
// optinally wait for modern ui
if (window.waitForUiReady) await waitForUiReady();
// post startup tasks that may take longer but are not critical
startupPromises.push(initGallery());
startupPromises.push(setRefreshInterval());
startupPromises.push(setupExtraNetworks());
startupPromises.push(initAutocomplete());
startupPromises.push(monitorConnection());
startupPromises.push(showNetworks());
startupPromises.push(setHints());
startupPromises.push(applyStyles());
startupPromises.push(initIndexDB());
startupPromises.push(initLogMonitor());
startupPromises.push(initTableSorter());
t1 = performance.now();
log('initStartup', Math.round(1000 * (t1 - t0) / 1000000));
removeSplash();
await Promise.all(startupPromises);
t2 = performance.now();
log('initComplete', Math.round(1000 * (t2 - t0) / 1000000));
postStartup();
}
onUiLoaded(initStartup);
onUiReady(() => log('uiReady'));
// onAfterUiUpdate(() => log('evt onAfterUiUpdate'));
// onUiLoaded(() => log('evt onUiLoaded'));
// onOptionsChanged(() => log('evt onOptionsChanged'));
// onUiTabChange(() => log('evt onUiTabChange'));
// onUiUpdate(() => log('evt onUiUpdate'));
-9
View File
@@ -1,9 +0,0 @@
function startTrainMonitor() {
gradioApp().querySelector('#train_error').innerHTML = '';
const id = randomId();
const onProgress = (progress) => { gradioApp().getElementById('train_progress').innerHTML = progress.textinfo; };
requestProgress(id, gradioApp().getElementById('train_gallery'), null, onProgress, false);
const res = Array.from(arguments);
res[0] = id;
return res;
}
-21
View File
@@ -1,21 +0,0 @@
function uiOpenSubmenus() {
const accordions = Array.from(gradioApp().querySelectorAll('.gradio-accordion'));
const states = {};
accordions.forEach((el) => {
const name = el.querySelector('.label-wrap > span:not(.icon)').innerText.trim();
const children = Array.from(el.childNodes);
const open = children.filter((c) => c.style?.display === 'block');
if (states[name] === undefined) states[name] = open.length > 0;
});
return states;
}
async function getUIDefaults() {
const btn = gradioApp().getElementById('ui_defaults_view');
if (!btn) return;
const intersectionObserver = new IntersectionObserver((entries) => {
if (entries[0].intersectionRatio <= 0) { /* Pass */ }
if (entries[0].intersectionRatio > 0) btn.click();
});
intersectionObserver.observe(btn); // monitor visibility of tab
}
+8 -9
View File
@@ -5,6 +5,7 @@ import os
import sys
import time
import shlex
import shutil
import subprocess
import installer
@@ -61,7 +62,8 @@ def get_custom_args():
current = getattr(args, arg)
if current != default:
custom[arg] = getattr(args, arg)
log.info(f'Command line args: {sys.argv[1:]} {installer.print_dict(custom)}')
log.info(f'Command line args: {sys.argv[1:]}')
log.info(f'Command line parsed: {installer.print_dict(custom)}')
if os.environ.get('SD_ENV_DEBUG', None) is not None:
env = os.environ.copy()
if 'PATH' in env:
@@ -213,14 +215,11 @@ def start_server(immediate=True, server=None):
uvicorn = None
if args.test:
log.info("Test only")
log.critical('Logging: level=critical')
log.error('Logging: level=error')
log.warning('Logging: level=warning')
log.info('Logging: level=info')
log.debug('Logging: level=debug')
log.trace('Logging: level=trace')
from pipelines.generic_test import test_pipelines
test_pipelines()
log.info("Test only: exiting...")
server.wants_restart = False
uvicorn = server.webui(restart=not immediate, _exit=True)
else:
uvicorn = server.webui(restart=not immediate)
if args.profile:
@@ -255,7 +254,7 @@ def main():
log.info(f'Args: {sys.argv[1:]}')
if not args.skip_env and not args.skip_all:
installer.set_environment()
if args.uv:
if args.uv and shutil.which('uv') is None:
installer.install('uv', 'uv')
installer.install_gradio()
installer.check_torch()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

+14 -13
View File
@@ -17,12 +17,12 @@ class Api:
self.credentials = {}
if shared.cmd_opts.auth:
for auth in shared.cmd_opts.auth.split(","):
user, password = auth.split(":")
user, password = auth.split(":", 1)
self.credentials[user.replace('"', '').strip()] = password.replace('"', '').strip()
if shared.cmd_opts.auth_file:
with open(shared.cmd_opts.auth_file, encoding="utf8") as file:
for line in file.readlines():
user, password = line.split(":")
user, password = line.split(":", 1)
self.credentials[user.replace('"', '').strip()] = password.replace('"', '').strip()
self.router = APIRouter()
if shared.cmd_opts.docs:
@@ -44,7 +44,7 @@ class Api:
# server api
self.add_api_route("/sdapi/v1/motd", server.get_motd, methods=["GET"], response_model=str)
self.add_api_route("/sdapi/v1/log", server.get_log, methods=["GET"], response_model=list[str])
self.add_api_route("/sdapi/v1/log", server.post_log, methods=["POST"])
self.add_api_route("/sdapi/v1/log", server.post_log, methods=["POST"], status_code=204)
self.add_api_route("/sdapi/v1/start", self.get_session_start, methods=["GET"])
self.add_api_route("/sdapi/v1/version", server.get_version, methods=["GET"])
self.add_api_route("/sdapi/v1/torch", server.get_torch, methods=["GET"])
@@ -52,9 +52,9 @@ class Api:
self.add_api_route("/sdapi/v1/platform", server.get_platform, methods=["GET"])
self.add_api_route("/sdapi/v1/progress", server.get_progress, methods=["GET"], response_model=models.ResProgress)
self.add_api_route("/sdapi/v1/history", server.get_history, methods=["GET"], response_model=list[models.ResHistory])
self.add_api_route("/sdapi/v1/interrupt", server.post_interrupt, methods=["POST"])
self.add_api_route("/sdapi/v1/skip", server.post_skip, methods=["POST"])
self.add_api_route("/sdapi/v1/shutdown", server.post_shutdown, methods=["POST"])
self.add_api_route("/sdapi/v1/interrupt", server.post_interrupt, methods=["POST"], status_code=204)
self.add_api_route("/sdapi/v1/skip", server.post_skip, methods=["POST"], status_code=204)
self.add_api_route("/sdapi/v1/shutdown", server.post_shutdown, methods=["POST"], status_code=204)
self.add_api_route("/sdapi/v1/memory", server.get_memory, methods=["GET"], response_model=models.ResMemory)
self.add_api_route("/sdapi/v1/cmd-flags", server.get_cmd_flags, methods=["GET"], response_model=models.FlagsModel)
self.add_api_route("/sdapi/v1/gpu", gpu.get_gpu, methods=["GET"])
@@ -69,6 +69,7 @@ class Api:
self.add_api_route("/sdapi/v1/preprocess", self.process.post_preprocess, methods=["POST"], tags=["Processing"])
self.add_api_route("/sdapi/v1/mask", self.process.post_mask, methods=["POST"], tags=["Processing"])
self.add_api_route("/sdapi/v1/detect", self.process.post_detect, methods=["POST"], tags=["Processing"])
self.add_api_route("/sdapi/v1/detail", self.process.post_detail, methods=["POST"], response_model=models.ResDetail, tags=["Processing"])
self.add_api_route("/sdapi/v1/prompt-enhance", self.process.post_prompt_enhance, methods=["POST"], response_model=models.ResPromptEnhance, tags=["Generation"])
# api dealing with optional scripts
@@ -100,12 +101,12 @@ class Api:
self.add_api_route("/sdapi/v1/png-info", endpoints.post_pnginfo, methods=["POST"], response_model=models.ResImageInfo, tags=["Functional"])
self.add_api_route("/sdapi/v1/checkpoint", endpoints.get_checkpoint, methods=["GET"], tags=["Functional"])
self.add_api_route("/sdapi/v1/checkpoint", endpoints.set_checkpoint, methods=["POST"], tags=["Functional"])
self.add_api_route("/sdapi/v1/refresh-checkpoints", endpoints.post_refresh_checkpoints, methods=["POST"], tags=["Functional"])
self.add_api_route("/sdapi/v1/unload-checkpoint", endpoints.post_unload_checkpoint, methods=["POST"], tags=["Functional"])
self.add_api_route("/sdapi/v1/reload-checkpoint", endpoints.post_reload_checkpoint, methods=["POST"], tags=["Functional"])
self.add_api_route("/sdapi/v1/lock-checkpoint", endpoints.post_lock_checkpoint, methods=["POST"], tags=["Functional"])
self.add_api_route("/sdapi/v1/refresh-vae", endpoints.post_refresh_vae, methods=["POST"], tags=["Functional"])
self.add_api_route("/sdapi/v1/refresh-unets", endpoints.post_refresh_unets, methods=["POST"], tags=["Functional"])
self.add_api_route("/sdapi/v1/refresh-checkpoints", endpoints.post_refresh_checkpoints, methods=["POST"], status_code=204, tags=["Functional"])
self.add_api_route("/sdapi/v1/unload-checkpoint", endpoints.post_unload_checkpoint, methods=["POST"], status_code=204, tags=["Functional"])
self.add_api_route("/sdapi/v1/reload-checkpoint", endpoints.post_reload_checkpoint, methods=["POST"], status_code=204, tags=["Functional"])
self.add_api_route("/sdapi/v1/lock-checkpoint", endpoints.post_lock_checkpoint, methods=["POST"], status_code=204, tags=["Functional"])
self.add_api_route("/sdapi/v1/refresh-vae", endpoints.post_refresh_vae, methods=["POST"], status_code=204, tags=["Functional"])
self.add_api_route("/sdapi/v1/refresh-unets", endpoints.post_refresh_unets, methods=["POST"], status_code=204, tags=["Functional"])
self.add_api_route("/sdapi/v1/latents", endpoints.get_latent_history, methods=["GET"], response_model=list[str], tags=["Functional"])
self.add_api_route("/sdapi/v1/latents", endpoints.post_latent_history, methods=["POST"], response_model=int, tags=["Functional"])
self.add_api_route("/sdapi/v1/modules", endpoints.get_modules, methods=["GET"], tags=["Functional"])
@@ -130,7 +131,7 @@ class Api:
# gallery api
from modules.api import gallery
gallery.register_api(self.app)
gallery.register_api(self)
# nudenet api
from modules.api import nudenet
+64 -8
View File
@@ -8,7 +8,7 @@ Provides three specialized backends and one unified dispatch endpoint:
- POST /sdapi/v1/vqa Vision-Language Models (Qwen, Gemma, Florence, Moondream, etc.)
**Dispatch endpoint** (discriminated union routed by ``backend`` field):
- POST /sdapi/v1/caption Routes to any backend via ``backend: "openclip" | "tagger" | "vlm"``
- POST /sdapi/v1/caption Routes to any backend via ``backend: "openclip" | "tagger" | "vlm" | "analyze"``
**Discovery endpoints** (GET, no request body):
- GET /sdapi/v1/openclip List available OpenCLIP models
@@ -22,7 +22,7 @@ The dispatch endpoint uses a discriminated union (ReqCaptionDispatch) and a supe
response model (ResCaptionDispatch) that includes fields from all backends.
Core processing logic is shared between direct and dispatch handlers via
``do_openclip``, ``do_tagger``, and ``do_vqa`` functions to avoid duplication.
``do_openclip``, ``do_tagger``, and ``do_caption`` functions to avoid duplication.
"""
import threading
@@ -212,9 +212,13 @@ class ReqCaptionVLM(BaseModel):
keep_prefill: bool | None = Field(default=None, title="Keep Prefill", description="Keep prefill text in final output.")
class ReqCaptionAnalyze(ReqCaptionVLM):
backend: Literal["analyze"] = Field(..., description="Backend selector. Use 'analyze' for detailed image analysis using VLM.")
# Discriminated union for the dispatch endpoint
ReqCaptionDispatch = Annotated[
ReqCaptionOpenCLIP | ReqCaptionTagger | ReqCaptionVLM,
ReqCaptionOpenCLIP | ReqCaptionTagger | ReqCaptionVLM | ReqCaptionAnalyze,
Field(discriminator="backend")
]
@@ -225,7 +229,7 @@ class ResCaptionDispatch(BaseModel):
Contains fields from all backends - only relevant fields are populated based on the backend used.
"""
# Common
backend: str = Field(title="Backend", description="The backend that processed the request: 'openclip', 'tagger', or 'vlm'.")
backend: str = Field(title="Backend", description="The backend that processed the request: 'openclip', 'tagger', 'vlm', or 'analyze'.")
# OpenCLIP fields
caption: str | None = Field(default=None, title="Caption", description="Generated caption (OpenCLIP backend).")
medium: str | None = Field(default=None, title="Medium", description="Detected artistic medium (OpenCLIP with analyze=True).")
@@ -310,7 +314,7 @@ def build_vqa_kwargs(req) -> dict:
return kwargs or None
def do_vqa(image, req):
def do_caption(image, req):
"""Core VLM captioning logic shared by direct and dispatch endpoints.
Returns (answer, annotated_b64).
@@ -336,6 +340,43 @@ def do_vqa(image, req):
return answer, annotated_b64
def do_analyze(image, req):
from modules.caption import vqa
from modules.caption.models_def import analyze_question
if req.question is None or len(req.question.strip()) < 2:
question = analyze_question
else:
question = req.question.strip()
if req.prompt is None or len(req.prompt.strip()) < 2:
from modules import images, infotext
info, _items = images.read_info_from_image(image)
items = infotext.parse(info)
prompt = (items.get('Prompt', None) or items.get('prompt', None)) if isinstance(items, dict) else None
if prompt is None:
return 'Error: No prompt found in image metadata.', None
else:
prompt = req.prompt.strip()
prompt = f"{question}\n\nDESCRIPTION: {prompt}"
answer = vqa.analyze(
question="Use Prompt",
system_prompt=req.system,
prompt=prompt,
image=image,
model_name=req.model,
prefill=req.prefill,
thinking_mode=req.thinking_mode,
generation_kwargs=build_vqa_kwargs(req)
)
if isinstance(answer, str) and answer.startswith('Error:'):
raise HTTPException(status_code=422, detail=answer)
annotated_b64 = None
if req.include_annotated:
annotated_img = vqa.get_last_annotated_image()
if annotated_img is not None:
annotated_b64 = helpers.encode_pil_to_base64(annotated_img)
return answer, annotated_b64
def parse_tagger_scores(tags: str) -> dict:
"""Parse confidence scores from tagger output string."""
scores = {}
@@ -496,7 +537,13 @@ def post_vqa(req: ReqVQA):
- ``422``: Model returned an error (e.g., unsupported task for model)
"""
image = validate_image(req.image)
answer, annotated_b64 = do_vqa(image, req)
answer, annotated_b64 = do_caption(image, req)
return ResVQA(answer=answer, annotated_image=annotated_b64)
def post_analyze(req: ReqVQA):
image = validate_image(req.image)
answer, annotated_b64 = do_analyze(image, req)
return ResVQA(answer=answer, annotated_image=annotated_b64)
@@ -518,10 +565,14 @@ def post_caption_dispatch(req: ReqCaptionDispatch):
WaifuDiffusion or DeepBooru anime/illustration tagging. Response populates ``tags``
(and ``scores`` when ``show_scores=True``).
3. **VLM** (``backend: "vlm"``):
3. **VLM** (``backend: "vlm"``):
Vision-Language Models for flexible image understanding. Response populates ``answer``
(and ``annotated_image`` when ``include_annotated=True`` with detection tasks).
4. **Analyze** (``backend: "analyze"``):
VLM-powered prompt analysis path that extracts or uses supplied prompt text and returns
an analysis response in ``answer`` (and ``annotated_image`` when available).
**Direct Endpoints** (backend-specific models, simpler interface):
- POST /sdapi/v1/openclip OpenCLIP only
- POST /sdapi/v1/tagger Tagger only
@@ -542,8 +593,12 @@ def post_caption_dispatch(req: ReqCaptionDispatch):
return ResCaptionDispatch(backend="tagger", tags=tags, scores=scores)
elif req.backend == "vlm":
image = validate_image(req.image)
answer, annotated_b64 = do_vqa(image, req)
answer, annotated_b64 = do_caption(image, req)
return ResCaptionDispatch(backend="vlm", answer=answer, annotated_image=annotated_b64)
elif req.backend == 'analyze':
image = validate_image(req.image)
answer, annotated_b64 = do_analyze(image, req)
return ResCaptionDispatch(backend="analyze", answer=answer, annotated_image=annotated_b64)
else:
raise HTTPException(status_code=400, detail=f"Unknown backend: {req.backend}")
@@ -667,6 +722,7 @@ def register_api(api):
api.add_api_route("/sdapi/v1/caption", post_caption_dispatch, methods=["POST"], response_model=ResCaptionDispatch, tags=["Caption"])
api.add_api_route("/sdapi/v1/openclip", post_caption, methods=["POST"], response_model=ResCaption, tags=["Caption"])
api.add_api_route("/sdapi/v1/vqa", post_vqa, methods=["POST"], response_model=ResVQA, tags=["Caption"])
api.add_api_route("/sdapi/v1/analyze", post_analyze, methods=["POST"], response_model=ResVQA, tags=["Caption"])
api.add_api_route("/sdapi/v1/vqa/models", get_vqa_models, methods=["GET"], response_model=list[ItemVLMModel], tags=["Caption"])
api.add_api_route("/sdapi/v1/vqa/prompts", get_vqa_prompts, methods=["GET"], response_model=ResVLMPrompts, tags=["Caption"])
api.add_api_route("/sdapi/v1/tagger", post_tagger, methods=["POST"], response_model=ResTagger, tags=["Caption"])
+5 -7
View File
@@ -66,26 +66,24 @@ def create_docs(app: FastAPI):
"dom_id": "#swagger-ui",
}
@app.get("/docs", include_in_schema=True)
@app.get("/docs", include_in_schema=True) # override for the default fastapi swagger route
async def custom_swagger_html():
res = get_swagger_ui_html(
title=f'{app.title}: Swagger UI',
openapi_url=app.openapi_url,
swagger_favicon_url='/file=html/favicon.svg',
swagger_css_url='/file=html/swagger.css',
swagger_favicon_url='/file=ui/assets/favicon.svg',
swagger_css_url='/file=ui/css/swagger.css',
swagger_ui_parameters=swagger_ui_parameters,
# swagger_extra_css_url='file=html/swagger.css',
)
# res = inject_css(html.content, 'html/swagger.css')
return res
def create_redocs(app: FastAPI):
@app.get("/redocs", include_in_schema=True)
@app.get("/redocs", include_in_schema=True) # override for the default fastapi redocs route
async def custom_redoc_html():
res = get_redoc_html(
title=f'{app.title}: ReDoc',
openapi_url=app.openapi_url,
redoc_favicon_url='/file=html/favicon.svg',
redoc_favicon_url='/file=ui/assets/favicon.svg',
)
return res
+10 -8
View File
@@ -1,4 +1,5 @@
from fastapi.exceptions import HTTPException
from fastapi.responses import JSONResponse, Response
from modules import shared
from modules.logger import log
from modules.api import models, helpers
@@ -216,7 +217,7 @@ def post_unload_checkpoint():
from modules import sd_models
sd_models.unload_model_weights(op='model')
sd_models.unload_model_weights(op='refiner')
return {}
return Response(status_code=204)
def post_reload_checkpoint(force:bool=False):
"""Reload the selected checkpoint. Set ``force=True`` to unload first and do a clean reload."""
@@ -224,18 +225,19 @@ def post_reload_checkpoint(force:bool=False):
if force:
sd_models.unload_model_weights(op='model')
sd_models.reload_model_weights()
return {}
return Response(status_code=204)
def post_lock_checkpoint(lock:bool=False):
"""Lock or unlock the current model to prevent automatic model swaps."""
from modules import modeldata
modeldata.model_data.locked = lock
return {}
return Response(status_code=204)
def post_refresh_unets():
"""Rescan UNet directories and update the available UNet list."""
import modules.sd_unet
return modules.sd_unet.refresh_unet_list()
modules.sd_unet.refresh_unet_list()
return Response(status_code=204)
def get_checkpoint():
"""Return information about the currently loaded checkpoint including type, class, title, and hash."""
@@ -273,12 +275,12 @@ def set_checkpoint(sd_model_checkpoint: str, dtype: str | None = None, force: bo
def post_refresh_checkpoints():
"""Rescan checkpoint directories and update the available models list."""
shared.refresh_checkpoints()
return {}
return Response(status_code=204)
def post_refresh_vae():
"""Rescan VAE directories and update the available VAE list."""
shared.refresh_vaes()
return {}
return Response(status_code=204)
def get_modules():
"""Analyze the loaded model and return its sub-module breakdown with device, dtype, and parameter info."""
@@ -418,10 +420,10 @@ def post_pnginfo(req: models.ReqImageInfo):
"""Extract generation parameters from a PNG image's metadata. Returns raw info string and parsed parameters dict."""
from modules import images, script_callbacks, infotext
if not req.image.strip():
return models.ResImageInfo(info="")
return models.ResImageInfo(info="", items={}, parameters={})
image = helpers.decode_base64_to_image(req.image.strip())
if image is None:
return models.ResImageInfo(info="")
return models.ResImageInfo(info="", items={}, parameters={})
geninfo, items = images.read_info_from_image(image)
if geninfo is None:
geninfo = ""
+6 -7
View File
@@ -3,7 +3,6 @@ import os
import time
import base64
from urllib.parse import quote, unquote
from fastapi import FastAPI
from fastapi.responses import JSONResponse
from starlette.websockets import WebSocket, WebSocketState
from pydantic import BaseModel, Field # pylint: disable=no-name-in-module
@@ -71,7 +70,7 @@ class ConnectionManager:
### api definitions
def register_api(app: FastAPI): # register api
def register_api(api): # register api
manager = ConnectionManager()
def get_video_thumbnail(filepath):
@@ -173,7 +172,7 @@ def register_api(app: FastAPI): # register api
unique_folders.append(f)
if shared.demo is not None and path not in shared.demo.allowed_paths:
debug(f'Browser folders allow: {path}')
shared.demo.allowed_paths.append(quote(path))
shared.demo.allowed_paths.append(path)
debug(f'Browser folders: {unique_folders}')
return JSONResponse(content=unique_folders)
@@ -208,11 +207,11 @@ def register_api(app: FastAPI): # register api
log.error(f'Gallery: {folder} {e}')
return []
shared.api.add_api_route("/sdapi/v1/browser/folders", get_folders, methods=["GET"], response_model=list[str])
shared.api.add_api_route("/sdapi/v1/browser/thumb", get_thumb, methods=["GET"], response_model=dict)
shared.api.add_api_route("/sdapi/v1/browser/files", ht_files, methods=["GET"], response_model=list)
api.add_api_route("/sdapi/v1/browser/folders", get_folders, methods=["GET"], response_model=list[str])
api.add_api_route("/sdapi/v1/browser/thumb", get_thumb, methods=["GET"], response_model=dict)
api.add_api_route("/sdapi/v1/browser/files", ht_files, methods=["GET"], response_model=list)
@app.websocket("/sdapi/v1/browser/files")
@api.app.websocket("/sdapi/v1/browser/files")
async def ws_files(ws: WebSocket):
try:
await manager.connect(ws)
+1 -1
View File
@@ -70,6 +70,7 @@ class APIGenerate:
p.ip_adapter_starts = []
p.ip_adapter_ends = []
p.ip_adapter_images = []
p.ip_adapter_masks = []
for ipadapter in request.ip_adapter:
if not ipadapter.images or len(ipadapter.images) == 0:
continue
@@ -79,7 +80,6 @@ class APIGenerate:
p.ip_adapter_starts.append(ipadapter.start)
p.ip_adapter_ends.append(ipadapter.end)
p.ip_adapter_images.append([helpers.decode_base64_to_image(x) for x in ipadapter.images])
p.ip_adapter_masks = []
if ipadapter.masks:
p.ip_adapter_masks.append([helpers.decode_base64_to_image(x) for x in ipadapter.masks])
del request.ip_adapter
+2 -2
View File
@@ -21,7 +21,7 @@ def get_gpu_smi():
if device is None:
try:
device = torch.cuda.get_device_name(torch.cuda.current_device())
log.info(f'GPU monitoring: device={device}')
log.info(f'GPU monitoring: device="{device}"')
except Exception:
device = ''
# per vendor modules
@@ -38,7 +38,7 @@ def get_gpu_smi():
"""
Resut should always be: list[ResGPU]
Result should always be: list[ResGPU]
class ResGPU(BaseModel):
name: str = Field(title="GPU Name")
data: dict = Field(title="Name/Value data")
+15 -4
View File
@@ -16,10 +16,18 @@ def register_upload_store(getter_fn):
def validate_sampler_name(name):
config = sd_samplers.all_samplers_map.get(name, None)
if config is None:
if sd_samplers.is_separator(name): # dropdown divider, not a selectable sampler
raise HTTPException(status_code=404, detail="Sampler not found")
return name
config = sd_samplers.all_samplers_map.get(name, None)
if config is not None:
return name
# accept case-insensitive and alias variants, returning the canonical name so the
# exact-match lookup in create_sampler resolves instead of silently using the model default
if isinstance(name, str) and name not in ('', 'None'):
sampler = sd_samplers.find_sampler(name)
if sampler is not None:
return sampler.name
raise HTTPException(status_code=404, detail="Sampler not found")
def decode_base64_to_image(encoding, quiet=False):
@@ -28,7 +36,10 @@ def decode_base64_to_image(encoding, quiet=False):
if isinstance(encoding, str) and encoding.startswith("upload:"):
return _resolve_upload_ref(encoding, quiet)
if encoding.startswith("data:image/"):
encoding = encoding.split(";")[1].split(",")[1]
parts = encoding.split(";", 1)
if len(parts) == 2:
parts2 = parts[1].split(",", 1)
encoding = parts2[1] if len(parts2) == 2 else parts2[0]
try:
decoded = base64.b64decode(encoding)
data = io.BytesIO(decoded)
+3 -3
View File
@@ -44,7 +44,7 @@ def setup_middleware(app: FastAPI, cmd_opts):
client = req.scope.get('client', ('0:0.0.0', 0))[0]
token = req.cookies.get("access-token") or req.cookies.get("access-token-unsecure")
validate_request(client, endpoint)
if (cmd_opts.api_log):
if cmd_opts.api_log:
if not validate_log(client, endpoint):
return res
log.info('API user={user} code={code} {prot}/{ver} {method} {endpoint} {client} {duration}'.format( # pylint: disable=consider-using-f-string, logging-format-interpolation
@@ -73,7 +73,7 @@ def setup_middleware(app: FastAPI, cmd_opts):
}
if err['code'] == 401 and 'file=' in req.url.path: # dont spam with unauth
return JSONResponse(status_code=err['code'], content=jsonable_encoder(err))
if err['code'] == 404 and 'file=html/' in req.url.path: # dont spam with locales
if err['code'] == 404 and 'file=ui/' in req.url.path: # dont spam with locales
return JSONResponse(status_code=err['code'], content=jsonable_encoder(err))
if err["code"] == 429: # dont spam with rate limit errors
return JSONResponse(status_code=err["code"], content=jsonable_encoder(err))
@@ -103,4 +103,4 @@ def setup_middleware(app: FastAPI, cmd_opts):
return handle_exception(req, e)
app.build_middleware_stack() # rebuild middleware stack on-the-fly
log.debug(f'API middleware: {[m.cls for m in app.user_middleware]}')
log.debug(f'API middleware: {[m.cls.__name__ for m in app.user_middleware]}')

Some files were not shown because too many files have changed in this diff Show More