deforum / deforum/sd-webui-deforum

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

Open
#898 7 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
2.9k
Forks
407
PR merge metrics
No merged PRs in 30d

Description

### Have you read the latest version of the FAQ?

- [X] I have visited the FAQ page right now and my issue is not present there

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits of both this extension and the webui

### Are you using the latest version of the Deforum extension?

- [X] I have Deforum updated to the lastest version and I still have the issue.

### 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

```Shell
*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.

------------------------

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.