nicofdga / DZ-FaceDetailer

a node for comfyui for restore/edit/enchance faces utilizing face recognition
MIT License
152 stars 14 forks source link

I found __init__.py always download face_yolov8n.pt ,if else function is not working. so I comment it . #9

Closed Erwin11 closed 11 months ago

Erwin11 commented 11 months ago

Hello, I comment download_model function in the lastest version commit 4924839365b9661d4d3433bd6d4c098df5043cdf Date: Fri Dec 8 06:34:23 2023 -0300

Because face_yolov8n.pt model is already here.Place in Both of these folders :

ComfyUI_windows_portable\ComfyUI\custom_nodes\DZ-FaceDetailer\yolo\face_yolov8n.pt ComfyUI_windows_portable\ComfyUI\models\DZ-FaceDetailer\yolo\face_yolov8n.pt

BUT, else function always download the model at start comfyui run.bat

My Suggestion it just tell users where to download & put it to which folder ,is OK no necessary to make it automatically ,keep it simple is OK.

console.log: just show all about this plugin

[tinyterraNodes] Loaded FaceDetailer: Model dir already exists FaceDetailer: Model doesnt exist FaceDetailer: Downloading model Downloading: 100%|███████████████████████████████████████████████████████████████| 5.92M/5.92M [00:02<00:00, 2.16MiB/s] FaceDetailer: Model dowload finished Searge-SDXL v4.3.1 in E:\AI\ComfyUI\ComfyUI-webui\ComfyUI_windows_portable\ComfyUI\custom_nodes\SeargeSDXL

model folder

log

oliverban commented 11 months ago

So, how did you fix this? :)

Erwin11 commented 11 months ago

@oliverban

Once you download model put this in yolo folder, just comment it in initpy file , comfyui will not show red warnning again . fix reboot comfyui, loading this plugin will skip model checking after this.

This is a simplistic, palliative approach, not the best way I think.

nicofdga commented 11 months ago

thanks for the warning! I hadn't noticed it, I forgot to change the path in the download logic when checking if the model file exists.

In theory now it's working. I pushed the fix.

image image