s9roll7 / animatediff-cli-prompt-travel

animatediff prompt travel
Apache License 2.0
1.17k stars 105 forks source link

[Feature request] Loading the model once for all #223

Open lelapin123 opened 6 months ago

lelapin123 commented 6 months ago

One of the advantage of an application that keeps running (like with a server) is that you can load the model once in the memory and make several pictures generations without having to load the model again in the memory. This saves time.

So i would like to know if there is already a way to generate several little videos without having to reload the model again in the memory and if not (my feature request). Make an API server that can accept requests from other software.

Eye-01 commented 5 months ago

It's not an API repo, which has different objectives than a user CLI. The best you can do for now, is passing -r {number} argument to Generate, so the models are not unloaded during each seed change. Or you may fork and implement a waiting step to receive commands, but it seems for me that this adds one dimension to the programming load, meaning it will be quite a burden to follow any further CLI commands evolution.

lelapin123 commented 5 months ago

it is my version of the software or ???

I get this answer: " No such option: -r"

How to use that ?

Eye-01 commented 5 months ago

it is my version of the software or ???

I get this answer: " No such option: -r"

How to use that ?

-r or --repeats followed by a number. To check all cli options : animatediff generate -h

lelapin123 commented 5 months ago

It works... There is just one problem: the things seem to be generated with the same seed. This makes this option pretty useless.

I think this is a bug.

Eye-01 commented 5 months ago

It works... There is just one problem: the things seem to be generated with the same seed. This makes this option pretty useless.

I think this is a bug.

No, it works as it should. You probably didn't pass a seed list but just a unique seed.

lelapin123 commented 5 months ago

yes but why include a --repeats command, when you can just have several seeds in the JSON (implied: i want to generate the content with these seeds) ?

Eye-01 commented 5 months ago

yes but why include a --repeats command, when you can just have several seeds in the JSON (implied: i want to generate the content with these seeds) ?

The seed list is within json config file, not as a cli command. Read How To Use section in the Readme.

  "seed": [
    341774366206100,-1,-1         # -1 means random. If "--repeats 3" is specified in this setting, The first will be 341774366206100, the second and third will be random.
  ],