Skip to content
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

paste infotext cast int as float #14523

Merged
merged 1 commit into from
Jan 4, 2024
Merged

Conversation

w-e-w
Copy link
Collaborator

@w-e-w w-e-w commented Jan 3, 2024

Description

when casting the infotext string to it's corresponding element type the element type is determined by the default value saved in ui-config.json

this causes issues in one particular case

if a slider is implemented with a value range of [0, 1] step size of 0.1 default value 1
if the developer set sleep value to 1 and not 1.0, a integer one will be saved to ui-config.json,
later when trying to perform paste infotext, becaue the value is a integer the value will be cast to a integer, but in this particular case it should be a float
this will result in an incorrectly value beeing applied to the UI

this is a real issue that I have run into just now
when verifying an extension and decide to take a little bit of time to implement infotext copypast for extension
see scraed/CharacteristicGuidanceWebUI#1 AUTOMATIC1111/stable-diffusion-webui-extensions#253 (comment)

Checklist:

@AUTOMATIC1111 AUTOMATIC1111 merged commit f903b4d into dev Jan 4, 2024
6 checks passed
@AUTOMATIC1111 AUTOMATIC1111 deleted the paste-infotext-cast-int-as-float branch January 4, 2024 08:19
@w-e-w w-e-w mentioned this pull request Feb 17, 2024
@pawel665j pawel665j mentioned this pull request Apr 16, 2024
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.

2 participants