Skip to content

Bug: AttributeError when spks=None in ConditionalCFM.solve_euler #1854

@huyyxyshare

Description

@huyyxyshare

Bug Description

In , the method has a critical bug that causes an when the parameter is .

Location

File: , lines 95-100

Bug Details

The method accepts as a default value (line 37):

However, in the method, lines 95-100 directly use without checking if is :

Expected Behavior

When is , the code should either:

  1. Use a fallback dtype (e.g., or )
  2. Check if is and handle it appropriately

Suggested Fix

Change lines 95-100 to use as fallback instead of :

Additional Notes

The comment on line 94 mentions using to avoid NaN issues in TRT FP16 inference, but this should be conditional on being non-None.

This bug was found through static code analysis.

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