Stability-AI / StableSwarmUI

StableSwarmUI, A Modular Stable Diffusion Web-User-Interface, with an emphasis on making powertools easily accessible, high performance, and extensibility.
MIT License
4.59k stars 368 forks source link

Preset import not working #364

Closed begin2 closed 5 months ago

begin2 commented 5 months ago

Preset import not working. I make all steps from manual:

and got errors: 08:57:02.255 [Error] [WebAPI] Error handling API request '/API/AddNewPreset' for user 'local': Internal exception: System.NullReferenceException: Object reference not set to an instance of an object. at FreneticUtilities.FreneticExtensions.StringExtensions.ToLowerFast(String input) at StableSwarmUI.Accounts.User.GetPreset(String name) in H:\Stable_Diffusion\Data\Packages\StableSwarmUI\src\Accounts\User.cs:line 117 at StableSwarmUI.WebAPI.BasicAPIFeatures.AddNewPreset(Session session, String title, String description, JObject raw, String preview_image, Boolean is_edit, String editing) in H:\Stable_Diffusion\Data\Packages\StableSwarmUI\src\WebAPI\BasicAPIFeatures.cs:line 329 at StableSwarmUI.WebAPI.API.HandleAsyncRequest(HttpContext context) in H:\Stable_Diffusion\Data\Packages\StableSwarmUI\src\WebAPI\API.cs:line 124 08:57:02.255 [Error] [WebAPI] Error handling API request '/API/AddNewPreset' for user 'local': Internal exception: System.NullReferenceException: Object reference not set to an instance of an object. at FreneticUtilities.FreneticExtensions.StringExtensions.ToLowerFast(String input) at StableSwarmUI.Accounts.User.GetPreset(String name) in H:\Stable_Diffusion\Data\Packages\StableSwarmUI\src\Accounts\User.cs:line 117 at StableSwarmUI.WebAPI.BasicAPIFeatures.AddNewPreset(Session session, String title, String description, JObject raw, String preview_image, Boolean is_edit, String editing) in H:\Stable_Diffusion\Data\Packages\StableSwarmUI\src\WebAPI\BasicAPIFeatures.cs:line 329 at StableSwarmUI.WebAPI.API.HandleAsyncRequest(HttpContext context) in H:\Stable_Diffusion\Data\Packages\StableSwarmUI\src\WebAPI\API.cs:line 124

can you fix this please ? btw. where is presets stored on disk ? I reinstall new version and it be good to move old created presets to new install version.

mcmonkey4eva commented 5 months ago

Ah, oops, looks like Overwrite option when importing presets was mishandled -- fixed.

User data by default is stored in (Swarm)/Data/Users.ldb (a LiteDB file). When transferring installs you'd want to transfer your Data directory and Models and whatever else.

btw just to be sure it's clear: you don't need to reinstall for updates, you can update in-place, there's even a UI button under the Server tab for update-and-restart

begin2 commented 5 months ago

thanks, now presets import is working properly :)