AnimateDiff icon indicating copy to clipboard operation
AnimateDiff copied to clipboard

[BUG]"seed " is not random

Open lckj2009 opened this issue 2 years ago • 1 comments

app.py 165 to 167 line:

    if seed_textbox != -1 and seed_textbox != "": torch.manual_seed(int(seed_textbox))
    else: torch.seed()
    seed = torch.initial_seed()

I have tested repeatedly and found that 'seed' always points to the same value, so I have some doubts about this. The parameter of "-1" was originally random, but it is not random here. I think it would be better to use "seed=torch. seed()"? My "pip list": 'torch==2.0.0'.

There is something wrong with my question, please point it out. Thank you.

lckj2009 avatar Dec 05 '23 07:12 lckj2009

Looks to me like the gradio.textbox value data type is a string, if that's true then -1 will never equal "-1". Potential solution would either be to change the condition to match on the string value or use the gradio number component.

catramsden avatar Feb 22 '24 13:02 catramsden