Skip to content

Scheduler Variable UnboundLocalError for DDIM and DPM Solver #322

@shorty07

Description

@shorty07

Bug Description: ACE-Step fails with UnboundLocalError: cannot access local variable 'scheduler' where it is not associated with a value when using DDIM or DPM solver scheduler types. Only Euler scheduler works correctly.

UnboundLocalError: cannot access local variable 'scheduler' where it is not associated with a value

Root Cause : In pipeline_ace_step.py around line 900-950, the scheduler selection logic has incomplete implementation:

Euler scheduler : Properly initializes scheduler variable

DDIM/DPM schedulers : Have conditional branches but the scheduler variable is never assigned

Later usage : Code tries to reference uninitialized scheduler variable

Reproduction Steps
Initialize ACEStepPipeline

Call model with scheduler_type="ddim" or scheduler_type="dpm-solver"

Error occurs in text2music_diffusion_process method

Working Configuration
model(
scheduler_type="euler", # Works
# ... other parameters
)

Failing Configurations
model(
scheduler_type="ddim", # Fails
scheduler_type="dpm-solver", # Fails
# ... other parameters
)

Impact: High : Breaks core functionality for 2 out of 3 documented scheduler types

Regression : Likely introduced in recent refactoring of scheduler initialization code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions