Skip to content

Feat:(mm) model settings export metadata thumbnail#9188

Open
Pfannkuchensack wants to merge 4 commits into
invoke-ai:mainfrom
Pfannkuchensack:feat/model-settings-export-metadata-thumbnail
Open

Feat:(mm) model settings export metadata thumbnail#9188
Pfannkuchensack wants to merge 4 commits into
invoke-ai:mainfrom
Pfannkuchensack:feat/model-settings-export-metadata-thumbnail

Conversation

@Pfannkuchensack
Copy link
Copy Markdown
Collaborator

Summary

Export now includes name, description, source_url, and the cover image (encoded as a base64 data URL) alongside the existing default_settings, trigger_phrases, and cpu_only fields. On import, these are applied via the existing model update and image upload endpoints. This makes the exported file suitable for curating, sharing, or restoring a model's full configuration — not just its load-time settings.

Related Issues / Discussions

Follow-up to #8872 (model settings export/import) and #8997 (editable source_url field).

QA Instructions

  1. Open Model Manager, select any installed model that has a cover image, description, and source URL set.
  2. Click Export Settings. Open the downloaded JSON and confirm it contains name, description, source_url, and a cover_image field starting with data:image/...;base64,.
  3. On a second model (or after clearing the first model's image/description), click Import Settings and select the exported file.
    • Verify name, description, source URL, and thumbnail are applied.
    • Verify default_settings / trigger_phrases / cpu_only still apply correctly.
  4. Edge cases:
    • Export a model with no cover image / no description / no source URL → JSON should simply omit those keys, import should still work.
    • Hand-edit the JSON to put a non-http(s):// value in source_url → import should reject with "Invalid settings file".
    • Hand-edit the JSON to put a non-image string in cover_image → import should reject with "Invalid settings file".
    • Import into a model type that doesn't support some fields (e.g. cpu_only) → those fields appear in the "skipped" warning toast; everything else applies.

Merge Plan

No special merge considerations — purely additive frontend changes, no backend / DB / schema changes. The export format remains backwards compatible: older files without the new fields still import correctly, and older clients reading newer files will just ignore the unknown keys.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

Export now includes name, description, source_url, and the cover image
(encoded as a base64 data URL) alongside the existing default_settings,
trigger_phrases, and cpu_only fields. On import, these are applied via
the existing model update and image upload endpoints. This makes the
exported file suitable for curating, sharing, or restoring a model's
full configuration — not just its load-time settings.
Extract the pure logic (sanitizeFilename, isSafeUrl, isImageDataUrl,
dataUrlToFile, buildExportData, fetchImageAsDataUrl, validateImportData)
from the export/import button components into a shared modelSettingsIO
module so it can be exercised directly. Add 32 unit tests covering happy
paths, validation rejections (unsafe URLs, non-image cover_image, type
mismatches), and edge cases like empty strings and base64 round-trips.
Add a short section to the user-facing models concept page covering the
Export Settings / Import Settings buttons: what gets included in the
JSON file (metadata, source URL, cover image as base64, default
settings / trigger phrases / cpu_only), the use cases (backup, sharing,
restore), and a caution that importing overwrites the target model's
existing values.
@github-actions github-actions Bot added frontend PRs that change frontend files docs PRs that change docs labels May 16, 2026
@Pfannkuchensack Pfannkuchensack changed the title Feat/model settings export metadata thumbnail Feat:(mm) model settings export metadata thumbnail May 16, 2026
@lstein lstein added 6.13.5 Library Updates 6.14.x and removed 6.13.5 Library Updates labels May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.14.x docs PRs that change docs frontend PRs that change frontend files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants