sd-webui-deforum icon indicating copy to clipboard operation
sd-webui-deforum copied to clipboard

A1111 API support

Open olegchomp opened this issue 2 years ago • 10 comments

Will be great to have API endpoints

olegchomp avatar Jan 21 '23 09:01 olegchomp

i think so too

A-Mana avatar Apr 20 '23 17:04 A-Mana

Easier said than done. Deforum has a gigantic count of parameters, which are drastically different in types and nature, if the API changes its values dynamically (like does Deforumation) it will have to keep track of ALL those changes, so the animations will be reproducible for others, it needs to maintain integration now like a dozen of diverse external AI models, most importantly the ControlNet intergration as it's prone to sudden API changes.

It is a monsterous task to implement

kabachuha avatar Apr 20 '23 19:04 kabachuha

What @kabachuha said basically ;)

hithereai avatar Apr 20 '23 19:04 hithereai

@kabachuha I can participate in testing the WebAPI pull request, is api_deforum.py empty now? Or is it in development?

Andrey-Nikitin avatar Apr 21 '23 20:04 Andrey-Nikitin

Well, it is in development, but it's really empty at this time

We still need to wrap our heads on how to deal with so many args and modes

kabachuha avatar Apr 21 '23 20:04 kabachuha

I am trying to automate the production of music videos by using deforum, and I am looking for a way that does not involve manually using the WebUI.

Since it looks like it will be awhile before its officially integrated with the API, is there ANY way to send deforum parameters that does not involve manually pasting them into the webui?

wjbeeson avatar Apr 22 '23 19:04 wjbeeson

@wjbeeson batch processing using a list of .txt files

kabachuha avatar Apr 22 '23 19:04 kabachuha

@kabachuha Would you mind directing me to some resources that I could use to get started? I am unsure how to hook up parameters in a textfile to deforum

wjbeeson avatar Apr 22 '23 20:04 wjbeeson

For example, would I just initialize the values in args.py with the values I want? Once I did that, how would I actually run it?

wjbeeson avatar Apr 22 '23 20:04 wjbeeson

@hithereai is the expert here

kabachuha avatar Apr 22 '23 20:04 kabachuha

Easier said than done. Deforum has a gigantic count of parameters, which are drastically different in types and nature, if the API changes its values dynamically (like does Deforumation) it will have to keep track of ALL those changes, so the animations will be reproducible for others, it needs to maintain integration now like a dozen of diverse external AI models, most importantly the ControlNet intergration as it's prone to sudden API changes.

It is a monsterous task to implement

How difficult would it be to start with a "load all settings" call which just loads the settings from a .txt file and another "run" call that starts the generation process?

Cheers!

octimot avatar May 11 '23 19:05 octimot

It turned out to be quite difficult, actually, as we need to reorganize the code structure in such a way that there will be absolutely no circular calls/imports or it will freeze forever. ControlNet is an another challenge, what is the best way to send it videos and so on. See https://github.com/deforum-art/sd-webui-deforum/pull/572 on how I began the work

And how I did it for the text2video extension: https://github.com/deforum-art/sd-webui-text2video/pull/110/files

It looks like you've got some experience, so feel free to make your own PR if you'd like to. We (I and hithereai) are preoccupied with other more urgent things at the moment.


P.S. If you have an account, it would be nice to talk to you on our https://discord.gg/deforum

kabachuha avatar May 11 '23 19:05 kabachuha

Done in #826 and #840

kabachuha avatar Aug 16 '23 11:08 kabachuha