Skip to content

[Error] handling API request on metadata scan. #747

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zerobutsugar opened this issue Apr 28, 2025 · 1 comment
Closed

[Error] handling API request on metadata scan. #747

zerobutsugar opened this issue Apr 28, 2025 · 1 comment
Labels
Bug Something isn't working C# This pertains to the C# engine

Comments

@zerobutsugar
Copy link

zerobutsugar commented Apr 28, 2025

Running the metadata scan triggers the following error for some files, but the verbose logs don't identify which files are responsible:

[Error] [WebAPI] Error handling API request '/API/EditModelMetadata' for user 'local': Internal exception: System.NullReferenceException: Object reference not set to an instance of an object.
at SwarmUI.WebAPI.ModelsAPI.EditModelMetadata(Session session, String model, String title, String author, String type, String description, Int32 standard_width, Int32 standard_height, String usage_hint, String date, String license, String trigger_phrase, String prediction_type, String tags, String preview_image, String preview_image_metadata, Boolean is_negative_embedding, String subtype) in /SwarmUI/src/WebAPI/ModelsAPI.cs:line 504
at SwarmUI.WebAPI.API.HandleAsyncRequest(HttpContext context) in /SwarmUI/src/WebAPI/API.cs:line 134

This leaves the Scan UI in a broken state (stuck "Running", incorrect remaining count like -2), requiring an application restart to recover the scan function.

@mcmonkey4eva mcmonkey4eva added Bug Something isn't working C# This pertains to the C# engine labels Apr 28, 2025
mcmonkey4eva added a commit that referenced this issue Apr 30, 2025
@mcmonkey4eva
Copy link
Member

My theory is you had a model scanned and set for metadata update, where the only available previews on civitai were videos, and Swarm bugged out not being able to imageify a video. If that's accurately the case, it should be fixed now (it will simply not be able to apply the preview image in this case, but otherwise work as intended).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working C# This pertains to the C# engine
Projects
None yet
Development

No branches or pull requests

2 participants