kabachuha / sd-webui-text2video

Auto1111 extension implementing text2video diffusion models (like ModelScope or VideoCrafter) using only Auto1111 webui dependencies
Other
1.28k stars 106 forks source link

[Bug]: sd-webui-text2video/scripts/modelscope/t2v_model.py Lines 461 and 766. The value of the variable <dropout> is set to 0. And it should be 0.N where N is some number 0-9. #137

Closed rbfussell closed 1 year ago

rbfussell commented 1 year ago

Is there an existing issue for this?

Are you using the latest version of the extension?

What happened?

https://github.com/deforum-art/sd-webui-text2video/blob/main/scripts/modelscope/t2v_model.py

Lines 461 and 766. The value of the variable is set to '0.' And it should be '0.N' where N is some number 0-9.

https://github.com/deforum-art/sd-webui-text2video/blob/fe99ccfe6c6127a7662a851f617df075b71d869b/scripts/modelscope/t2v_model.py#L766

https://github.com/deforum-art/sd-webui-text2video/blob/fe99ccfe6c6127a7662a851f617df075b71d869b/scripts/modelscope/t2v_model.py#L461

I do not know the intended value, so I will not merge and pull the fixes I implimented manually. as i set them to a value of 0.9 I do not know any unintended effects this may cause, and someone who better knows the value of dropout as it should be set, will have to do this.

[[edited to reflect new line numbers]]

Steps to reproduce the problem

  1. Start webui
  2. watch for error File "E:\Projects\AI\sd.webui\webui\extensions\sd-webui-text2video\scripts\modelscope\t2v_model.py", line 107 dropout=0. 1, ^^^^
  3. The tab will not appear in the webui for text2video

What should have happened?

It should not be set to '0.' it should have had no error, and it should appear in the extensions tabs of webui

WebUI and Deforum extension Commit IDs

webui commit id - not applicable txt2vid commit id - fe99ccfe6c6127a7662a851f617df075b71d869b

What GPU were you using for launching?

3060ti FE -- N/A

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

No response

Settings

not applicable as this is broken at launch and hard coded variables.

Console logs

Error loading script: text2vid.py
Traceback (most recent call last):
  File "E:\Projects\AI\sd.webui\webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "E:\Projects\AI\sd.webui\webui\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "E:\Projects\AI\sd.webui\webui\extensions\sd-webui-text2video\scripts\text2vid.py", line 16, in <module>
    from t2v_helpers.render import run
  File "E:\Projects\AI\sd.webui\webui/extensions/sd-webui-text2video/scripts\t2v_helpers\render.py", line 2, in <module>
    from modelscope.process_modelscope import process_modelscope
  File "E:\Projects\AI\sd.webui\webui/extensions/sd-webui-text2video/scripts\modelscope\process_modelscope.py", line 5, in <module>
    from modelscope.t2v_pipeline import TextToVideoSynthesis, tensor2vid
  File "E:\Projects\AI\sd.webui\webui/extensions/sd-webui-text2video/scripts\modelscope\t2v_pipeline.py", line 16, in <module>
    from scripts.modelscope.t2v_model import UNetSD, AutoencoderKL, GaussianDiffusion, beta_schedule
  File "E:\Projects\AI\sd.webui\webui\extensions\sd-webui-text2video\scripts\modelscope\t2v_model.py", line 107
    dropout=0. 1,
            ^^^^

Additional information

It is a simple fix, populate the variables with full 'N.N' variables replacing the 'N.' state which is not a valid float

B34STW4RS commented 1 year ago

Line numbers have changed, there are more than 2 instances of dropout=0. now, at least five, some of the correct values are 0.0 and 0.1 so which is the correct value in the missing instances?

also line 330

        prob_focus_present=0.,
rbfussell commented 1 year ago

I didn't see those, I had not had any s

Line numbers have changed, there are more than 2 instances of dropout=0. now, at least five, some of the correct values are 0.0 and 0.1 so which is the correct value in the missing instances?

also line 330

        prob_focus_present=0.,

Does that fail on start up also? I didn't have that issue.

kabachuha commented 1 year ago

Added the decimal parts to dropouts, which are obviously zeros since they're not used during inference and only when training as the only thing that is responsible for randomness is the noise generator.

Please note, while I took your issue this time, you tried to game the system by filling the needed fields with random stuff (like I couldn't know the python version you were using because of that) and not attaching the full webui log. I'll try to implement stricter checks using Github actions to prevent it in the future

Screenshot 2023-04-23 at 13-29-04 Bug sd-webui-text2video_scripts_modelscope_t2v_model py Lines 461 and 766  The value of the variable dropout is set to 0  And it should be 0 N where N is some number 0-9  · Issue #

rbfussell commented 1 year ago

I apologize for that, I simply did not think it relevant as I assumed, perhaps incorrectly, that the =0. ) was resulting in this error, when I modified the 0. to be 0.N 0-9 i used 0.9, and trying 0.0 I no longer receive this error, I do not understand the cause of this. There is something strange with this. filled them in as I did, because I had 'fixed' (which I guess i did not) on my system, some time ago, and filed this since I see there is a discussion about it, and adding 0.(N) not leaving the float bare ( And my asusmption was partially due to old habits. which, while I've a fairly extensive background in multiple languages, I never have actually used, 0. I always would use 0.0, and so I never took to realize that it was a valid form... and since adding 0.(0-9) fixed this error for me, now I am confused a bit, and wonder what may be the real issue here. this problem arose with multiple python environments, 3.10.11 and 3.11.3 using anaconda and standard release python. The webui log is long gone since i had 'fixed' it some time ago, It suddenly started after an update to the listed commit via in webui / as well as git clone in two different webui instances, current commit and 5 or so back, i'd have to check for specifics, given the breadth of my testing environments, i, perhaps wrongly assumed. i filled that out from my mobile while at work, after responding to the discussion with another user, and did not really have access to my whole multiple environments / releases at the time, next time i'll be sure to include all relevant and assumed irrelevant bits.