Skip to content

Latest commit

 

History

History
49 lines (39 loc) · 2.53 KB

File metadata and controls

49 lines (39 loc) · 2.53 KB

Chroma Compatibility Changelog

Major Achievement: First Working PuLID Implementation for Chroma Models in ComfyUI

Overview

Successfully implemented full compatibility between PuLID (Pure and Lightning ID) face identity preservation and Chroma models (fine-tuned FLUX derivatives) in ComfyUI. This is believed to be the first working implementation of PuLID with Chroma guidance for ComfyUI.

Technical Achievements

1. Dual Model Architecture Support

  • Split the original forward_orig method into two model-specific implementations:
    • forward_orig_flux - For standard FLUX models
    • forward_orig_chroma - For Chroma models
  • Implemented automatic model detection based on distilled_guidance_layer attribute
  • Maintained full backward compatibility with standard FLUX models

2. Chroma-Specific Time Embedding System

  • Resolved missing time_in attribute in Chroma models
  • Implemented Chroma's custom modulation system:
    • Creates 344 modulation vectors using distilled_guidance_layer
    • Properly handles timestep and guidance embeddings
    • Respects Chroma's block skipping attributes (skip_mmdit, skip_dit)

3. Comprehensive Dtype Compatibility

  • Fixed persistent BFloat16/Half precision mismatches
  • Implemented dtype conversion at all critical points:
    • Double block PuLID attention
    • Single block PuLID attention
    • Embedding and image tensor processing
  • Ensures compatibility across different precision formats (bfloat16, float16, float8)

4. Hardware Optimization

  • Optimized for AMD RX 6900 XT (16GB VRAM)
  • Enables face-consistent generation at 768x768 resolution
  • Maintains Chroma's optimal 26-step generation process

Models Tested

  • Chroma Model: chroma-unlocked-v35-detail-calibrated_float8_e4m3fn_scaled_stochastic.safetensors
  • PuLID Model: pulid_flux_v0.9.1.safetensors (1.06GB)
  • Reference: Confirmed working with standard FLUX dev models

Key Technical Details

  • Preserves all original PuLID functionality while adapting to Chroma's architecture
  • Handles Chroma's unique modulation-based approach vs FLUX's vector-based system
  • Maintains face identity preservation quality across both architectures
  • Zero loss in generation quality or face consistency

Impact

This implementation enables Chroma users to leverage PuLID's powerful face identity preservation capabilities for the first time in ComfyUI, opening new possibilities for consistent character generation with Chroma's enhanced detail and artistic capabilities.