s9roll7 / ebsynth_utility

AUTOMATIC1111 UI extension for creating videos using img2img and ebsynth.
1.25k stars 127 forks source link

IndexError: list index out of range on stage 2 #18

Closed eranmahalu closed 1 year ago

eranmahalu commented 1 year ago

Hi, when trying stage 2 of the process, I get: stage2

fps: 25.0 key_min_gap: 8 key_max_gap: 250 key_th: 8.5 Error completing request Arguments: (1, 'H:\Ebsynth_Animations\01_MaxWomanTest\ebsynth', 'C:\Users\USER\AppData\Local\Temp\1132xk9u1.mp4', -1, -1, 0, 0, False, False, '', '', 0.4, 11, 11, 10, 300, 8.5, True, 'hm-mkl-hm', True, False, False, 0, None, 1, 'mp4', '', 'Fit video length', 5, 0, 0, 'Normal') {} Traceback (most recent call last): File "C:\stable-diffusion-webui\modules\call_queue.py", line 56, in f res = list(func(*args, *kwargs)) File "C:\stable-diffusion-webui\modules\call_queue.py", line 37, in f res = func(args, **kwargs) File "C:\stable-diffusion-webui\extensions\ebsynth_utility\ebsynth_utility.py", line 85, in ebsynth_utility_process ebsynth_utility_stage2(dbg, project_args, key_min_gap, key_max_gap, key_th, key_add_last_frame, is_invert_mask) File "C:\stable-diffusion-webui\extensions\ebsynth_utility\stage2.py", line 153, in ebsynth_utility_stage2 keys = analyze_key_frames(frame_path, frame_mask_path, key_th, key_min_gap, key_max_gap, key_add_last_frame, is_invert_mask) File "C:\stable-diffusion-webui\extensions\ebsynth_utility\stage2.py", line 80, in analyze_key_frames key_frame = frames[0] IndexError: list index out of range

Please help

s9roll7 commented 1 year ago

I've made some fixes that may be relevant. It may work if you update and start over from stage1

eranmahalu commented 1 year ago

thanks, how do I know which version I have? I did not see an update

eranmahalu commented 1 year ago

This is the version I have, still with the same error: 644fb2a5

s9roll7 commented 1 year ago

Are the frame and mask successfully generated at stage1? Are the files created in the project directory?

eranmahalu commented 1 year ago

It only created the folder structure...nothing inside

s9roll7 commented 1 year ago

Try Delete the folder and start over.

eranmahalu commented 1 year ago

also did that, it only re-does the same process. i also got a sort of an error on stage 1 - saying NameError: name 'Loader' is not defined mask created

s9roll7 commented 1 year ago

Can you post the entire log?

eranmahalu commented 1 year ago

For stage 1

'ffmpeg' is not recognized as an internal or external command, operable program or batch file. frame extracted Settings -> Mode=base, Device=cuda:0, Torchscript=disabled ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ C:\Users\USER\AppData\Local\Programs\Python\Python310\lib\runpy.py:196 in _run_module_as_main │ │ │ │ 193 │ main_globals = sys.modules["main"].dict │ │ 194 │ if alter_argv: │ │ 195 │ │ sys.argv[0] = mod_spec.origin │ │ ❱ 196 │ return _run_code(code, main_globals, None, │ │ 197 │ │ │ │ │ "main", mod_spec) │ │ 198 │ │ 199 def run_module(mod_name, init_globals=None, │ │ │ │ C:\Users\USER\AppData\Local\Programs\Python\Python310\lib\runpy.py:86 in _run_code │ │ │ │ 83 │ │ │ │ │ loader = loader, │ │ 84 │ │ │ │ │ package = pkg_name, │ │ 85 │ │ │ │ │ spec = mod_spec) │ │ ❱ 86 │ exec(code, run_globals) │ │ 87 │ return run_globals │ │ 88 │ │ 89 def _run_module_code(code, init_globals=None, │ │ │ │ in │ │ │ │ 4 from transparent_background import console │ │ 5 if name == 'main': │ │ 6 │ sys.argv[0] = re.sub(r'(-script.pyw|.exe)?$', '', sys.argv[0]) │ │ ❱ 7 │ sys.exit(console()) │ │ 8 │ │ │ │ C:\stable-diffusion-webui\venv\lib\site-packages\transparent_background\Remover.py:181 in │ │ console │ │ │ │ 178 │ if save_dir is not None: │ │ 179 │ │ os.makedirs(save_dir, exist_ok=True) │ │ 180 │ │ │ ❱ 181 │ loader = eval(_format + 'Loader')(args.source) │ │ 182 │ frame_progress = tqdm.tqdm(total=len(loader), position=1 if (_format == 'Video' and │ │ 183 │ sample_progress = tqdm.tqdm(total=len(loader), desc='Total:', position=0, bar_format │ │ 184 │ writer = None │ │ in │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ NameError: name 'Loader' is not defined mask created

completed.

eranmahalu commented 1 year ago

stage2

fps: 25.0 key_min_gap: 8 key_max_gap: 250 key_th: 8.5 Error completing request Arguments: (1, 'F:\Ebsynth_Animations\01_MaxWomanTest\mxwmntst', 'C:\Users\USER\AppData\Local\Temp\28dndrn8w.mp4', -1, -1, 0, 0, False, False, '', '', 0.4, 11, 11, 10, 300, 8.5, True, 'hm-mkl-hm', True, False, False, 0, None, 1, 'mp4', '', 'Fit video length', 5, 0, 0, 'Normal') {} Traceback (most recent call last): File "C:\stable-diffusion-webui\modules\call_queue.py", line 56, in f res = list(func(*args, *kwargs)) File "C:\stable-diffusion-webui\modules\call_queue.py", line 37, in f res = func(args, **kwargs) File "C:\stable-diffusion-webui\extensions\ebsynth_utility\ebsynth_utility.py", line 85, in ebsynth_utility_process ebsynth_utility_stage2(dbg, project_args, key_min_gap, key_max_gap, key_th, key_add_last_frame, is_invert_mask) File "C:\stable-diffusion-webui\extensions\ebsynth_utility\stage2.py", line 153, in ebsynth_utility_stage2 keys = analyze_key_frames(frame_path, frame_mask_path, key_th, key_min_gap, key_max_gap, key_add_last_frame, is_invert_mask) File "C:\stable-diffusion-webui\extensions\ebsynth_utility\stage2.py", line 80, in analyze_key_frames key_frame = frames[0] IndexError: list index out of range

s9roll7 commented 1 year ago

https://github.com/s9roll7/ebsynth_utility#installation you need install ffmpeg

eranmahalu commented 1 year ago

success! thanks so much...now on stage 3, do i give img2img all of the frames? only one?

eranmahalu commented 1 year ago

you write in your tutorial on step 3 "Here is the settings for extension.

Mask Mode(Override img2img Mask mode) : Normal Img2Img Repeat Count : 5 Add N to seed when repeating : 1 use Face Crop img2img : True Face Detection Method : YuNet Max Crop Size : 1024 Face Denoising Strength : 0.25 Face Area Magnification : 1.5 (The larger the number, the closer to the model's painting style, but the more likely it is to shift when merged with the body.) Enable Face Prompt : False"

this is misunderstood...where is it in the extension?

s9roll7 commented 1 year ago

Select stage 3 and press generate, and you will see the instructions.

eranmahalu commented 1 year ago

thanks