From aaedbcce17e57ceab7153475711912d3d17447ac Mon Sep 17 00:00:00 2001 From: Fillip Date: Wed, 5 Aug 2026 00:34:10 -0700 Subject: [PATCH] Lock prompt edits to beat grid --- README.md | 2 +- pyproject.toml | 2 +- .../audio/FL_Audio_Beat_Prompt_Schedule.js | 149 +++++++++++------- 3 files changed, 92 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index d2be463..3b0e1c6 100644 --- a/README.md +++ b/README.md @@ -325,7 +325,7 @@ Fill-Nodes is a versatile collection of custom nodes for ComfyUI that extends fu |------|-------------| | `FL_Audio_BPM_Analyzer` | Analyzes audio using librosa to detect BPM and beat positions, with options for two BPM calculation methods (beat_intervals or onset_strength), beat offset adjustment, and automatic beat filling to cover the entire audio duration. Outputs beat positions as JSON with visualization. | | `FL_Audio_Beat_Prompt_Envelope` | Turns exact detected beats into attack/hold/release prompt-mask pulses for compatible FL diffusion video nodes. Supports beat stride, phase, response curve, and on-beat dominance above normal conditioning weight. | -| `FL_Audio_Beat_Prompt_Schedule` | Compact node that opens a full-screen audio and prompt sequencer with drag-and-drop upload, recursive ComfyUI input search, local-folder browsing, smooth playback, source trimming, and a professional single-grid timeline. Offset-controlled beat markers, four-grid double-click prompt creation, middle-mouse viewport panning, Space-bar playback control, and frame-native prompt clips share one waveform-aligned ruler. Outputs the cropped master audio plus the visually aligned beat and drum JSON for the rest of the FL audio ecosystem. | +| `FL_Audio_Beat_Prompt_Schedule` | Compact node that opens a full-screen audio and prompt sequencer with drag-and-drop upload, recursive ComfyUI input search, local-folder browsing, smooth playback, source trimming, and a professional single-grid timeline. Offset-controlled beat markers are the sole snapping authority for four-grid prompt creation, movement, resizing, and fades. Middle-mouse viewport panning, Space-bar playback control, and frame-native prompt clips share the waveform-aligned ruler. Outputs the cropped master audio plus the visually aligned beat and drum JSON for the rest of the FL audio ecosystem. | | `FL_Audio_Beat_Visualizer` | Generates video frames that visualize beat patterns by either alternating between black/white on beat changes or cycling through provided images, with configurable frame dimensions and starting color. | | `FL_AudioFrameCalculator` | Given an AUDIO and a target FPS, returns the integer frame count needed to cover the audio's duration (`ceil(duration * fps)`). Useful upstream of video-generation nodes that need an exact frame budget. | | `FL_Audio_Crop` | Crops audio waveforms to specified start and end times using MM:SS or seconds format, with automatic clamping to valid audio boundaries. | diff --git a/pyproject.toml b/pyproject.toml index 22d665a..61d8b46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui_fill-nodes" description = "Fill-Nodes is a versatile collection of custom nodes for ComfyUI that extends functionality across multiple domains. Features include advanced image processing (pixelation, slicing, masking), visual effects generation (glitch, halftone, pixel art), comprehensive file handling (PDF creation/extraction, Google Drive integration), AI model interfaces (GPT, DALL-E, Hugging Face), utility nodes for workflow enhancement, and specialized tools for video processing, captioning, and batch operations. The pack provides both practical workflow solutions and creative tools within a unified node collection." -version = "2.23.0" +version = "2.24.0" license = {file = "LICENSE"} dependencies = ["librosa", "sounddevice", "glitch_this", "PyOpenGL", "glfw", "scipy>=1.13.1", "requests", "aiohttp", "moviepy", "matplotlib", "reportlab", "openai", "PyPDF2", "pdf2image", "PyMuPDF", "reportlab", "PyPDF2", "ollama", "kornia", "opencv-python", "gdown", "open_clip_torch", "google-genai"] diff --git a/web/nodes/audio/FL_Audio_Beat_Prompt_Schedule.js b/web/nodes/audio/FL_Audio_Beat_Prompt_Schedule.js index c907333..0aa451c 100644 --- a/web/nodes/audio/FL_Audio_Beat_Prompt_Schedule.js +++ b/web/nodes/audio/FL_Audio_Beat_Prompt_Schedule.js @@ -5,8 +5,8 @@ const STYLE_ID = "fl-beat-prompt-sequencer-styles"; const INSTANCES = new Map(); const HEADER_RE = /^\s*\[\s*([0-9]+(?:\.[0-9]+)?)\s*-\s*([0-9]+(?:\.[0-9]+)?)(?:\s*\|\s*(.*?))?\s*\]\s*$/; const EPSILON = 1e-6; -const FORMAT_VERSION = 9; -const COMPATIBLE_FORMAT_VERSIONS = new Set([6, 7, 8, FORMAT_VERSION]); +const FORMAT_VERSION = 10; +const COMPATIBLE_FORMAT_VERSIONS = new Set([6, 7, 8, 9, FORMAT_VERSION]); const COMPACT_NODE_WIDTH = 380; const MEDIA_FILE_RE = /\.(?:aac|aiff?|flac|m4a|mka|mkv|mov|mp3|mp4|oga|ogg|opus|wav|webm|wma)$/i; const TIMELINE_LEFT = 16; @@ -734,7 +734,6 @@ class BeatPromptSequencer { this.dataFresh = false; this.viewStart = savedCompatible ? finiteNumber(saved.viewStart, 0) : 0; this.viewEnd = savedCompatible ? finiteNumber(saved.viewEnd, 0) : 0; - this.snapMode = ["beat", "detected", "onset", "frame", "off"].includes(saved.snapMode) ? saved.snapMode : "beat"; this.waveformVisible = saved.waveformVisible !== false; this.autoAnalyze = saved.autoAnalyze !== false; @@ -798,15 +797,6 @@ class BeatPromptSequencer {
-