siliconflow / onediff

OneDiff: An out-of-the-box acceleration library for diffusion models.
https://github.com/siliconflow/onediff/wiki
Apache License 2.0
1.72k stars 107 forks source link

Black image got when infer Open-Sora-Plan-v1.1.0 #1115

Open littletomatodonkey opened 2 months ago

littletomatodonkey commented 2 months ago

Hi, when i use videosys repo for the Sora inference, and add onediff support, which is as follows.

        from onediff.infer_compiler import compile
        options = '{"mode": "O3"}'  # mode can be O2 or O3
        engine.driver_worker.transformer = compile(
            engine.driver_worker.transformer,
            backend="nexfort",
            options=options,
        )

I found that the generated video is black while normal when i do not use the onediff compiler.

I saw some issues saying that i need to set env, export ONEFLOW_ATTENTION_ALLOW_HALF_PRECISION_ACCUMULATION=False. I tried it but also does not work. Can you provide some other ideas? Thanks!

Some key packages' version are as follows.

onediff                    1.2.0
nexfort                    0.1.dev271
torch                      2.4.1
torchvision                0.19.1