Skip to content

Conversation

w-e-w
Copy link
Collaborator

@w-e-w w-e-w commented Dec 23, 2024

Description

Add 2 api route
/sdapi/v1/server-reload-ui
/sdapi/v1/server-reload-script-bodies
same function as these Reload UI and Reload custom script bodies (No ui updates, No restart) buttons
image

similer to the existing api rounts
/sdapi/v1/server-stop /sdapi/v1/server-restart /sdapi/v1/server-restart

note only available if --api and --api-server-stop is used

image


context

some settings needs reload ui to apply, but it only does is update the UI visually and so does not really impact API use
but there are some settings that goes deeper such as control_net_unit_count, this setting dose need reload ui as it will correctly corresponding inputs for the API, and some reloading in these cases are important

it is possible to just Restart UI, but this is slower then just reloading the UI, (also sometimes restarting is not available)
so I see no reason why we shouldn't add /sdapi/v1/server-reload-ui for those cases that actually do need it

/sdapi/v1/server-reload-script-bodies it's just something I decide to also Implement because why not (I'm not sure how useful is this one)

Checklist:

@w-e-w w-e-w marked this pull request as draft December 28, 2024 03:33
@w-e-w
Copy link
Collaborator Author

w-e-w commented Dec 28, 2024

found issue
/sdapi/v1/server-reload-ui dose not work in api only mode / --nowebui

existing routes
/sdapi/v1/server-restart /sdapi/v1/server-stop also have the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant