|
|
@ -1102,9 +1102,7 @@ |
|
|
|
" skip_steps = args.calc_frames_skip_steps\n", |
|
|
|
" skip_steps = args.calc_frames_skip_steps\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
" if args.animation_mode == \"3D\":\n", |
|
|
|
" if args.animation_mode == \"3D\":\n", |
|
|
|
" if frame_num == 0:\n", |
|
|
|
" if frame_num > 0:\n", |
|
|
|
" pass\n", |
|
|
|
|
|
|
|
" else:\n", |
|
|
|
|
|
|
|
" seed += 1 \n", |
|
|
|
" seed += 1 \n", |
|
|
|
" if resume_run and frame_num == start_frame:\n", |
|
|
|
" if resume_run and frame_num == start_frame:\n", |
|
|
|
" img_filepath = batchFolder+f\"/{batch_name}({batchNum})_{start_frame-1:04}.png\"\n", |
|
|
|
" img_filepath = batchFolder+f\"/{batch_name}({batchNum})_{start_frame-1:04}.png\"\n", |
|
|
@ -1409,7 +1407,7 @@ |
|
|
|
" image.save(f'{batchFolder}/{filename}')\n", |
|
|
|
" image.save(f'{batchFolder}/{filename}')\n", |
|
|
|
" if args.animation_mode == \"3D\":\n", |
|
|
|
" if args.animation_mode == \"3D\":\n", |
|
|
|
" # If turbo, save a blended image\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", |
|
|
|
" # Mix new image with prevFrameScaled\n", |
|
|
|
" blend_factor = (1)/int(turbo_steps)\n", |
|
|
|
" blend_factor = (1)/int(turbo_steps)\n", |
|
|
|
" newFrame = cv2.imread('prevFrame.png') # This is already updated..\n", |
|
|
|
" newFrame = cv2.imread('prevFrame.png') # This is already updated..\n", |
|
|
@ -1820,15 +1818,14 @@ |
|
|
|
" 'use_scale_shift_norm': True,\n", |
|
|
|
" 'use_scale_shift_norm': True,\n", |
|
|
|
" })\n", |
|
|
|
" })\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
"secondary_model_ver = 2\n", |
|
|
|
|
|
|
|
"model_default = model_config['image_size']\n", |
|
|
|
"model_default = model_config['image_size']\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
"if secondary_model_ver == 2:\n", |
|
|
|
"if use_secondary_model:\n", |
|
|
|
" secondary_model = SecondaryDiffusionImageNet2()\n", |
|
|
|
" secondary_model = SecondaryDiffusionImageNet2()\n", |
|
|
|
" secondary_model.load_state_dict(torch.load(f'{model_path}/secondary_model_imagenet_2.pth', map_location='cpu'))\n", |
|
|
|
" secondary_model.load_state_dict(torch.load(f'{model_path}/secondary_model_imagenet_2.pth', map_location='cpu'))\n", |
|
|
|
"secondary_model.eval().requires_grad_(False).to(device)\n", |
|
|
|
" secondary_model.eval().requires_grad_(False).to(device)\n", |
|
|
|
"\n", |
|
|
|
"\n", |
|
|
|
"clip_models = []\n", |
|
|
|
"clip_models = []\n", |
|
|
|
"if ViTB32 is True: clip_models.append(clip.load('ViT-B/32', jit=False)[0].eval().requires_grad_(False).to(device)) \n", |
|
|
|
"if ViTB32 is True: clip_models.append(clip.load('ViT-B/32', jit=False)[0].eval().requires_grad_(False).to(device)) \n", |
|
|
@ -2688,4 +2685,4 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
"nbformat": 4, |
|
|
|
"nbformat": 4, |
|
|
|
"nbformat_minor": 4 |
|
|
|
"nbformat_minor": 4 |
|
|
|
} |
|
|
|
} |
|
|
|