diff --git a/Nodes/Segments.py b/Nodes/Segments.py
index a7baa8d..af156f4 100644
--- a/Nodes/Segments.py
+++ b/Nodes/Segments.py
@@ -489,7 +489,7 @@ class PrimereFaceAnalyzer:
if not os.path.exists(deepface_weights_path):
os.makedirs(deepface_weights_path)
os.environ["DEEPFACE_HOME"] = deepface_path
- required_weights = ['age_model_weights.h5', 'age_model_weights.h5', 'gender_model_weights.h5', 'race_model_single_batch.h5']
+ required_weights = ['age_model_weights.h5', 'facial_expression_model_weights.h5', 'gender_model_weights.h5', 'race_model_single_batch.h5']
for deepface_weights in required_weights:
deepface_file_path = os.path.join(deepface_weights_path, deepface_weights)
if not os.path.exists(deepface_file_path):
diff --git a/README.md b/README.md
index 6f0f526..3197b56 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
**Primere Youtube channel:** https://www.youtube.com/@PrimereComfydev/videos
-**3rd party nodepack depencency:** https://github.com/city96/ComfyUI_ExtraModels
+**Install 3rd party nodepack depencency:** https://github.com/city96/ComfyUI_ExtraModels
@@ -38,7 +38,7 @@ After nodepack update of **12/3/2024 - v1.0.2** ComfyUI front-end must be update
## Basic workflow:
-The difference between **minimal** and **basic** workflows, that **basic** workflow automatically detect and support several model concepts. The main difference between workflows the large node group `Concept sampler group` with lot of samplers (1 sampler / concept) and the main `Model concept selector` node.
+The main difference between **minimal** and **basic** workflows, that **basic** workflow automatically detect and support several model concepts. The main difference between workflows the large node group `Concept sampler group` with lot of samplers (1 sampler / concept) and the main `Model concept selector` node.
@@ -60,7 +60,7 @@ The difference between **minimal** and **basic** workflows, that **basic** workf
## Basic production workflow:
-The difference between **basic production** and **basic** workflows, that **basic production** workflow can use LLM prompt refiner (LLM models have to be installed locally) and face, eye, mouth, and hand refiner available. 4 prompt input for test, 4 prompt input for dev attached to prompt switcher.
+The main difference between **basic production** and **basic** workflows, that **basic production** workflow can use LLM prompt refiner (LLM models have to be installed locally) and face, eye, mouth, and hand refiner available. 4 prompt input for test, 4 prompt input for dev attached to prompt switcher.
@@ -73,5 +73,6 @@ The difference between **basic production** and **basic** workflows, that **basi
- Added 4 test and 4 development prompt inputs, easy to switch
- Local LLM models can help refine/repair prompts. Refined prompts can be added to original, replace original, or keep original as L prompt but send refined to T5-XXL clip is avalable in clip encoder node
- Customizable refiner blocks for face, eye, mouth, and hand refining. These nodes automatically downloads required segmentator models, check space before first usage
+- Refiner blocks using [DeepFace analyzer](https://github.com/serengil/deepface) if needed
\ No newline at end of file
diff --git a/Workflow/Manual/nodes/basic_production_workflow.md b/Workflow/Manual/nodes/basic_production_workflow.md
index ceefd4f..53b92be 100644
--- a/Workflow/Manual/nodes/basic_production_workflow.md
+++ b/Workflow/Manual/nodes/basic_production_workflow.md
@@ -175,6 +175,11 @@ Positive Example:
Negative Example:
"Deformed, blurry, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (blurred, blurry, vague:1.3), text, watermark"
+
+Positive Example if use Deepface analyzer:
+"1 (detailed detailed sharp closeup portrait picture of [age] year old):1.2 ([dominant_race] [dominant_gender] face):1.2, ([dominant_emotion] mood):1.2, natural skin, realistic photo quality detailed, high resolution, nicely proportioned"
+
+where the string between [key] will be changed by DeepFace analyzer
```
You can mix the original positive and negative prompts to refining process with `positive_original_strength` and `negative_original_strength` inputs
@@ -197,7 +202,12 @@ You can mix the original positive and negative prompts to refining process with
## Primere Image Segments Node:
-### Intelligent Size-Based Processing
+### DeepFace analyzer:
+4 switch available to use [DeepFace analyzer](https://github.com/serengil/deepface) to keep characteristic of original faces. These 4 attribute: `age`, `gender`, `race` and `emotion`. These four results will be used on the refiner's prompt if prompt contains string: `[key_of_attribute]`
+
+**This Python module change another modules by version. Make backup of your current Python libs before install DeepFace. If something wrong after installed DeepFace, just revert back the updated Python libs to previous state from backup.**
+
+### Intelligent Size-Based Processing:
- `trigger_high_off`: Skips refinement for large segments
- `trigger_low_off`: Ignores very small segments
- Size thresholds based on percentage of original image
diff --git a/Workflow/Manual/nodes/refiner_block.jpg b/Workflow/Manual/nodes/refiner_block.jpg
index ba4feec..a88ec6f 100644
Binary files a/Workflow/Manual/nodes/refiner_block.jpg and b/Workflow/Manual/nodes/refiner_block.jpg differ
diff --git a/Workflow/Manual/nodes/refiner_block_with_an.jpg b/Workflow/Manual/nodes/refiner_block_with_an.jpg
new file mode 100644
index 0000000..e5ab9b1
Binary files /dev/null and b/Workflow/Manual/nodes/refiner_block_with_an.jpg differ
diff --git a/Workflow/Manual/nodes/refiner_block_without_an.jpg b/Workflow/Manual/nodes/refiner_block_without_an.jpg
new file mode 100644
index 0000000..c3c4b97
Binary files /dev/null and b/Workflow/Manual/nodes/refiner_block_without_an.jpg differ