Skip to content

Conversation

ryanontheinside
Copy link
Collaborator

Add LatentFrequency Processor for Latent Domain Frequency Control

This PR introduces a new LatentFrequencyProcessor that enables frequency domain manipulation directly in latent space, providing more efficient control over image characteristics compared to pixel-space frequency filtering.

Key Features:

  • Three-band frequency control: Independent multipliers for low (structure/composition), mid (textures/patterns), and high (fine details/edges) frequency components
  • Configurable frequency boundaries: Adjustable cutoff points between frequency bands (0.1-0.9 range)
  • Latent domain processing: Operates directly on latent representations [B, C, H/8, W/8] for computational efficiency
  • Safety constraints: Parameter clamping and value limits to prevent extreme outputs
  • Standalone processor: Inherits from BasePreprocessor (no pipeline state required)

Parameters:

  • low_freq_multiplier, mid_freq_multiplier, high_freq_multiplier (0.0-3.0, default 1.0)
  • low_mid_cutoff, mid_high_cutoff (0.1-0.9, defaults 0.3 and 0.7)

Use Cases:

  • Detail enhancement/reduction
  • Texture control and artistic stylization
  • Composition refinement
  • More efficient alternative to pixel-space frequency filtering

The processor integrates with the existing preprocessor framework and includes comprehensive parameter validation and safety measures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant