Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support mode parameter in PyTorch 2.1 #458

Merged
merged 3 commits into from
Dec 26, 2023
Merged

support mode parameter in PyTorch 2.1 #458

merged 3 commits into from
Dec 26, 2023

Conversation

haoyang9804
Copy link
Contributor

修复了--compile_with_dynamo flag下oneflow无法支持PyTorch 2.1的bug
bug复现如下

python ~/onediff2/examples/experimental/text_to_image_sdxl_torch_compile.py --compile=false --compile_with_dynamo --base=/share_nfs/hf_models/stable-diffusion-xl-base-1.0

bug触发位置

if cmd_args.compile_with_dynamo:
    print("unet is compiled to oneflow with torch.compile.")
    from onediff.infer_compiler import oneflow_backend

    base.unet = torch.compile(
        base.unet, fullgraph=True, mode="reduce-overhead", backend=oneflow_backend
    )

@strint strint merged commit 88f94ec into main Dec 26, 2023
0 of 4 checks passed
@strint strint deleted the supportPyTorch2.1 branch December 26, 2023 07:14
strint pushed a commit that referenced this pull request Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants