Skip to content

Fix UniPCMultistepScheduler.set_timesteps with list sigmas when use_flow_sigmas=True - #15214

Open
marlonferreira1800-hue wants to merge 1 commit into
huggingface:mainfrom
marlonferreira1800-hue:fix-unipc-sigmas-list
Open

marlonferreira1800-hue wants to merge 1 commit into
huggingface:mainfrom
marlonferreira1800-hue:fix-unipc-sigmas-list

Conversation

@marlonferreira1800-hue

Copy link
Copy Markdown

Describe the problem

UniPCMultistepScheduler.set_timesteps documents sigmas as list[float], but when use_flow_sigmas=True passing a plain Python list fails with:

  • flow_shift * sigmas -> TypeError: can't multiply sequence by non-int of type 'float'
  • with use_dynamic_shifting=True, 1 / sigmas -> TypeError: unsupported operand type(s) for /: 'int' and 'list'

Other schedulers (like FlowMatchEulerDiscreteScheduler and EulerDiscreteScheduler) convert sigmas via np.array(sigmas).astype(np.float32) when provided.

Solution

Convert sigmas to np.array(sigmas).astype(np.float32) in set_timesteps when sigmas is not None.

Fixes #15207

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UniPCMultistepScheduler.set_timesteps(sigmas=...) raises TypeError for a list when use_flow_sigmas=True

1 participant