Merge pull request #29 from zippy731/turbo-cleanups

Don't run Turbo on Frame 0
pull/27/head^2
Adam Letts 3 years ago committed by GitHub
commit ae1d472b4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      Disco_Diffusion.ipynb
  2. 6
      disco.py

@ -1100,9 +1100,7 @@
" skip_steps = args.calc_frames_skip_steps\n",
"\n",
" if args.animation_mode == \"3D\":\n",
" if frame_num == 0:\n",
" pass\n",
" else:\n",
" if frame_num > 0:\n",
" seed += 1 \n",
" if resume_run and frame_num == start_frame:\n",
" img_filepath = batchFolder+f\"/{batch_name}({batchNum})_{start_frame-1:04}.png\"\n",
@ -1413,7 +1411,7 @@
" image.save(f'{batchFolder}/{filename}')\n",
" if args.animation_mode == \"3D\":\n",
" # If turbo, save a blended image\n",
" if turbo_mode:\n",
" if turbo_mode and frame_num > 0:\n",
" # Mix new image with prevFrameScaled\n",
" blend_factor = (1)/int(turbo_steps)\n",
" newFrame = cv2.imread('prevFrame.png') # This is already updated..\n",
@ -3274,4 +3272,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}

@ -1007,9 +1007,7 @@ def do_run():
skip_steps = args.calc_frames_skip_steps
if args.animation_mode == "3D":
if frame_num == 0:
pass
else:
if frame_num > 0:
seed += 1
if resume_run and frame_num == start_frame:
img_filepath = batchFolder+f"/{batch_name}({batchNum})_{start_frame-1:04}.png"
@ -1320,7 +1318,7 @@ def do_run():
image.save(f'{batchFolder}/{filename}')
if args.animation_mode == "3D":
# If turbo, save a blended image
if turbo_mode:
if turbo_mode and frame_num > 0:
# Mix new image with prevFrameScaled
blend_factor = (1)/int(turbo_steps)
newFrame = cv2.imread('prevFrame.png') # This is already updated..

Loading…
Cancel
Save