From 90a0eb84b1a59504dd6645d13767c53a36f0c13f Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Sun, 18 Jan 2026 14:26:01 +0100 Subject: [PATCH] Add readme --- readme | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 readme diff --git a/readme b/readme new file mode 100644 index 0000000..62de164 --- /dev/null +++ b/readme @@ -0,0 +1,25 @@ +# ComfyUI Sharp Frame Selector + +A custom node for [ComfyUI](https://github.com/comfyanonymous/ComfyUI) that automatically filters video frames to select only the sharpest ones. + +This is a ComfyUI implementation of the logic found in [sharp-frames](https://github.com/Reflct/sharp-frames-python). It calculates the Laplacian variance of each frame to determine focus quality and selects the best candidates based on your chosen strategy. + +## Features + +- **No external CLI tools required**: Runs entirely within ComfyUI using OpenCV. +- **Batched Selection**: Perfect for videos. Divides the timeline into chunks (e.g., every 1 second) and picks the single sharpest frame from that chunk. Ensures you never miss a scene. +- **Best-N Selection**: Simply picks the top N sharpest frames from the entire batch, regardless of when they occur. +- **GPU Efficient**: Keeps image data on the GPU where possible, only moving small batches to CPU for the sharpness calculation. + +## Installation + +### Method 1: Manager (Recommended) +If this node is available in the ComfyUI Manager, search for "Sharp Frame Selector" and install. + +### Method 2: Manual +Clone this repository into your `custom_nodes` folder: + +```bash +cd ComfyUI/custom_nodes/ +git clone [https://github.com/YOUR_USERNAME/ComfyUI-Sharp-Selector.git](https://github.com/YOUR_USERNAME/ComfyUI-Sharp-Selector.git) +pip install -r ComfyUI-Sharp-Selector/requirements.txt \ No newline at end of file