deforum-art / sd-webui-deforum

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

No module named 'py3d_tools' #46

Closed emmajane1313 closed 1 year ago

emmajane1313 commented 2 years ago

Have looked at previous issues on this same topic and solutions aren't clear / don't work. #28 and #34

Running this on a google colab notebook and have correctly named the folder deforum in the extensions folder of stable-diffusion-webui

Deforum script for 2D, pseudo-2D and 3D animations
v0.5-webui-beta
Additional models path: /content/gdrive/MyDrive/sd/stable-diffusion-webui/models/Deforum
['/content/gdrive/MyDrive/sd/stable-diffusion/src/k-diffusion', '/content/gdrive/MyDrive/sd/stable-diffusion-webui', '/content/gdrive/MyDrive/sd/stable-diffusion-webui', '/env/python', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/dist-packages', '/usr/lib/python3/dist-packages', '/content/gdrive/MyDrive/sd/stable-diffusion', '/content/gdrive/MyDrive/sd/stable-diffusion/src/taming-transformers', '/content/gdrive/MyDrive/sd/stable-diffusion/src/codeformer', '/content/gdrive/MyDrive/sd/stable-diffusion/src/blip', '/usr/local/lib/python3.7/dist-packages/IPython/extensions', '/tmp/tmp2_ivv8oz', '/content/gdrive/MyDrive/sd/stable-diffusion/scripts/deforum/src', '/content/gdrive/MyDrive/sd/stable-diffusion/extensions/deforum/scripts/deforum/src']
/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/deforum/scripts/deforum/generate.py:104: DeprecationWarning: invalid escape sequence \S
  """, re.VERBOSE)
/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/deforum/scripts/deforum/prompt.py:91: DeprecationWarning: invalid escape sequence \:
  """, re.VERBOSE)
Error completing request
Arguments: (False, '', '2D', 120, 'replicate', '0:(0)', '0:(1.02+0.02*sin(2*3.14*t/20))', '0:(0)', '0:(0)', '0:(10)', '0:(0)', '0:(0)', '0:(0)', False, '0:(0)', '0:(t%15)', '0:(0)', '0:(53)', '0: (0.08)', '0: (0.6)', '0: (1.0)', '0: (7)', '0: (40)', '0: (200)', '0: (10000)', '0: (t%4294967293)', 'Match Frame 0 LAB', 1, True, 0.3, 200.0, 10000.0, 40.0, 'border', 'bicubic', False, '/content/video_in.mp4', 1, False, False, '/content/video_in.mp4', False, 4, False, '20220829210106', '[\n    "a beautiful forest by Asher Brown Durand, trending on Artstation",\n    "a beautiful portrait of a woman by Artgerm, trending on Artstation"\n]\n', '{\n    "0": "apple:`where(cos(6.28*t/10)>0, 2*cos(6.28*t/10), 0.001)`, strawberry:`where(cos(6.28*t/10)<0, -2*cos(6.28*t/10), 0.001)`, snow, detailed painting by greg rutkowski --neg apple:`where(cos(6.28*t/10)<0, -2*cos(6.28*t/10), 0.001)`, strawberry:`where(cos(6.28*t/10)>0, 2*cos(6.28*t/10), 0.001)`",\n    "60": "a beautiful (((banana))), trending on Artstation",\n    "80": "a beautiful coconut --neg photo, realistic",\n    "100": "a beautiful durian, trending on Artstation"\n}\n', 512, 512, False, False, False, 0, 0, -1, 0, False, -1, 0, 0, 0, 21, 0.0, 1, False, 1, True, True, False, False, False, False, 'Deforum', '{timestring}_{index}_{prompt}.png', 'iter', False, False, True, 0, 'https://user-images.githubusercontent.com/14872007/195867706-d067cdc6-28cd-450b-a61e-55e25bc67010.png', False, False, False, True, 'https://www.filterforge.com/wiki/images/archive/b/b7/20080927223728%21Polygonal_gradient_thumb.jpg', 1.0, 5.0, False, 12.0, 'PIL gif', 'ffmpeg', False, 'snowfall.mp3', False, False, 200.0, 'x0_pred', '/content/drive/MyDrive/AI/StableDiffusion/2022-09/20220903000939_%05d.png', '/content/drive/MyDrive/AI/StableDiffusion/content/drive/MyDrive/AI/StableDiffusion/2022-09/kabachuha/2022-09/20220903000939.mp4', '<p style="font-weight:bold;margin-bottom:0.75em">Deforum v0.5-webui-beta</p>', "<p>Made by deforum.github.io, port for AUTOMATIC1111's webui maintained by kabachuha</p>", '<p>Original Deforum Github repo  github.com/deforum/stable-diffusion</p>', "<p>This fork for auto1111's webui github.com/deforum-art/deforum-for-automatic1111-webui</p>", '<p>Join the official Deforum Discord discord.gg/deforum to share your creations and suggestions</p>', '<p>User guide for v0.5 docs.google.com/document/d/1pEobUknMFMkn8F5TMsv8qRzamXX_75BShMMXV8IFslI/edit</p>', '<p>Math keyframing explanation docs.google.com/document/d/1pfW1PwbDIuW0cv-dnuyYj1UzPqe23BlSLTJsqazffXM/edit?usp=sharing</p>', '<p style="font-weight:bold;margin-bottom:0.75em">Import settings from file</p>', '<p style="font-weight:bold;margin-bottom:0.75em">Animation settings</p>', '<p style="margin-bottom:0.75em">Motion parameters:</p>', '<p style="margin-bottom:0.75em">2D and 3D settings</p>', '<p style="margin-bottom:0.75em">Prespective flip — Low VRAM pseudo-3D mode:</p>', '<p style="margin-bottom:0.75em">Coherence:</p>', '<p style="margin-bottom:0.75em">3D Depth Warping:</p>', '<p style="margin-bottom:0.75em">Video Input:</p>', '<p style="margin-bottom:0.75em">Interpolation (turned off atm)</p>', '<p style="margin-bottom:0.75em">Resume animation:</p>', '<p style="font-weight:bold;margin-bottom:0.75em">Prompts</p>', '<p>`animation_mode: None` batches on list of *prompts*. (Batch mode disabled atm, only animation_prompts are working)</p>', '<p style="font-weight:bold">*Important change from vanilla Deforum!*</p>', '<p style="font-weight:italic">This script uses the built-in webui weighting settings.</p>', '<p style="font-weight:italic">So if you want to use math functions as prompt weights,</p>', '<p style="font-weight:italic">keep the values above zero in both parts</p>', '<p style="font-weight:italic">Negative prompt part can be specified with --neg</p>', '<p style="font-weight:bold;margin-bottom:0.75em">Run settings</p>', '<p style="margin-bottom:0.75em">Sampling settings</p>', '<p style="margin-bottom:0.75em">3D Fov settings:</p>', '', '', '', '<p style="margin-bottom:0.75em">Batch settings</p>', '<p style="margin-bottom:0.75em">Init settings</p>', '<p style="margin-bottom:0.75em">3D settings</p>', '<p style="margin-bottom:0.75em">Generation settings:</p>', '<p style="margin-bottom:0.75em">Video output settings</p>', '<p style="margin-bottom:0.75em">To enable seed schedule select seed behavior — \'schedule\'</p>') {}
Traceback (most recent call last):
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui.py", line 185, in f
    res = list(func(*args, **kwargs))
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 63, in f
    res = func(*args, **kwargs)
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/deforum/scripts/deforum.py", line 226, in run_deforum
    processed = DeforumScript.run(None, p, override_settings_with_file, custom_settings_file, animation_mode, max_frames, border, angle, zoom, translation_x, translation_y, translation_z, rotation_3d_x, rotation_3d_y, rotation_3d_z, flip_2d_perspective, perspective_flip_theta, perspective_flip_phi, perspective_flip_gamma, perspective_flip_fv, noise_schedule, strength_schedule, contrast_schedule, cfg_scale_schedule, fov_schedule, near_schedule, far_schedule, seed_schedule, color_coherence, diffusion_cadence, use_depth_warping, midas_weight, near_plane, far_plane, fov, padding_mode, sampling_mode, save_depth_maps, video_init_path, extract_nth_frame, overwrite_extracted_frames, use_mask_video, video_mask_path, interpolate_key_frames, interpolate_x_frames, resume_from_timestring, resume_timestring, prompts, animation_prompts, W, H, restore_faces, tiling, enable_hr, firstphase_width, firstphase_height, seed, sampler, seed_enable_extras, subseed, subseed_strength, seed_resize_from_w, seed_resize_from_h, steps, ddim_eta, n_batch, make_grid, grid_rows, save_settings, save_samples, display_samples, save_sample_per_step, show_sample_per_step, override_these_with_webui, batch_name, filename_format, seed_behavior, use_init, from_img2img_instead_of_link, strength_0_no_init, strength, init_image, use_mask, use_alpha_as_mask, invert_mask, overlay_mask, mask_file, mask_brightness_adjust, mask_overlay_blur, skip_video_for_run_all, fps, output_format, ffmpeg_location, add_soundtrack, soundtrack_path, use_manual_settings, render_steps, max_video_frames, path_name_modifier, image_path, mp4_path, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25, i26, i27, i28, i29, i30, i31, i32, i33, i34, i35, i36)
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/deforum/scripts/deforum.py", line 63, in run
    from scripts.deforum.render import render_animation, render_input_video
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/deforum/scripts/deforum/render.py", line 13, in <module>
    from .generate import generate, add_noise
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/deforum/scripts/deforum/generate.py", line 23, in <module>
    from .animation import sample_from_cv2, sample_to_cv2
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/deforum/scripts/deforum/animation.py", line 5, in <module>
    import py3d_tools as p3d
ModuleNotFoundError: No module named 'py3d_tools'
kabachuha commented 2 years ago

From your log /content/gdrive/MyDrive/sd/stable-diffusion/extensions/deforum/scripts/deforum/src

not stable-diffusion-webui

so rename your GDrive folder

Funofabot commented 2 years ago

This is another example of the change that was made recently with WEBUI. Backup and remove the extension from the extensions folder and use webui to install the Deforum extension. The dependency errors should cease.

Sylvainsbrr commented 2 years ago

This is another example of the change that was made recently with WEBUI. Backup and remove the extension from the extensions folder and use webui to install the Deforum extension. The dependency errors should cease.

Installed with the updated webui and same error. I run it localy.

pqslam commented 2 years ago

I ve encountered this issue. I run on colab and Installed this extension with the newest webui, but it's not working. I already check the url of my files with the configuration in deforum.py (from line 53).

Funofabot commented 2 years ago

so this happens when the extension not is in a directory named extensions/deforum-for-automatic1111-webui or extensions/deforum

check the name that the extension installed as hope that helps =)

Funofabot commented 2 years ago

Need to figure out how to make this not a problem. in deforum.py sys.path.extend([ os.getcwd()+'/scripts/deforum_helpers/src', os.getcwd()+'/extensions/deforum/scripts/deforum_helpers/src', os.getcwd()+'/extensions/deforum-for-automatic1111-webui/scripts/deforum_helpers/src', ]) The name of the extensions/{directory} needs to match one of the above.

pqslam commented 2 years ago
Screen Shot 2022-11-12 at 1 43 41 PM Screen Shot 2022-11-12 at 1 44 58 PM Screen Shot 2022-11-12 at 1 45 50 PM

As I said in previous post, I checked the configuration and my file locations.

cheezecrisp commented 1 year ago

same issue, the path is correct but the error still occurs

KAYJ12 commented 1 year ago

I was running into this same issue and was able to resolve it by placing the Stable diffusion model here:

Screen Shot 2022-12-07 at 1 37 05 AM

Then reloaded the model in colab and it did the trick. Hope that helps

CJohnDesign commented 1 year ago

I ve encountered this issue. I run on colab and Installed this extension with the newest webui, but it's not working. I already check the url of my files with the configuration in deforum.py (from line 53).

This helped me but I'm getting a new error now.

Error completing request
Arguments: ('https://github.com/deforum-art/deforum-for-automatic1111-webui', ['ads', 'localization']) {}
Traceback (most recent call last):
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 45, in f
    res = list(func(*args, **kwargs))
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui_extensions.py", line 153, in install_extension_from_index
    ext_table, message = install_extension_from_url(None, url)
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui_extensions.py", line 117, in install_extension_from_url
    check_access()
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui_extensions.py", line 20, in check_access
    assert not shared.cmd_opts.disable_extension_access, "extension access disabled because of command line flags"
AssertionError: extension access disabled because of command line flags
CJohnDesign commented 1 year ago

I ve encountered this issue. I run on colab and Installed this extension with the newest webui, but it's not working. I already check the url of my files with the configuration in deforum.py (from line 53).

This helped me but I'm getting a new error now.

Error completing request
Arguments: ('https://github.com/deforum-art/deforum-for-automatic1111-webui', ['ads', 'localization']) {}
Traceback (most recent call last):
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/call_queue.py", line 45, in f
    res = list(func(*args, **kwargs))
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui_extensions.py", line 153, in install_extension_from_index
    ext_table, message = install_extension_from_url(None, url)
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui_extensions.py", line 117, in install_extension_from_url
    check_access()
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui_extensions.py", line 20, in check_access
    assert not shared.cmd_opts.disable_extension_access, "extension access disabled because of command line flags"
AssertionError: extension access disabled because of command line flags

Just to share, I fixed this error by unchecking Gradio server on start and it works.

kabachuha commented 1 year ago

I think I can close this issue now as the error reports subsided