Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The animation almost finishes but pauses on the last frame of the UI #236

Open
MotorCityCobra opened this issue May 18, 2023 · 2 comments
Open
Labels
bug Something isn't working

Comments

@MotorCityCobra
Copy link

Then there is this in the terminal.

Received classifier obfuscation. Exceeded nsfw threshold
adjusting request, will retry 3 more times
17%|█████████████▋ | 12/72 [00:55<05:15, 5.25s/it]Received classifier obfuscation. Exceeded nsfw threshold
adjusting request, will retry 5 more times
56%|█████████████████████████████████████████████▌ | 40/72 [02:49<01:54, 3.59s/it]Received classifier obfuscation. Exceeded nsfw threshold
adjusting request, will retry 5 more times
58%|███████████████████████████████████████████████▊ | 42/72 [03:00<02:11, 4.37s/it]Received classifier obfuscation. Exceeded nsfw threshold
adjusting request, will retry 5 more times
69%|████████████████████████████████████████████████████████▉ | 50/72 [03:36<01:32, 4.20s/it]Received classifier obfuscation. Exceeded nsfw threshold
adjusting request, will retry 5 more times
71%|██████████████████████████████████████████████████████████ | 51/72 [03:42<01:40, 4.79s/it]Received classifier obfuscation. Exceeded nsfw threshold
adjusting request, will retry 5 more times
86%|██████████████████████████████████████████████████████████████████████▌ | 62/72 [04:27<00:36, 3.69s/it]Received classifier obfuscation. Exceeded nsfw threshold
adjusting request, will retry 5 more times
Received classifier obfuscation. Exceeded nsfw threshold
adjusting request, will retry 4 more times
100%|██████████████████████████████████████████████████████████████████████████████████| 72/72 [05:09<00:00, 4.30s/it]
Traceback (most recent call last):
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\routes.py", line 414, in run_predict
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\blocks.py", line 1323, in process_api
result = await self.call_function(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\blocks.py", line 1067, in call_function
prediction = await utils.async_iteration(iterator)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\utils.py", line 339, in async_iteration
return await iterator.anext()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\utils.py", line 332, in anext
return await anyio.to_thread.run_sync(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\utils.py", line 315, in run_sync_iterator_async
return next(iterator)
^^^^^^^^^^^^^^
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\stability_sdk\animation_ui.py", line 670, in render
create_video_from_frames(outdir, output_video, fps=args.fps, reverse=args.reverse)
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\stability_sdk\utils.py", line 240, in create_video_from_frames
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1024, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1509, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified
Traceback (most recent call last):
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\stability_sdk\animation_ui.py", line 372, in postprocess_video
create_video_from_frames(outdir, output_video, fps=fps, reverse=reverse)
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\stability_sdk\utils.py", line 240, in create_video_from_frames
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1024, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 1509, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified
Traceback (most recent call last):
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\routes.py", line 414, in run_predict
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\blocks.py", line 1326, in process_api
data = self.postprocess_data(fn_index, result["prediction"], state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\blocks.py", line 1251, in postprocess_data
prediction_value = postprocess_update_dict(
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\blocks.py", line 434, in postprocess_update_dict
prediction_value["value"] = block.postprocess(prediction_value["value"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\components.py", line 2156, in postprocess
processed_files = (self._format_video(y), None)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\components.py", line 2215, in _format_video
video = self.make_temp_copy_if_needed(video)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\components.py", line 250, in make_temp_copy_if_needed
temp_dir = self.hash_file(file_path)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ooo\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\components.py", line 222, in hash_file
with open(file_path, "rb") as f:
^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '.\My amazing animation\My amazing animation (1).mp4'

@pharmapsychotic
Copy link
Member

ah it may not be handling ffmpeg.exe missing very well. here are instructions on downloading ffmpeg for Windows https://phoenixnap.com/kb/ffmpeg-windows you should be able to run ffmpeg -h in the Command Prompt

@pharmapsychotic pharmapsychotic added the bug Something isn't working label Jun 29, 2023
@pharmapsychotic
Copy link
Member

I'm marking as bug. I think we should do some check to ensure ffmpeg is available before starting the animation render to catch it early so there isn't the surprise that something is missing from installation only after the animation completes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants