V 1.0.6 - deepface 4 - file check

This commit is contained in:
DESKTOP-CNFQ7PM\Primere
2024-12-28 14:58:07 +01:00
parent 2c6b6bd5d4
commit 1dcefa7acf
6 changed files with 16 additions and 5 deletions
+1 -1
View File
@@ -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):
+4 -3
View File
@@ -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
<hr>
@@ -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.
<img src="./Workflow/Manual/wf_basic.jpg" width="800px">
@@ -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.
<img src="./Workflow/Manual/wf_basic_prod.jpg" width="800px">
@@ -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
<hr>
@@ -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
Binary file not shown.

Before

Width:  |  Height:  |  Size: 666 KiB

After

Width:  |  Height:  |  Size: 688 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB