Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ComfyUI-Daydream-Scope

Prototype -- This project is in early development and not yet ready for production use. APIs, nodes, and workflows may change without notice.

ComfyUI custom nodes for video generation using Daydream Scope.

Why Scope in ComfyUI?

Scope brings autoregressive video generation to ComfyUI. Rather than generating a fixed batch of frames, Scope generates video chunk-by-chunk in a continuous stream, with each chunk conditioned on the previous one. This has several important consequences:

  • Unlimited length video. There is no upper bound on output duration. Autoregressive generation means you can produce minutes, hours, or longer, limited only by time, not VRAM.
  • Keyframing and scheduling over time. Because generation is chunked, you can change prompts, LoRA strengths, VACE conditioning, and other parameters at any chunk boundary. This kind of temporal scheduling is not possible in the traditional batch paradigm, where the entire video is generated in a single pass.
  • Prompt transitions. Smoothly interpolate between prompts over multiple chunks using linear or slerp blending (both temporal and spatial). Chain multiple weighted prompts for spatial blending within a single chunk.
  • Per-chunk LoRA strength ramping. LoRA strength can follow a schedule across chunks, enabling effects that evolve over the course of a video. Multiple LoRAs can be stacked and each independently scheduled.
  • Per-chunk VACE conditioning. Depth maps, optical flow, pose, scribble, masks, reference images, and first/last frame conditioning can all be scheduled per-chunk with independent keyframes.
  • Memory-efficient post-processing. Scope's plugin system (FlashVSR, RealESRGAN, RIFE, and more) runs per-chunk rather than on the full batch. This dramatically reduces memory pressure compared to running these same operations on hundreds of frames at once, while also maintaining temporal consistency across chunks since the pipeline is optimized for real-time streaming.
  • Audio-reactive generation. The Keyframe Peak Cycler node detects peaks in audio or other feature signals and automatically places keyframes at beat-aligned chunk boundaries, enabling music-driven video generation.

Requirements

  • Daydream Scope on branch ryanontheinside/feat/generate-endpoint
  • ComfyUI with V3 API support
  • A running Scope server (uv run daydream-scope)

Installation

1. Switch Scope to the required branch

This prototype depends on a Scope branch that is not yet merged into main. In your Scope repo:

cd /path/to/scope
git fetch origin
git checkout ryanontheinside/feat/generate-endpoint
uv sync --group dev

Then start the server:

uv run daydream-scope

2. Install the ComfyUI custom nodes

Clone this repo into your ComfyUI custom nodes directory:

cd ComfyUI/custom_nodes
git clone https://github.com/daydreamlive/ComfyUI-Daydream-Scope.git comfyui-scope

Ensure the Scope server is running before launching ComfyUI.

Configuration

The server URL defaults to http://localhost:8000. You can override it by:

  1. Setting the SCOPE_SERVER_URL environment variable, or
  2. Editing scope_config.json in the node pack root:
{
    "server_url": "http://localhost:8000"
}

Nodes

Node Category Description
Scope Model Loader Loaders Load a Scope pipeline (e.g. longlive). Configure model, VAE type, quantization, VACE, and pre/post-processor pipelines.
Scope LoRA Loaders Configure a LoRA with strength (single value or per-chunk schedule). Chainable for stacking multiple LoRAs. Supports permanent_merge and runtime_peft modes.
Scope Sampler Sampling Generate video via SSE streaming to the Scope server. Supports video-to-video and text-to-video modes, per-chunk keyframe scheduling, automatic noise control, and cancellation.
Scope VACE Conditioning VACE conditioning: depth maps, optical flow, pose, scribble frames, spatial masks, and adjustable context scale.
Scope Keyframe Scheduling Per-chunk control over prompts, prompt blends, transitions, first/last frame images, reference images, VACE conditioning, cache resets, and per-chunk input video (v2v/t2v switching).
Scope Prompt Blend Scheduling Weighted prompt for spatial blending. Chain multiple for multi-prompt blends within a chunk.
Scope Keyframe Peak Cycler Scheduling Detect peaks in a feature signal (e.g. audio energy) and place keyframes at beat-aligned chunk boundaries. Supports cycle and snap-to-peaks modes with optional last-frame bridging.
Scribble Preprocessor Preprocessing Extract contour/scribble line art from images using a neural network. Useful for VACE conditioning.
Scope Interactive Sampler Interactive (Experimental) Continuous real-time generation with live preview, WebSocket frame streaming, and runtime parameter adjustment.

Example Workflows

Example workflow files are included in the examples/ directory:

  • scope - basic explanitory workflow.json -- Basic setup demonstrating model loading and sampling.
  • scope - vace + lora schedule.json -- VACE conditioning combined with per-chunk LoRA strength scheduling.
  • scope - keyframing with audio.json -- Audio-reactive keyframing using peak detection to drive prompt changes.

To use: drag and drop a workflow JSON file into ComfyUI, or load it via the menu.

Basic Workflow

ScopeModelLoader ──┐
                   ├──► ScopeSampler ──► IMAGE (frames)
  LoadVideo ───────┘
  1. Start the Scope server: uv run daydream-scope
  2. In ComfyUI, add a Scope Model Loader node and configure the pipeline
  3. Connect input video frames (or use text-to-video without them)
  4. Add a Scope Sampler node, write your prompt, and queue

For keyframing, chain Scope Keyframe nodes into the sampler's keyframes input. Each keyframe targets a specific chunk index and can carry its own prompt, VACE conditioning, LoRA overrides, transitions, and more.

Status

This is a prototype. Known limitations:

  • Requires a specific Scope branch (see Requirements above)
  • Interactive sampler node is experimental and deprioritized
  • Error handling and edge cases are still being hardened
  • Documentation is minimal

Contributions and feedback welcome via GitHub Issues.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages