deforum-art / sd-webui-deforum

Deforum extension for AUTOMATIC1111's Stable Diffusion webui
https://deforum.github.io
Other
2.69k stars 389 forks source link

[Bug]: Loading auto generated settings - "invalid literal 0.35" #898

Open revolvedai opened 1 year ago

revolvedai commented 1 year ago

Have you read the latest version of the FAQ?

Is there an existing issue for this?

Are you using the latest version of the Deforum extension?

What happened?

Whenever loading settings from the automatically saved settings, this error appears: Error: 'invalid literal for int() with base 10: '0.35''. Before reporting, please check your schedules/ init values. Full error message is in your terminal/ cli.

For some reason, the blend factor max and blend factor slope settings do not save correctly, missing the keyframe and brackets. So 0.35 instead of 0:(0.35). This is despite not touching these settings when generating the initial video.

Running on Linux on RunDiffusion

Steps to reproduce the problem

  1. Generate video
  2. Load settings from that video
  3. Hit generate
  4. Error appears

What should have happened/how would you fix it?

Settings should all save in correct format.

Torch version

2.0.1

On which platform are you launching the webui with the extension?

No response

Deforum settings

https://gist.github.com/edkenne/ceb65c8f22a5d2c05ce31e42ed762531

Webui core settings

With img2img, do exactly the amount of steps the slider specifies. is NOT checked. ui-config for Deforum is default.

Console logs

*Deforum ControlNet support: enabled*
Loading general settings...
reading custom settings from /opt/rd/stable-diffusion-webui/deforum_settings.txt
The custom settings file does not exist. The values will be unchanged.
[2023-10-03 00:25:15,437][INFO][modules.shared_state] - Starting job task(l7chveejbaucwtk)
Traceback (most recent call last):
File "/opt/rd/stable-diffusion-webui/extensions/deforum/scripts/deforum_helpers/run_deforum.py", line 110, in run_deforum
render_animation(args, anim_args, video_args, parseq_args, loop_args, controlnet_args, root)
File "/opt/rd/stable-diffusion-webui/extensions/deforum/scripts/deforum_helpers/render.py", line 84, in render_animation
parseq_adapter = ParseqAdapter(parseq_args, anim_args, video_args, controlnet_args, loop_args)
File "/opt/rd/stable-diffusion-webui/extensions/deforum/scripts/deforum_helpers/parseq_adapter.py", line 48, in __init__
self.looper_keys = ParseqLooperKeysDecorator(self, LooperAnimKeys(loop_args, anim_args, -1)) if loop_args else None
File "/opt/rd/stable-diffusion-webui/extensions/deforum/scripts/deforum_helpers/animation_key_frames.py", line 96, in __init__
self.blendFactorMax_series = self.fi.parse_inbetweens(loop_args.blendFactorMax, 'blendFactorMax')
File "/opt/rd/stable-diffusion-webui/extensions/deforum/scripts/deforum_helpers/animation_key_frames.py", line 107, in parse_inbetweens
return self.get_inbetweens(self.parse_key_frames(value, filename = filename), filename = filename, is_single_string = is_single_string)
File "/opt/rd/stable-diffusion-webui/extensions/deforum/scripts/deforum_helpers/animation_key_frames.py", line 159, in parse_key_frames
frame = int(self.sanitize_value(frameParam[0])) if check_is_number(self.sanitize_value(frameParam[0].strip())) else int(numexpr.evaluate(frameParam[0].strip().replace("'","",1).replace('"',"",1)[::-1].replace("'","",1).replace('"',"",1)[::-1]))
ValueError: invalid literal for int() with base 10: '0.35'
[2023-10-03 00:25:16,078][INFO][modules.shared_state] - Ending job task(l7chveejbaucwtk) (0.64 seconds)

Additional information

Many users on RunDiffusion have reported this error. If settings are saved manually, it loads fine. It's only for settings files included in the folder with the Deforum generation that were automatically created. We remap the outputs to new folders for our users.

This does not happen locally on Windows PC.


From @rewbs : @edkenne has a sensible reason for not being able to include a log, so I'm working around the issue checker by dumping in these strings, and re-opening:

['Python', 'Commit hash', 'Launching Web UI with arguments', 'Model loaded', 'deforum']

Meanwhile I have raised #909 to relax the issue checker bot.


github-actions[bot] commented 1 year ago

This issue has been closed due to incorrect formatting. Please address the following mistakes and reopen the issue (click on the 'Reopen' button below):

revolvedai commented 1 year ago

This issue has been closed due to incorrect formatting. Please address the following mistakes and reopen the issue (click on the 'Reopen' button below):

Do not have full log as it's in a cloud service not on local. There is no reopen button.

github-actions[bot] commented 1 year ago

This issue has been closed due to incorrect formatting. Please address the following mistakes and reopen the issue (click on the 'Reopen' button below):

revolvedai commented 1 year ago

no soup for you @andyxr ! It would be nice to know if any other linux users are experiencing this, another benefit of having an open issue.

MatissesProjects commented 1 year ago

After some inspection of the saved file, it appears that the ui might be saving things without their schedule, which I can somewhat replicate in windows if you go and do this for some reason. image setting Image strength schedule to .75 instead of the expected scheduled version of 0:(.75) will create this issue in the windows version of the save file

    "use_looper": false,
    "init_images": "{\n    \"0\": \"https://deforum.github.io/a1/Gi1.png\",\n    \"max_f/4-5\": \"https://deforum.github.io/a1/Gi2.png\",\n    \"max_f/2-10\": \"https://deforum.github.io/a1/Gi3.png\",\n    \"3*max_f/4-15\": \"https://deforum.github.io/a1/Gi4.jpg\",\n    \"max_f-20\": \"https://deforum.github.io/a1/Gi1.png\"\n}",
    "image_strength_schedule": "0.75",
    "blendFactorMax": "0:(0.35)",
    "blendFactorSlope": "0:(0.25)",

Can I get an example of the same file run automatically saved, and manually saved, I have an idea of what might be happening @edkenne image

MatissesProjects commented 1 year ago

workingForDeforum.txt for anyone that comes across this issue, here is a workaround. Use this as the base settings file

github-actions[bot] commented 1 year ago

Thanks for addressing your formatting mistakes. The issue has been reopened now.