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

[Bug] compile_pipe使用-第一次warmup完(也就是静态图编译完),controlnet的参数controlnet_conditioning_scale会固定住? #1101

Open cchen-reese opened 2 months ago

cchen-reese commented 2 months ago

Your current environment information

PyTorch version: 2.3.1+cu118 Is debug build: False CUDA used to build PyTorch: 11.8 ROCM used to build PyTorch: N/A

OneFlow version: version: 0.9.1.dev20240515+cu118, git_commit: ec7b682, cmake_build_type: Release, rdma: True, mlir: True, enterprise: False Nexfort version: none OneDiff version: 1.2.0.dev1 OneDiffX version: 1.1.0

Versions of relevant libraries: [pip3] diffusers==0.29.2 [pip3] numpy==1.24.4 [pip3] open_clip_torch==2.7.0 [pip3] pytorch-lightning==2.3.0 [pip3] torch==2.3.1+cu118 [pip3] torchaudio==2.3.0+cu118 [pip3] torchmetrics==1.4.0.post0 [pip3] torchvision==0.18.0+cu118 [pip3] transformers==4.41.2 [pip3] triton==2.3.1 [conda] numpy 1.24.4 [conda] open_clip_torch 2.7.0 [conda] pytorch-lightning 2.3.0 [conda] torch 2.3.1+cu118 [conda] torchaudio 2.3.0+cu118 [conda] torchmetrics 1.4.0.post0 [conda] torchvision 0.18.0+cu118 [conda] triton 2.3.1

🐛 Describe the bug

from onediffx import compile_pipe from diffusers import StableDiffusionControlNetPipeline

  1. 一开始将StableDiffusionControlNetPipeline load完毕,并且new_pipe=compile_pipe(pipe)
  2. 第一次Inference时,为warm up阶段,此时controlnet的参数controlnet_conditioning_scale是(0.5, 0.5)
  3. 接下来的多次inference,controlnet的参数都是不一样的。但是观察返回结果,实际的参数并没有改变,依旧是(0.5, 0.5)。

请问oneflow的编译静态图,会将controlnet的参数controlnet_conditioning_scale编译进去吗,后面的多次Inference,是否支持更换参数呢?