v8hid / infinite-zoom-automatic1111-webui

infinite zoom effect extension for AUTOMATIC1111's webui - stable diffusion
MIT License
659 stars 62 forks source link

[Feature] Can it loop? #30

Open SMUsamaShah opened 1 year ago

SMUsamaShah commented 1 year ago

Is it possible to also have last image same as first image making an infinite loop?

GeorgLegato commented 1 year ago

I am going to add a second image. so, if you provide same image, then yes

GeorgLegato commented 1 year ago

btw, if I add init image, and select ZOOM IN, this image is at the end of animation. This should be fixed as well. btw, inpainting and zoom in is poor, because an INPAINT model has to txt2prompt which is very poor result.

IF (ZOOM IN) IF (INIT_IMG) Out(INIT_IMG) -> outpaint -> outpaint ... -> n ELSE Out (Prompt With non-inpaint-model) -> switch to inpaint model -> outpaint ... -> n ELSE ... ?

GeorgLegato commented 1 year ago

@v8hid let us add two Global Settings: Model to use for txt2img (if no init image) Model to use for steps between (inpainting model)

first version easy, just textboxes, later improve on fancy select dropdowon

v8hid commented 1 year ago

@v8hid let us add two Global Settings: Model to use for txt2img (if no init image) Model to use for steps between (inpainting model)

first version easy, just textboxes, later improve on fancy select dropdowon

Users are already using WebUI, They can easily use the Txt2Img tab for the initial image (They can also play with it to get the best result and then use it as an initial image). Don't forget we don't want to rebuild the things that already exist. It also might cause some conflicts in loading and might cause VRAM exhaustion and we need to handle a lot of stuff, It's better to let Automatic1111 handle it and we just used the shared model. What do you think?

GeorgLegato commented 1 year ago

@v8hid let us add two Global Settings: Model to use for txt2img (if no init image) Model to use for steps between (inpainting model) first version easy, just textboxes, later improve on fancy select dropdowon

Users are already using WebUI, They can easily use the Txt2Img tab for the initial image (They can also play with it to get the best result and then use it as an initial image). Don't forget we don't want to rebuild the things that already exist. It also might cause some conflicts in loading and might cause VRAM exhaustion and we need to handle a lot of stuff, It's better to let Automatic1111 handle it and we just used the shared model. What do you think?

check the code: If no image provided, TXT2IMG will be called using the first prompt in list. and this with a inpainting model. I am nearly done switching between models .-) original code: image

v8hid commented 1 year ago

I don't know how we can implement a clean loop video. I have just one idea: We can use F.I.L.M to interpolate between the last frame and the first frame like this one here: interpolated

Not so clean but it improves as the frames become more similar.

v8hid commented 1 year ago

I am nearly done switching between models .-)

I know what you mean and you are absolutely right, but we can put the effort to improve more necessary features like the ones you implemented perfectly, and of course, we can work on stuff like this later!

SMUsamaShah commented 1 year ago

I don't know how we can implement a clean loop video.

If you are zooming in, like animation above, the final image will emerge from center pixel. As a starter, instead of interpolating like example animation, better idea would be to zoom to the final image emerging from center. The boundaries won't match but that's still a better start than interpolation.

GeorgLegato commented 1 year ago

we have implemented the so called EXIT IMAGE, if you define same img for init and exit, we have a loop. not a perfect blend, but a good starting point, next release

zrichz commented 1 year ago

just a check - that the last frame of the saved animation is not simply the EXIT image, but the frame before the exit image, since otherwise the loop will stutter as it has 2 frames of the exit image (one at the start and one at the end) :)

bigsk1 commented 1 year ago

maybe I am missing something but I am trying to have a starting image and zoom into the image and a ai generated world opens up. In this case an eye is the start and then zoom into the eye! Currently it either uses the prompts and last frame is the eye or first frame is the eye and zooms back out.

Am I missing something here? Would it not make sense to have a starting image and zoom into it?

00037-572710569