LTX2Pipeline: dynamic timestep shift `mu` is constant, ignores the actual sequence length
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 68/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- python
调研方向
从 src/diffusers/pipelines/ltx2/pipeline_ltx2.py 中的 LTX2Pipeline.call 开始,阅读附近的 latent 维度计算和 calculate_shift 调用。确认 packed sequence length 是如何推导的,并比较 Flux/SD3 pipeline 中对应的逻辑。当 dynamic shifting 使用实际的 latent sequence length,并随分辨率或帧数变化时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
In LTX2Pipeline.__call__ (src/diffusers/pipelines/ltx2/pipeline_ltx2.py), mu is computed with max_image_seq_len passed as the first argument of calculate_shift — the image_seq_len parameter:
mu = calculate_shift(
self.scheduler.config.get("max_image_seq_len", 4096), # <-- this is image_seq_len; should be the sample's real sequence length
self.scheduler.config.get("base_image_seq_len", 1024),
self.scheduler.config.get("max_image_seq_len", 4096),
self.scheduler.config.get("base_shift", 0.95),
self.scheduler.config.get("max_shift", 2.05),
)
calculate_shift(image_seq_len, base, max, base_shift, max_shift) returns image_seq_len * m + b. With image_seq_len == max_seq_len, that reduces to max_shift, so mu is constant regardless of resolution or frame count — use_dynamic_shifting=True has no effect.
image_seq_len should be the sample's packed sequence length, latent_num_frames * latent_height * latent_width — which is already computed a few lines above (and even present as the commented line # video_sequence_length = latent_num_frames * latent_height * latent_width). This matches the Flux/SD3 pipelines and the LTX reference (math.prod(latent.shape[2:])).
Fix: pass latent_num_frames * latent_height * latent_width as the first argument.
- 主要语言
- Python
- 星标
- 34.6k
- 派生
- 7.4k
- 平均合并
- 3 天 7 小时
- 30 天内合并 PR
- 73
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
huggingface/diffusers 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
huggingface/diffusers#14864 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
huggingface/diffusers#14837 ·
-
bug needs-env-info pipelines
难度 2/5 1-3 小时 新手友好度 72/100
huggingface/diffusers#14794 ·
-
bug needs-code-example needs-env-info pipelines
难度 1/5 1 小时以内 新手友好度 86/100
huggingface/diffusers#14780 · 1 条评论 ·
-
bug pipelines
难度 2/5 1-3 小时 新手友好度 78/100
huggingface/diffusers#14769 · 1 条评论 ·
查看 huggingface/diffusers 的全部 Issue
相似的 Issue
-
agent-ready documentation needs-triage
难度 1/5 1-3 小时 新手友好度 88/100
-
documentation
难度 1/5 1 小时以内 新手友好度 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" 未关闭
难度 1/5 1 小时以内 新手友好度 92/100
-
instance instance add
难度 1/5 1 小时以内 新手友好度 72/100
searxng/searx-instances#939 · 1 条评论 ·
-
area-deployment area-integrations triage:bot-seen
难度 2/5 半天 新手友好度 86/100