Merge pull request #404 from evanshi80/main
Enabled remote VitMatte Model download
This commit is contained in:
+3
-3
@@ -1539,9 +1539,9 @@ class VITMatteModel:
|
||||
self.processor = processor
|
||||
|
||||
def load_VITMatte_model(model_name:str, local_files_only:bool=False) -> object:
|
||||
# if local_files_only:
|
||||
# model_name = Path(os.path.join(folder_paths.models_dir, "vitmatte"))
|
||||
model_name = Path(os.path.join(folder_paths.models_dir, "vitmatte"))
|
||||
if local_files_only:
|
||||
model_name = Path(os.path.join(folder_paths.models_dir, "vitmatte"))
|
||||
# model_name = Path(os.path.join(folder_paths.models_dir, "vitmatte"))
|
||||
from transformers import VitMatteImageProcessor, VitMatteForImageMatting
|
||||
model = VitMatteForImageMatting.from_pretrained(model_name, local_files_only=local_files_only)
|
||||
processor = VitMatteImageProcessor.from_pretrained(model_name, local_files_only=local_files_only)
|
||||
|
||||
Reference in New Issue
Block a user