yownas / seed_travel

Small script for AUTOMATIC1111/stable-diffusion-webui to create images between two seeds
Other
307 stars 25 forks source link

ValueError: could not convert string to float: '' #16

Closed DenkingOfficial closed 1 year ago

DenkingOfficial commented 1 year ago

Still can't get it to work, even latest version of the script breaks generation process I tried to use this script on another computer and it works fine, but for some reason it doesn't work for me

The script itself works well if it's activated, otherwise if it wasn't activated before and fields such as "Destination seed", "Steps" etc. not filled with values it will break generation process completely even if script is deactivated

Log:

Traceback (most recent call last):
  File "C:\Software\Other Software\sdautomatic111\venv\lib\site-packages\gradio\routes.py", line 273, in run_predict
    output = await app.blocks.process_api(
  File "C:\Software\Other Software\sdautomatic111\venv\lib\site-packages\gradio\blocks.py", line 739, in process_api
    inputs = self.preprocess_data(fn_index, inputs, state)
  File "C:\Software\Other Software\sdautomatic111\venv\lib\site-packages\gradio\blocks.py", line 638, in preprocess_data
    processed_input.append(block.preprocess(raw_input[i]))
  File "C:\Software\Other Software\sdautomatic111\venv\lib\site-packages\gradio\components.py", line 498, in preprocess
    return self._round_to_precision(x, self.precision)
  File "C:\Software\Other Software\sdautomatic111\venv\lib\site-packages\gradio\components.py", line 460, in _round_to_precision
    return float(num)
ValueError: could not convert string to float: ''

I can provide any information about my venv or system if it's needed

DenkingOfficial commented 1 year ago

Video demonstration

screencast-github.com-2022.10.06-03_02_32.webm

yownas commented 1 year ago

The only field that doesn't have a default value set is dest_seed. I guess you could try to set one like this:

    dest_seed = gr.Textbox(label='Destination seed(s) (Comma separated)', value='-1', lines=1)

But that wouldn't explain why you get an error in the first place. (And dest_seed is a string, not a float)

Another thing could be if you aren't using Python 3.10.6, but that shouldn't matter too much, I think. Or if you venv has become messed up. One way to test it is to remove (or rename it) and let the webui reinstall it. But these are only wild guesses.

DenkingOfficial commented 1 year ago

Hello, sorry for waiting I completely reinstalled my venv and changed version to 3.10.6 Still not working

DenkingOfficial commented 1 year ago

It's something wrong with steps count

UPD: found that my instance of webui isn't setting default values in your script for some reason image

UPD2: Default values seems to work with other scripts image

UPD3: That's very VERY strange, I just renamed .py file and changed title and it worked

image

image

I used an old version of the script before and I think it left some cache about it

UPD4: YES, I FOUND THE REASON WHY IT IS NOT WORKING Each script is adding lines in ui-config.json about default values of the fields, so I deleted all lines, that starts with "customscript/..." and restarted a webui It automatically added lines into JSON and now it works as intended: image

yownas commented 1 year ago

Wow. Thank you, that was really good to know. I had no idea things were stored in ui-config.json, I must just have been super-lucky that it never broke things for me.