mirror of
https://github.com/s0md3v/roop.git
synced 2025-12-06 18:08:29 +00:00
ignore
This commit is contained in:
parent
f38239e370
commit
9aa5023642
@ -6,8 +6,20 @@ from keras import Model
|
||||
|
||||
from roop.typing import Frame
|
||||
|
||||
PREDICTOR = None
|
||||
THREAD_LOCK = threading.Lock()
|
||||
MAX_PROBABILITY = 0.85
|
||||
|
||||
|
||||
def get_predictor() -> Model:
|
||||
global PREDICTOR
|
||||
|
||||
with THREAD_LOCK:
|
||||
if PREDICTOR is None:
|
||||
PREDICTOR = opennsfw2.make_open_nsfw_model()
|
||||
return PREDICTOR
|
||||
|
||||
|
||||
def clear_predictor() -> None:
|
||||
global PREDICTOR
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user