|
|
|
@ -1146,6 +1146,8 @@ |
|
|
|
|
" blendedImage = cv2.addWeighted(newWarpedImg, blend_factor, oldWarpedImg,1-blend_factor, 0.0)\n", |
|
|
|
|
" cv2.imwrite(f'{batchFolder}/{filename}',blendedImage)\n", |
|
|
|
|
" next_step_pil.save(f'{img_filepath}') # save it also as prev_frame to feed next iteration\n", |
|
|
|
|
" if vr_mode:\n", |
|
|
|
|
" generate_eye_views(TRANSLATION_SCALE,batchFolder,filename,frame_num,midas_model, midas_transform)\n", |
|
|
|
|
" continue\n", |
|
|
|
|
" else:\n", |
|
|
|
|
" #if not a skip frame, will run diffusion and need to blend.\n", |
|
|
|
@ -1451,7 +1453,7 @@ |
|
|
|
|
" rot_mat, translate_xyz, args.near_plane, args.far_plane,\n", |
|
|
|
|
" args.fov, padding_mode=args.padding_mode,\n", |
|
|
|
|
" sampling_mode=args.sampling_mode, midas_weight=args.midas_weight,spherical=True)\n", |
|
|
|
|
" eye_file_path = batchFolder+f\"/frame_{frame_num-1:04}\" + ('_l' if i==0 else '_r')+'.png'\n", |
|
|
|
|
" eye_file_path = batchFolder+f\"/frame_{frame_num:04}\" + ('_l' if i==0 else '_r')+'.png'\n", |
|
|
|
|
" transformed_image.save(eye_file_path)\n", |
|
|
|
|
"\n", |
|
|
|
|
"def save_settings():\n", |
|
|
|
@ -2051,12 +2053,12 @@ |
|
|
|
|
"#@markdown interpupillary distance (between the eyes)\n", |
|
|
|
|
"vr_ipd = 5.0 #@param{type:\"number\"}\n", |
|
|
|
|
"\n", |
|
|
|
|
"#insist turbo be used only w 3d anim.\n", |
|
|
|
|
"#insist VR be used only w 3d anim.\n", |
|
|
|
|
"if vr_mode and animation_mode != '3D':\n", |
|
|
|
|
" print('=====')\n", |
|
|
|
|
" print('VR mode only available with 3D animations. Disabling VR.')\n", |
|
|
|
|
" print('=====')\n", |
|
|
|
|
" turbo_mode = False\n", |
|
|
|
|
" vr_mode = False\n", |
|
|
|
|
"\n", |
|
|
|
|
"\n", |
|
|
|
|
"def parse_key_frames(string, prompt_parser=None):\n", |
|
|
|
@ -2718,7 +2720,7 @@ |
|
|
|
|
"ExtraSetTop" |
|
|
|
|
], |
|
|
|
|
"machine_shape": "hm", |
|
|
|
|
"name": "Disco Diffusion v5.2 [w/ VR Mode]", |
|
|
|
|
"name": "Disco Diffusion v5.1 [w/ Turbo]", |
|
|
|
|
"private_outputs": true, |
|
|
|
|
"provenance": [], |
|
|
|
|
"include_colab_link": true |
|
|
|
|