modelscope / modelscope/DiffSynth-Studio

有关sample_shift, sample_steps取值问题

Open
#572 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13.1k
Forks
1.3k
Avg merge
13h 12m
Merged PRs (30d)
45

Description

在Wan2.1官方代码中,480P的i2v任务使用的sample_shift=3.0, 而其它任务是5.0; i2v 任务sample_step=40,其它任务是50

    if args.sample_steps is None:
        args.sample_steps = 40 if "i2v" in args.task else 50
    if args.sample_shift is None:
        args.sample_shift = 5.0
        if "i2v" in args.task and args.size in ["832*480", "480*832"]:
            args.sample_shift = 3.0
        if "flf2v" in args.task:
            args.sample_shift = 16

而DiffSynth-Studio项目中,都设置sample_shift=5.0, num_inference_steps=50, 这个与官方代码完全不同

# Image-to-video
video = pipe(
    prompt="一艘小船正勇敢地乘风破浪前行。蔚蓝的大海波涛汹涌,白色的浪花拍打着船身,但小船毫不畏惧,坚定地驶向远方。阳光洒在水面上,闪烁着金色的光芒,为这壮丽的场景增添了一抹温暖。镜头拉近,可以看到船上的旗帜迎风飘扬,象征着不屈的精神与冒险的勇气。这段画面充满力量,激励人心,展现了面对挑战时的无畏与执着。",
    negative_prompt="色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走",
    input_image=image,
    num_inference_steps=50,
    seed=0, tiled=True
)

上述的不同参数配置,是否导致生成的视频效果不如原始官方Wan2.1代码生成的视频? 此外两个项目代码的scheduler也不一样?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the Wan2.1 official sampling branches shown in the issue with the DiffSynth-Studio image-to-video pipeline call, including sample_shift, sample_steps, and the scheduler. Reproduce the same task and size under both configurations, then verify whether output quality differs and document the scheduler and parameter behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.