deforum-stable-diffusion
deforum-stable-diffusion copied to clipboard
Problem with resume from timestring if only 1 image present
First of all, thank you for your amazing work. Deforum is a really impressive piece of software that can produce awesome and revolutionary video content.
To my problem: I'd like to start the animation from a given first frame and I am getting unexpected behavior. Line 253 of render.py https://github.com/deforum-art/deforum-stable-diffusion/blob/main/helpers/render.py#L253 says
turbo_next_image, turbo_next_frame_idx = sample_to_cv2(prev_sample, type=np.float32), last_frame
which means that if turbo_steps = 4, frame 4 is gonna be equal to frame 0. The interpolation steps between will interpolate between the same frames. But what you would want is that frame 4 is a new frame, i.e. having generate() applied to it. And the interpolation steps in between should then interpolate between the first new frame and the last old frame. I'd do it myself but am afraid of breaking something as I don't understand the whole logic to be honest.
I am also very confused with the start_frame counting.
start_frame = 0
if anim_args.resume_from_timestring:
for tmp in os.listdir(args.outdir):
filename = tmp.split("_")
# don't use saved depth maps to count number of frames
if anim_args.resume_timestring in filename and "depth" not in filename:
start_frame += 1
start_frame = start_frame - 1
Why is the last line there? I see that in the automatic1111 add on, it is not there.
Would appreciate some help or hotfix. Thanks