feat: HF_TransformersClassifierProvider - allows local path
https://github.com/ltdrdata/ComfyUI-Impact-Pack/issues/645
This commit is contained in:
@@ -257,7 +257,7 @@ This custom node helps to conveniently enhance images through Detector, Detailer
|
||||
|
||||
### HuggingFace nodes
|
||||
* These nodes provide functionalities based on HuggingFace repository models.
|
||||
* The path where the HuggingFace model cache is stored can be changed through the `TRANSFORMERS_CACHE` environment variable.
|
||||
* The path where the HuggingFace model cache is stored can be changed through the `HF_HOME` environment variable.
|
||||
* `HF Transformers Classifier Provider` - This is a node that provides a classifier based on HuggingFace's transformers models.
|
||||
* The 'repo id' parameter should contain HuggingFace's repo id. When `preset_repo_id` is set to `Manual repo id`, use the manually entered repo id in `manual_repo_id`.
|
||||
* e.g. 'rizvandwiki/gender-classification-2' is a repository that provides a model for gender classification.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import configparser
|
||||
import os
|
||||
|
||||
version_code = [5, 13, 4]
|
||||
version_code = [5, 14]
|
||||
version = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')
|
||||
|
||||
dependency_version = 21
|
||||
|
||||
@@ -42,7 +42,7 @@ class HF_TransformersClassifierProvider:
|
||||
else:
|
||||
device = "cpu"
|
||||
|
||||
classifier = pipeline(model=url, device=device)
|
||||
classifier = pipeline('image-classification', model=url, device=device)
|
||||
|
||||
return (classifier,)
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui-impact-pack"
|
||||
description = "This extension offers various detector nodes and detailer nodes that allow you to configure a workflow that automatically enhances facial details. And provide iterative upscaler."
|
||||
version = "5.13.4"
|
||||
version = "5.14"
|
||||
license = "LICENSE"
|
||||
dependencies = ["segment-anything", "scikit-image", "piexif", "transformers", "opencv-python-headless", "GitPython", "scipy>=1.11.4"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user