light-and-ray / sd-webui-replacer

A tab for sd-webui for replacing objects in pictures or videos using detection prompt
208 stars 11 forks source link

Getting This Error While Generating Video #102

Closed RFedz007989 closed 2 months ago

RFedz007989 commented 2 months ago

Hi,

Hope you are doing good. I am geting this error again & again while generating (Replacer Video). Pls check the below mentioned error.

(AttributeError: 'ControlNetUnit' object has no attribute 'copy')

Pls Assist where I am going/doing wrong. Thank You

light-and-ray commented 2 months ago

Maybe the version of something is too old

light-and-ray commented 2 months ago

Show me versions of a1111 webui, controlnet extension, replacer extension, animatediff extension

RFedz007989 commented 2 months ago

I am using Forge not a1111 might this be the issue I don't know or should I use a1111. Thank You.

light-and-ray commented 2 months ago

Yes, you should install a1111. I tried to support Forge, but its author ignored my patches, abandoned the project, then broke everything, uses master branch as dev. Idk how to say, but he is strange 🤷🏻‍♂️

light-and-ray commented 2 months ago

You can use symbolic links or cmd flags to share models, loras etc across different UIs

RFedz007989 commented 2 months ago

Yes, you should install a1111. I tried to support Forge, but its author ignored my patches, abandoned the project, then broke everything, uses master branch as dev. Idk how to say, but he is strange 🤷🏻‍♂️

Sorry to hear Forge rejected your project. As you suggested I will download A1111. Thanks

RFedz007989 commented 2 months ago

As you suggested I downloaded A1111 & yes now It's working, but when came to video generation It gave me rror. {ffmpeg exited with code 1}

light-and-ray commented 2 months ago

It can be anything because ffmpeg error is caused by different error. Show me your console log, or find the actual error there

RFedz007989 commented 2 months ago

This is my console.

{[image2 @ 0000017637bfc6c0] Could find no file with path 'D:\ForgeWebUI\SD 2024\New folder\Videos\Replacer project - 1726524831\outputs\1726525222\result\%5d-3950909010.png' and index in the range 0-4 D:\ForgeWebUI\SD 2024\New folder\Videos\Replacer project - 1726524831\outputs\1726525222\result\%5d-3950909010.png: No such file or directory Error completing request Arguments: ('task(g5brcjxlpmpvqx0)', 'D:\ForgeWebUI\SD 2024\New folder\Videos\Replacer project - 1726524831', 2, 36, 0, 12, 1, -1, 1, 16, False, 'None', 1, True, 'epicphotogasm_x-inpainting.safetensors [28875d1024]', 'None', '', '', 'colorful swimsuit', '', 'None', -1, 'DPM++ 2M SDE', 'Automatic', 20, 0.3, 35, 4, 1280, 'sam_hq_vit_h.pth', 'GroundingDINO_SwinT_OGC (694MB)', 5.5, 1, 90, 0, 512, 512, 0, False, False, 'epicphotogasm_x-inpainting.safetensors [28875d1024]', 'Random', True, 1, False, False, False, '-', -1, 0, False, True, True, False, 1, 0.5, 4, 0, 0.5, 2) {} Traceback (most recent call last): File "D:\ForgeWebUI\SD 2024\New folder\setup\stable-diffusion-webui\modules\call_queue.py", line 74, in f res = list(func(*args, kwargs)) File "D:\ForgeWebUI\SD 2024\New folder\setup\stable-diffusion-webui\modules\call_queue.py", line 53, in f res = func(*args, *kwargs) File "D:\ForgeWebUI\SD 2024\New folder\setup\stable-diffusion-webui\modules\call_queue.py", line 37, in f res = func(args, kwargs) File "D:\ForgeWebUI\SD 2024\New folder\setup\stable-diffusion-webui\extensions\sd-webui-replacer\replacer\ui\video\generation.py", line 170, in videoGenerateUI save_video(resultPath, target_video_fps, originalVideo, saveVideoPath, gArgs.seed) File "D:\ForgeWebUI\SD 2024\New folder\setup\stable-diffusion-webui\extensions\sd-webui-replacer\replacer\video_tools.py", line 63, in save_video runFFMPEG( File "D:\ForgeWebUI\SD 2024\New folder\setup\stable-diffusion-webui\extensions\sd-webui-replacer\replacer\video_tools.py", line 20, in runFFMPEG raise Exception(f'ffmpeg exited with code {rc}. See console for details') Exception: ffmpeg exited with code 1. See console for details}

Can you find the exact cause of this error.

Actually I think this might be the reason for this error ([image2 @ 0000017637bfc6c0] Could find no file with path 'D:\ForgeWebUI\SD 2024\New folder\Videos\Replacer project - 1726524831\outputs\1726525222\result\%5d-3950909010.png' and index in the range 0-4 D:\ForgeWebUI\SD 2024\New folder\Videos\Replacer project - 1726524831\outputs\1726525222\result\%5d-3950909010.png: No such file or directory)

Thank You

light-and-ray commented 2 months ago

The actual error is above. But I've already seen that you use inpainting model, but model for animatediff must be non-inpainting

light-and-ray commented 2 months ago

In this case you get unavoidable out of memory error, because you use wrong model. But when you'll fix this you still can get OOM error, and considering your amout of vram, use --medvram flag and reduce number of animatediff batch size

RFedz007989 commented 2 months ago

No actually I am using frame by frame & not animated one. I am having RTX 3060 12 GB VRAM. Can you pls suggest me which model to use for Replacer-Video.

I am using this (Frame by frame mode) Below It states that (! Frame by frame mode temporary doesn't work !)

light-and-ray commented 2 months ago

You can't use it because it isn't implemented. You use animatediff in any case