deforum-art / sd-webui-deforum

Deforum extension for AUTOMATIC1111's Stable Diffusion webui
https://deforum.github.io
Other
2.71k stars 390 forks source link

[Bug]: Error while trying to generate video with 3d options #520

Closed M4CC closed 1 year ago

M4CC commented 1 year ago

Have you read the latest version of the FAQ?

Is there an existing issue for this?

Are you using the latest version of the Deforum extension?

What happened?

I'm just trying to create a basic video with 3d settings but I get an error.

I think this is happening because the script failed to load the necessary packages when I pressed the "3d" option for the first time. Is there any way to force a reinstall through Automatic1111 or do I need to do it manually?

Steps to reproduce the problem

  1. Pressing the 3D option
  2. Pressing generate with the pre-filled options

What should have happened?

Video generated normally.

WebUI and Deforum extension Commit IDs

Just installed the latest version through Automatic

On which platform are you launching the webui with the extension?

No response

Deforum settings

{ "W": 512, "H": 512, "tiling": false, "restore_faces": false, "seed": 1843267309, "sampler": "Euler a", "seed_resize_from_w": 0, "seed_resize_from_h": 0, "steps": 25, "ddim_eta": 0.0, "save_settings": true, "save_sample_per_step": false, "batch_name": "Deforum_20230403105602", "seed_behavior": "iter", "seed_iter_N": 1, "use_init": false, "strength_0_no_init": true, "strength": 0.8, "init_image": null, "use_mask": false, "use_alpha_as_mask": false, "invert_mask": false, "overlay_mask": true, "mask_file": "https://deforum.github.io/a1/M1.jpg", "mask_contrast_adjust": 1.0, "mask_brightness_adjust": 1.0, "mask_overlay_blur": 4, "fill": 1, "full_res_mask": true, "full_res_mask_padding": 4, "reroll_blank_frames": "reroll", "reroll_patience": 10.0, "precision": "autocast", "timestring": "20230403105602", "prompts": { "0": " tiny cute swamp bunny, highly detailed, intricate, ultra hd, sharp photo, crepuscular rays, in focus, by tomasz alen kopera --neg ", "30": " anthropomorphic clean cat, surrounded by fractals, epic angle and pose, symmetrical, 3d, depth of field, ruan jia and fenghua zhong --neg ", "60": " a beautiful coconut --neg photo, realistic ", "90": " a beautiful durian, trending on Artstation --neg " }, "positive_prompts": "", "negative_prompts": "", "outdir": "F:\ai\stable-diffusion-webui-directml\outputs/img2img-images\Deforum_20230403105602", "animation_mode": "2D", "max_frames": 120, "border": "replicate", "angle": "0:(0)", "zoom": "0:(1.0025+0.002sin(1.253.14t/30))", "translation_x": "0:(0)", "translation_y": "0:(0)", "translation_z": "0:(1.75)", "transform_center_x": "0:(0.5)", "transform_center_y": "0:(0.5)", "rotation_3d_x": "0:(0)", "rotation_3d_y": "0:(0)", "rotation_3d_z": "0:(0)", "enable_perspective_flip": false, "perspective_flip_theta": "0:(0)", "perspective_flip_phi": "0:(0)", "perspective_flip_gamma": "0:(0)", "perspective_flip_fv": "0:(53)", "noise_schedule": "0: (0.065)", "strength_schedule": "0: (0.65)", "contrast_schedule": "0: (1.0)", "cfg_scale_schedule": "0: (7)", "pix2pix_img_cfg_scale_schedule": "0:(1.5)", "enable_subseed_scheduling": false, "subseed_schedule": "0:(1)", "subseed_strength_schedule": "0:(0)", "enable_steps_scheduling": false, "steps_schedule": "0: (25)", "fov_schedule": "0: (70)", "aspect_ratio_schedule": "0: (1)", "near_schedule": "0: (200)", "far_schedule": "0: (10000)", "seed_schedule": "0:(s), 1:(-1), \"max_f-2\":(-1), \"max_f-1\":(s)", "enable_sampler_scheduling": false, "sampler_schedule": "0: (\"Euler a\")", "mask_schedule": "0: (\"{video_mask}\")", "use_noise_mask": false, "noise_mask_schedule": "0: (\"{video_mask}\")", "enable_checkpoint_scheduling": false, "checkpoint_schedule": "0: (\"model1.ckpt\"), 100: (\"model2.ckpt\")", "enable_clipskip_scheduling": false, "clipskip_schedule": "0: (2)", "enable_noise_multiplier_scheduling": true, "noise_multiplier_schedule": "0: (1.05)", "kernel_schedule": "0: (5)", "sigma_schedule": "0: (1.0)", "amount_schedule": "0: (0.1)", "threshold_schedule": "0: (0.0)", "color_coherence": "LAB", "color_coherence_image_path": "", "color_coherence_video_every_N_frames": 1.0, "color_force_grayscale": false, "diffusion_cadence": "2", "optical_flow_cadence": "None", "optical_flow_redo_generation": false, "diffusion_redo": "0", "noise_type": "perlin", "perlin_octaves": 4, "perlin_persistence": 0.5, "use_depth_warping": true, "midas_weight": 0.2, "padding_mode": "border", "sampling_mode": "bicubic", "save_depth_maps": false, "video_init_path": "https://deforum.github.io/a1/V1.mp4", "extract_nth_frame": 1, "extract_from_frame": 0, "extract_to_frame": -1, "overwrite_extracted_frames": false, "use_mask_video": false, "video_mask_path": "https://deforum.github.io/a1/VM1.mp4", "resume_from_timestring": false, "resume_timestring": "20230129210106", "hybrid_generate_inputframes": false, "hybrid_generate_human_masks": "None", "hybrid_use_first_frame_as_init_image": true, "hybrid_motion": "None", "hybrid_motion_use_prev_img": false, "hybrid_flow_method": "DIS Fine", "hybrid_composite": false, "hybrid_comp_mask_type": "None", "hybrid_comp_mask_inverse": false, "hybrid_comp_mask_equalize": "None", "hybrid_comp_mask_auto_contrast": false, "hybrid_comp_save_extra_frames": false, "hybrid_comp_alpha_schedule": "0:(0.5)", "hybrid_flow_factor_schedule": "0:(1)", "hybrid_comp_mask_blend_alpha_schedule": "0:(0.5)", "hybrid_comp_mask_contrast_schedule": "0:(1)", "hybrid_comp_mask_auto_contrast_cutoff_high_schedule": "0:(100)", "hybrid_comp_mask_auto_contrast_cutoff_low_schedule": "0:(0)", "parseq_manifest": null, "parseq_use_deltas": true, "use_looper": false, "init_images": "{\n \"0\": \"https://deforum.github.io/a1/Gi1.png\",\n \"max_f/4-5\": \"https://deforum.github.io/a1/Gi2.png\",\n \"max_f/2-10\": \"https://deforum.github.io/a1/Gi3.png\",\n \"3max_f/4-15\": \"https://deforum.github.io/a1/Gi4.jpg\",\n \"max_f-20\": \"https://deforum.github.io/a1/Gi1.png\"\n}", "image_strength_schedule": "0:(0.75)", "blendFactorMax": "0:(0.35)", "blendFactorSlope": "0:(0.25)", "tweening_frames_schedule": "0:(20)", "color_correction_factor": "0:(0.075)", "skip_video_creation": false, "fps": 15, "make_gif": false, "delete_imgs": false, "ffmpeg_location": "F:\ai\stable-diffusion-webui-directml\venv\lib\site-packages\imageio_ffmpeg\binaries\ffmpeg-win64-v4.2.2.exe", "ffmpeg_crf": "17", "ffmpeg_preset": "slow", "add_soundtrack": "None", "soundtrack_path": "https://deforum.github.io/a1/A1.mp3", "r_upscale_video": false, "r_upscale_model": "realesr-animevideov3", "r_upscale_factor": "x2", "r_upscale_keep_imgs": true, "store_frames_in_ram": false, "frame_interpolation_engine": "None", "frame_interpolation_x_amount": 2, "frame_interpolation_slow_mo_enabled": false, "frame_interpolation_slow_mo_amount": 2, "frame_interpolation_keep_imgs": false, "deforum_git_commit_id": "7e0f4b42 (Sat Apr 1 12:00:47 2023)" }

Webui core settings

{ "samples_save": true, "samples_format": "jpeg", "samples_filename_pattern": "", "save_images_add_number": true, "grid_save": false, "grid_format": "png", "grid_extended_filename": true, "grid_only_if_multiple": true, "grid_prevent_empty_spots": false, "n_rows": -1, "enable_pnginfo": true, "save_txt": true, "save_images_before_face_restoration": true, "save_images_before_highres_fix": true, "save_images_before_color_correction": true, "save_mask": false, "save_mask_composite": false, "jpeg_quality": 80, "webp_lossless": false, "export_for_4chan": true, "img_downscale_threshold": 4.0, "target_side_length": 4000, "img_max_size_mp": 200, "use_original_name_batch": true, "use_upscaler_name_as_suffix": false, "save_selected_only": true, "do_not_add_watermark": false, "temp_dir": "", "clean_temp_dir_at_start": false, "outdir_samples": "", "outdir_txt2img_samples": "outputs/txt2img-images", "outdir_img2img_samples": "outputs/img2img-images", "outdir_extras_samples": "outputs/extras-images", "outdir_grids": "", "outdir_txt2img_grids": "outputs/txt2img-grids", "outdir_img2img_grids": "outputs/img2img-grids", "outdir_save": "log/images", "save_to_dirs": false, "grid_save_to_dirs": false, "use_save_to_dirs_for_ui": false, "directories_filename_pattern": "[date]", "directories_max_prompt_words": 8, "ESRGAN_tile": 192, "ESRGAN_tile_overlap": 8, "realesrgan_enabled_models": [ "R-ESRGAN 4x+", "R-ESRGAN 4x+ Anime6B" ], "upscaler_for_img2img": null, "face_restoration_model": "CodeFormer", "code_former_weight": 1, "face_restoration_unload": true, "show_warnings": false, "memmon_poll_rate": 8, "samples_log_stdout": false, "multiple_tqdm": true, "print_hypernet_extra": false, "unload_models_when_training": false, "pin_memory": false, "save_optimizer_state": false, "save_training_settings_to_txt": true, "dataset_filename_word_regex": "", "dataset_filename_join_string": " ", "training_image_repeats_per_epoch": 1, "training_write_csv_every": 500, "training_xattention_optimizations": false, "training_enable_tensorboard": false, "training_tensorboard_save_images": false, "training_tensorboard_flush_every": 120, "sd_model_checkpoint": "perfectWorld_v2Baked.safetensors [79e42fb744]", "sd_checkpoint_cache": 0, "sd_vae_checkpoint_cache": 0, "sd_vae": "Automatic", "sd_vae_as_default": true, "inpainting_mask_weight": 1.0, "initial_noise_multiplier": 1.05, "img2img_color_correction": false, "img2img_fix_steps": false, "img2img_background_color": "#ffffff", "enable_quantization": false, "enable_emphasis": true, "enable_batch_seeds": true, "comma_padding_backtrack": 20, "CLIP_stop_at_last_layers": 1, "upcast_attn": false, "use_old_emphasis_implementation": false, "use_old_karras_scheduler_sigmas": false, "no_dpmpp_sde_batch_determinism": false, "use_old_hires_fix_width_height": false, "interrogate_keep_models_in_memory": false, "interrogate_return_ranks": false, "interrogate_clip_num_beams": 1, "interrogate_clip_min_length": 24, "interrogate_clip_max_length": 48, "interrogate_clip_dict_limit": 1500, "interrogate_clip_skip_categories": [], "interrogate_deepbooru_score_threshold": 0.5, "deepbooru_sort_alpha": true, "deepbooru_use_spaces": false, "deepbooru_escape": true, "deepbooru_filter_tags": "", "extra_networks_default_view": "cards", "extra_networks_default_multiplier": 1.0, "extra_networks_card_width": 0, "extra_networks_card_height": 0, "extra_networks_add_text_separator": " ", "sd_hypernetwork": "None", "return_grid": true, "return_mask": false, "return_mask_composite": false, "do_not_show_images": false, "add_model_hash_to_info": true, "add_model_name_to_info": true, "disable_weights_auto_swap": true, "send_seed": true, "send_size": true, "font": "", "js_modal_lightbox": true, "js_modal_lightbox_initially_zoomed": true, "show_progress_in_title": true, "samplers_in_dropdown": true, "dimensions_and_batch_together": true, "keyedit_precision_attention": 0.1, "keyedit_precision_extra": 0.05, "quicksettings": "sd_model_checkpoint", "hidden_tabs": [], "ui_reorder": "inpaint, sampler, checkboxes, hires_fix, dimensions, cfg, seed, batch, override_settings, scripts", "ui_extra_networks_tab_reorder": "", "localization": "None", "show_progressbar": true, "live_previews_enable": true, "show_progress_grid": true, "show_progress_every_n_steps": 10, "show_progress_type": "Approx cheap", "live_preview_content": "Prompt", "live_preview_refresh_period": 1000, "hide_samplers": [], "eta_ddim": 0.0, "eta_ancestral": 1.0, "ddim_discretize": "uniform", "s_churn": 0.0, "s_tmin": 0.0, "s_noise": 1.0, "eta_noise_seed_delta": 0, "always_discard_next_to_last_sigma": false, "uni_pc_variant": "bh1", "uni_pc_skip_type": "time_uniform", "uni_pc_order": 3, "uni_pc_lower_order_final": true, "postprocessing_enable_in_main_ui": [], "postprocessing_operation_order": [], "upscaling_max_images_in_cache": 5, "disabled_extensions": [], "disable_all_extensions": "none", "sd_checkpoint_hash": "79e42fb7445bb08cb16e92cfd57f3ab09b57f18b1b8bcb27cb5d5d4e19ac1eec", "ldsr_steps": 100, "ldsr_cached": false, "SWIN_tile": 192, "SWIN_tile_overlap": 8, "sd_lora": "None", "deforum_enable_persistent_settings": true, "deforum_persistent_settings_path": "models/Deforum/deforum_persistent_settings.txt", "dp_ignore_whitespace": false, "dp_write_raw_template": false, "dp_write_prompts_to_file": false, "dp_parser_variant_start": "{", "dp_parser_variant_end": "}", "dp_parser_wildcard_wrap": "__", "dp_limit_jinja_prompts": false, "dp_magicprompt_default_model": "Gustavosta/MagicPrompt-Stable-Diffusion", "dp_magicprompt_batch_size": 1 }

Console logs

Deforum extension for auto1111 webui, v2.3b
Git commit: 7e0f4b42 (Sat Apr  1 12:00:47 2023)
Saving animation frames to:
F:\ai\stable-diffusion-webui-directml\outputs/img2img-images\Deforum_20230403165542
Loading base model ()...Done.
Removing last two layers (global_pool & classifier).
Building Encoder-Decoder model..Done.
Error completing request
Arguments: ('task(s1u327f58g8886o)', None, False, '', '3D', 120, 'replicate', '0:(0)', '0:(1.0025-0.002/sin(1.25/3.14/t*30))', '0:(0)', '0:(0)', '0:(0)', '0:(0)', '0:(0)', '0:(360)', '0:(0)', '0:(0)', False, '0:(0)', '0:(0)', '0:(0)', '0:(53)', '0: (0.065)', '0: (0.65)', '0: (1.0)', '0: (7)', '0:(1.5)', False, '0:(1)', '0:(0)', False, '0: (25)', '0: (70)', '0: (1)', '0: (200)', '0: (10000)', '0:(s), 1:(-1), "max_f-2":(-1), "max_f-1":(s)', False, '0: ("Euler a")', '0: ("{video_mask}")', False, '0: ("{video_mask}")', False, '0: ("model1.ckpt"), 100: ("model2.ckpt")', False, '0: (2)', True, '0: (1.05)', '0: (5)', '0: (1.0)', '0: (0.1)', '0: (0.0)', 'LAB', '', 1.0, False, 2, 'None', False, '0', 'perlin', 8, 8, 4, 0.5, True, 0.2, 'border', 'bicubic', False, 'https://deforum.github.io/a1/V1.mp4', 1, 0, -1, False, False, 'https://deforum.github.io/a1/VM1.mp4', False, '20230129210106', '{\n    "0": "test sign",\n    "30": "test launch",\n    "60": "test site",\n    "90": "test plan"\n}', '', '', 960, 540, False, True, -1, 'Euler a', False, 0, 0, 20, 0.0, 1, True, True, False, False, False, 'Deforum_20230403165542', '{timestring}_{index}_{prompt}.png', 'iter', 1, False, False, True, 0.8, '', False, False, False, True, 'https://deforum.github.io/a1/M1.jpg', 1.0, 1.0, 4, 1, True, 4, 'reroll', 10.0, False, 15, False, False, 'FFMPEG mp4', 'F:\\ai\\stable-diffusion-webui-directml\\venv\\lib\\site-packages\\imageio_ffmpeg\\binaries\\ffmpeg-win64-v4.2.2.exe', '17', 'slow', 'None', 'https://deforum.github.io/a1/A1.mp3', False, 'realesr-animevideov3', 'x2', True, False, 'x0_pred', 'C:/SD/20230124234916_%09d.png', 'testvidmanualsettings.mp4', False, 'None', 2, False, 2, False, None, True, False, 'None', True, 'None', False, 'DIS Fine', False, 'None', False, 'None', False, False, '0:(0.5)', '0:(1)', '0:(0.5)', '0:(1)', '0:(100)', '0:(0)', False, '{\n    "0": "https://deforum.github.io/a1/Gi1.png",\n    "max_f/4-5": "https://deforum.github.io/a1/Gi2.png",\n    "max_f/2-10": "https://deforum.github.io/a1/Gi3.png",\n    "3*max_f/4-15": "https://deforum.github.io/a1/Gi4.jpg",\n    "max_f-20": "https://deforum.github.io/a1/Gi1.png"\n}', '0:(0.75)', '0:(0.35)', '0:(0.25)', '0:(20)', '0:(0.075)') {}
Traceback (most recent call last):
  File "F:\ai\stable-diffusion-webui-directml\modules\call_queue.py", line 56, in f
    res = list(func(*args, **kwargs))
  File "F:\ai\stable-diffusion-webui-directml\modules\call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "F:\ai\stable-diffusion-webui-directml\extensions\deforum-for-automatic1111-webui\scripts\deforum.py", line 86, in run_deforum
    render_animation(args, anim_args, video_args, parseq_args, loop_args, controlnet_args, root.animation_prompts, root)
  File "F:\ai\stable-diffusion-webui-directml/extensions/deforum-for-automatic1111-webui/scripts\deforum_helpers\render.py", line 120, in render_animation
    adabins_model = AdaBinsModel(root.models_path, keep_in_vram=keep_in_vram)
  File "F:\ai\stable-diffusion-webui-directml/extensions/deforum-for-automatic1111-webui/scripts\deforum_helpers\depth.py", line 150, in __new__
    cls._instance._initialize(*args, **kwargs)
  File "F:\ai\stable-diffusion-webui-directml/extensions/deforum-for-automatic1111-webui/scripts\deforum_helpers\depth.py", line 166, in _initialize
    self.adabins_helper = InferenceHelper(models_path=models_path, dataset='nyu', device=self.device)
  File "F:\ai\stable-diffusion-webui-directml/extensions/deforum-for-automatic1111-webui/scripts/deforum_helpers/src\infer.py", line 85, in __init__
    model, _, _ = model_io.load_checkpoint(pretrained_path, model)
  File "F:\ai\stable-diffusion-webui-directml/extensions/deforum-for-automatic1111-webui/scripts/deforum_helpers/src\model_io.py", line 37, in load_checkpoint
    ckpt = torch.load(fpath, map_location='cpu')
  File "F:\ai\stable-diffusion-webui-directml\modules\safe.py", line 106, in load
    return load_with_extra(filename, extra_handler=global_extra_handler, *args, **kwargs)
  File "F:\ai\stable-diffusion-webui-directml\modules\safe.py", line 151, in load_with_extra
    return unsafe_torch_load(filename, *args, **kwargs)
  File "F:\ai\stable-diffusion-webui-directml\venv\lib\site-packages\torch\serialization.py", line 777, in load
    with _open_zipfile_reader(opened_file) as opened_zipfile:
  File "F:\ai\stable-diffusion-webui-directml\venv\lib\site-packages\torch\serialization.py", line 282, in __init__
    super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

Additional information

No response

hithereai commented 1 year ago

Please read our faq in the wiki. Answer is waiting for ya ✋