|
|
|
@ -1009,8 +1009,6 @@ |
|
|
|
|
"stop_on_next_loop = False # Make sure GPU memory doesn't get corrupted from cancelling the run mid-way through, allow a full frame to complete\n", |
|
|
|
|
"\n", |
|
|
|
|
"def do_3d_step(img_filepath, frame_num, midas_model, midas_transform):\n", |
|
|
|
|
" global seed\n", |
|
|
|
|
"\n", |
|
|
|
|
" if args.key_frames:\n", |
|
|
|
|
" translation_x = args.translation_x_series[frame_num]\n", |
|
|
|
|
" translation_y = args.translation_y_series[frame_num]\n", |
|
|
|
@ -1027,12 +1025,6 @@ |
|
|
|
|
" f'rotation_3d_z: {rotation_3d_z}',\n", |
|
|
|
|
" )\n", |
|
|
|
|
"\n", |
|
|
|
|
" if frame_num > 0:\n", |
|
|
|
|
" seed = 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", |
|
|
|
|
" else:\n", |
|
|
|
|
" img_filepath = '/content/prevFrame.png' if is_colab else 'prevFrame.png'\n", |
|
|
|
|
" trans_scale = 1.0/200.0\n", |
|
|
|
|
" translate_xyz = [-translation_x*trans_scale, translation_y*trans_scale, -translation_z*trans_scale]\n", |
|
|
|
|
" rotate_xyz_degrees = [rotation_3d_x, rotation_3d_y, rotation_3d_z]\n", |
|
|
|
@ -1089,7 +1081,7 @@ |
|
|
|
|
" )\n", |
|
|
|
|
" \n", |
|
|
|
|
" if frame_num > 0:\n", |
|
|
|
|
" seed = seed + 1 \n", |
|
|
|
|
" seed += 1\n", |
|
|
|
|
" if resume_run and frame_num == start_frame:\n", |
|
|
|
|
" img_0 = cv2.imread(batchFolder+f\"/{batch_name}({batchNum})_{start_frame-1:04}.png\")\n", |
|
|
|
|
" else:\n", |
|
|
|
@ -1119,7 +1111,7 @@ |
|
|
|
|
" if frame_num == 0:\n", |
|
|
|
|
" turbo_blend = False\n", |
|
|
|
|
" else:\n", |
|
|
|
|
" seed = seed + 1 \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", |
|
|
|
|
" if turbo_mode and frame_num > turbo_preroll:\n", |
|
|
|
@ -1163,7 +1155,8 @@ |
|
|
|
|
" skip_steps = args.calc_frames_skip_steps\n", |
|
|
|
|
"\n", |
|
|
|
|
" if args.animation_mode == \"Video Input\":\n", |
|
|
|
|
" seed = seed + 1 \n", |
|
|
|
|
" if not video_init_seed_continuity:\n", |
|
|
|
|
" seed += 1\n", |
|
|
|
|
" init_image = f'{videoFramesFolder}/{frame_num+1:04}.jpg'\n", |
|
|
|
|
" init_scale = args.frames_scale\n", |
|
|
|
|
" skip_steps = args.calc_frames_skip_steps\n", |
|
|
|
@ -1519,6 +1512,7 @@ |
|
|
|
|
" 'sampling_mode': sampling_mode,\n", |
|
|
|
|
" 'video_init_path':video_init_path,\n", |
|
|
|
|
" 'extract_nth_frame':extract_nth_frame,\n", |
|
|
|
|
" 'video_init_seed_continuity': video_init_seed_continuity,\n", |
|
|
|
|
" 'turbo_mode':turbo_mode,\n", |
|
|
|
|
" 'turbo_steps':turbo_steps,\n", |
|
|
|
|
" 'turbo_preroll':turbo_preroll,\n", |
|
|
|
@ -2520,7 +2514,8 @@ |
|
|
|
|
" video_init_path = \"/content/training.mp4\" #@param {type: 'string'}\n", |
|
|
|
|
"else:\n", |
|
|
|
|
" video_init_path = \"training.mp4\" #@param {type: 'string'}\n", |
|
|
|
|
"extract_nth_frame = 2 #@param {type:\"number\"} \n", |
|
|
|
|
"extract_nth_frame = 2 #@param {type: 'number'}\n", |
|
|
|
|
"video_init_seed_continuity = True #@param {type: 'boolean'}\n", |
|
|
|
|
"\n", |
|
|
|
|
"if animation_mode == \"Video Input\":\n", |
|
|
|
|
" if is_colab:\n", |
|
|
|
@ -3077,6 +3072,7 @@ |
|
|
|
|
" 'animation_mode': animation_mode,\n", |
|
|
|
|
" 'video_init_path': video_init_path,\n", |
|
|
|
|
" 'extract_nth_frame': extract_nth_frame,\n", |
|
|
|
|
" 'video_init_seed_continuity': video_init_seed_continuity,\n", |
|
|
|
|
" 'key_frames': key_frames,\n", |
|
|
|
|
" 'max_frames': max_frames if animation_mode != \"None\" else 1,\n", |
|
|
|
|
" 'interp_spline': interp_spline,\n", |
|
|
|
|