siliconflow / onediff

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

fix deepcache unet error in comfyui #868

Open nono-Sang opened 4 months ago

nono-Sang commented 4 months ago

对 issue https://github.com/siliconflow/onediff/issues/857 以及 https://github.com/siliconflow/onediff/issues/778 的修复。

说明

修改后,output_shape = hs[-1] 是让 Upsample 进入到:https://github.com/siliconflow/onediff/blob/4852e8a3aa254ae248e12ce4863d0a332f858a15/onediff_comfy_nodes/modules/oneflow/infer_compiler_registry/register_comfy/openaimodel.py#L20 即最终调用 interpolate_like 而非另一个条件下的 interpolate

这样,DeepCacheUNet / FastDeepCacheUNet 也与 UNetModel 保持一致了:https://github.com/siliconflow/onediff/blob/4852e8a3aa254ae248e12ce4863d0a332f858a15/onediff_comfy_nodes/modules/oneflow/infer_compiler_registry/register_comfy/openaimodel.py#L145