[Core] Registry for processing model inputs (#5214)

Co-authored-by: ywang96 <ywang@roblox.com>
This commit is contained in:
Cyrus Leung
2024-06-28 12:09:56 +00:00
committed by GitHub
co-authored by ywang96
parent 0d0e3a42ac
commit 5cbe8d155c
26 changed files with 784 additions and 398 deletions
@@ -1,4 +1,3 @@
from functools import lru_cache
from typing import Optional
from transformers import AutoImageProcessor
@@ -40,6 +39,3 @@ def get_image_processor(
raise e
return processor
cached_get_image_processor = lru_cache(get_image_processor)