|
|
@ -241,11 +241,14 @@ |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
" IPython magic commands replaced by Python code\n", |
|
|
|
" IPython magic commands replaced by Python code\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
" v5.1 Update: March 30th 2022 - zippy / Chris Allen - c/o gandamu / Adam Letts\n", |
|
|
|
" v5.1 Update: March 30th 2022 - zippy / Chris Allen and gandamu / Adam Letts\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
" Integrated Turbo+Smooth features from Disco Diffusion Turbo -- just the implementation, without its defaults.\n", |
|
|
|
" Integrated Turbo+Smooth features from Disco Diffusion Turbo -- just the implementation, without its defaults.\n", |
|
|
|
|
|
|
|
"\n", |
|
|
|
" Implemented resume of turbo animations in such a way that it's now possible to resume from different batch folders and batch numbers.\n", |
|
|
|
" Implemented resume of turbo animations in such a way that it's now possible to resume from different batch folders and batch numbers.\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
|
|
|
|
" 3D rotation parameter units are now degrees (rather than radians)\n", |
|
|
|
|
|
|
|
"\n", |
|
|
|
" '''\n", |
|
|
|
" '''\n", |
|
|
|
" )\n" |
|
|
|
" )\n" |
|
|
|
], |
|
|
|
], |
|
|
@ -1030,9 +1033,10 @@ |
|
|
|
" img_filepath = '/content/prevFrame.png' if is_colab else 'prevFrame.png'\n", |
|
|
|
" img_filepath = '/content/prevFrame.png' if is_colab else 'prevFrame.png'\n", |
|
|
|
" trans_scale = 1.0/200.0\n", |
|
|
|
" trans_scale = 1.0/200.0\n", |
|
|
|
" translate_xyz = [-translation_x*trans_scale, translation_y*trans_scale, -translation_z*trans_scale]\n", |
|
|
|
" translate_xyz = [-translation_x*trans_scale, translation_y*trans_scale, -translation_z*trans_scale]\n", |
|
|
|
" rotate_xyz = [rotation_3d_x, rotation_3d_y, rotation_3d_z]\n", |
|
|
|
" rotate_xyz_degrees = [rotation_3d_x, rotation_3d_y, rotation_3d_z]\n", |
|
|
|
" print('translation:',translate_xyz)\n", |
|
|
|
" print('translation:',translate_xyz)\n", |
|
|
|
" print('rotation:',rotate_xyz)\n", |
|
|
|
" print('rotation:',rotate_xyz_degrees)\n", |
|
|
|
|
|
|
|
" rotate_xyz = [math.radians(rotate_xyz_degrees[0]), math.radians(rotate_xyz_degrees[1]), math.radians(rotate_xyz_degrees[2])]\n", |
|
|
|
" rot_mat = p3dT.euler_angles_to_matrix(torch.tensor(rotate_xyz, device=device), \"XYZ\").unsqueeze(0)\n", |
|
|
|
" rot_mat = p3dT.euler_angles_to_matrix(torch.tensor(rotate_xyz, device=device), \"XYZ\").unsqueeze(0)\n", |
|
|
|
" print(\"rot_mat: \" + str(rot_mat))\n", |
|
|
|
" print(\"rot_mat: \" + str(rot_mat))\n", |
|
|
|
" next_step_pil = dxf.transform_image_3d(img_filepath, midas_model, midas_transform, DEVICE,\n", |
|
|
|
" next_step_pil = dxf.transform_image_3d(img_filepath, midas_model, midas_transform, DEVICE,\n", |
|
|
@ -2537,6 +2541,7 @@ |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
"#@markdown ####**2D Animation Settings:**\n", |
|
|
|
"#@markdown ####**2D Animation Settings:**\n", |
|
|
|
"#@markdown `zoom` is a multiplier of dimensions, 1 is no zoom.\n", |
|
|
|
"#@markdown `zoom` is a multiplier of dimensions, 1 is no zoom.\n", |
|
|
|
|
|
|
|
"#@markdown All rotations are provided in degrees.\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
"key_frames = True #@param {type:\"boolean\"}\n", |
|
|
|
"key_frames = True #@param {type:\"boolean\"}\n", |
|
|
|
"max_frames = 10000#@param {type:\"number\"}\n", |
|
|
|
"max_frames = 10000#@param {type:\"number\"}\n", |
|
|
|