mirror of
https://github.com/facefusion/facefusion.git
synced 2026-08-08 01:58:37 +02:00
Asset Tools Part1 (#1217)
* fix import * introduce collect vision frame from asset, add is_vision_frame everywhere, rename to vision_buffer * fix lint * fix lint * fix lint
This commit is contained in:
@@ -8,7 +8,6 @@ from typing import Tuple
|
||||
from unittest.mock import patch
|
||||
|
||||
import cv2
|
||||
import numpy
|
||||
import pytest
|
||||
|
||||
from facefusion import rtc, rtc_store, state_manager
|
||||
@@ -19,7 +18,7 @@ from facefusion.download import conditional_download
|
||||
from facefusion.hash_helper import create_hash
|
||||
from facefusion.libraries import aom as aom_module, datachannel as datachannel_module, vpx as vpx_module
|
||||
from facefusion.types import Buffer, BufferPack, FrameHandler, RtcPeer, RtcPeerVideo, Time, VideoCodec
|
||||
from facefusion.vision import read_video_frame
|
||||
from facefusion.vision import is_vision_frame, read_video_frame
|
||||
from .assert_helper import get_test_example_file, get_test_examples_directory
|
||||
|
||||
|
||||
@@ -178,7 +177,7 @@ def test_create_and_destroy_video_decoder(video_codec : VideoCodec) -> None:
|
||||
|
||||
video_decoder = create_video_decoder(video_codec)
|
||||
|
||||
assert numpy.any(decode_video_frame(video_codec, video_decoder, encode_buffer))
|
||||
assert is_vision_frame(decode_video_frame(video_codec, video_decoder, encode_buffer))
|
||||
|
||||
destroy_video_decoder(video_codec, video_decoder)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user