• Stefy Lanza (nextime / spora )'s avatar
    Fix loading transformer-only fine-tuned models (like Muinez/ltxvideo-2b-nsfw) · 03b62189
    Stefy Lanza (nextime / spora ) authored
    Some models on HuggingFace are not full pipelines but just fine-tuned components
    (e.g., just the transformer weights). These have a config.json at root level with
    _class_name pointing to a component class like 'LTXVideoTransformer3DModel'.
    
    This fix adds:
    
    1. Detection of component-only models:
       - Check for config.json at root level
       - Read _class_name to determine component type
       - Detect if it's a transformer, VAE, or other component
    
    2. Proper loading strategy:
       - Load the base pipeline first (e.g., Lightricks/LTX-Video)
       - Then load the fine-tuned component from the model repo
       - Replace the base component with the fine-tuned one
    
    3. Supported component classes:
       - LTXVideoTransformer3DModel → Lightricks/LTX-Video
       - AutoencoderKLLTXVideo → Lightricks/LTX-Video
       - UNet2DConditionModel, UNet3DConditionModel, AutoencoderKL
    
    This allows loading models like Muinez/ltxvideo-2b-nsfw which are
    fine-tuned transformer weights without a full pipeline structure.
    03b62189
Name
Last commit
Last update
static Loading commit data...
templates Loading commit data...
EXAMPLES.md Loading commit data...
LICENSE.md Loading commit data...
README.md Loading commit data...
SKILL.md Loading commit data...
requirements.txt Loading commit data...
videogen Loading commit data...
videogen_mcp_server.py Loading commit data...
videogen_models.json Loading commit data...
webapp.py Loading commit data...