siliconflow / onediff

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

使用了onediff checkpoint、onediff controlnet,LoraLoaderModelOnly节点不可用 #800

Closed LuckyIvan closed 4 months ago

LuckyIvan commented 7 months ago

一下是的我的工作流 onediff_test.json openpose图片 POSE2 LoraLoaderModelOnly把这个节点拆掉会运行成功

LuckyIvan commented 7 months ago

image 环境使用的这个

LuckyIvan commented 7 months ago

image 这是报错信息,之后会重启comfyui,comfyui启动方式是--gpu-only

wangerlie commented 7 months ago

@LuckyIvan

环境对齐

本地复现环境:
ComfyUI_IPAdapter_Plus: image ComfyUI:
image

问题复现

准备工作

  1. 首先验证OneDiff Node能在ComfyUI中正常使用: image
  2. 下载相应的safetensors文件 https://hf-mirror.com/h94/IP-Adapter/resolve/main/models/image_encoder/model.safetensors
    https://hf-mirror.com/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sd15_lora.safetensors
    https://hf-mirror.com/creatorbest/myposes/resolve/main/OpenPoseXL2.safetensors
    https://hf-mirror.com/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sdxl_lora.safetensors
    https://hf-mirror.com/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter-plus-face_sdxl_vit-h.safetensors
    https://hf-mirror.com/stabilityai/sdxl-vae/resolve/main/sdxl_vae.safetensors
  3. 用户没有提供POSE2的图片,所以在本流程中使用随便选取了一张图片做为POSE2

    本地运行复现

    本地流程截图 image 运行指令截图
    image

运行会在KSampler节点中止,出现与用户一样的lora key not loaded报错 image 但是并未出现后续关于oneflow的报错,也没有重启ComfyUI
本地实现出现的报错情况如下: image image

删除LoraLoaderModelOnly节点后报错信息与未删除节点时一样

image

我的报错和您不一致,以下是我的版本信息

onediff                   0.13.0.dev1
oneflow                   0.9.1.dev20240331+cu118

麻烦您核对一下版本信息

wangerlie commented 7 months ago

更新环境后完成问题复现

oneflow                   0.9.1.dev20240411+cu121
onediff                   0.13.0.dev1

完成问题复现 image image

删除sd15的lora后能够正常运行 image image 尝试将下面lora换为sdxl与基底模型对齐 image image 更换为上述两种模型后都会报错 image

IPAdapterKSampler中添加LoraLoaderModelOnly时都会出现相同错误

Failed to update obj_entity in place. Exception: Not support <function CondFunc.__new__.<locals>.<lambda> at 0x7fc878034c10> 
with parameters Module: <module 'onediff_comfy_nodes.modules.sd_hijack_utils' 
from '/data/home/wangerlie/ComfyUI/custom_nodes/onediff_comfy_nodes/modules/sd_hijack_utils.py'>
wangerlie commented 7 months ago

@LuckyIvan 问题已解决,请您更新至最新版本ComfyUI,onediff请使用该分支。 在本地验证结果如下:LoraLoaderModelOnly节点能够正常使用 workflow (11) img_v3_02a0_cfa422a7-b61f-4b98-8f8c-b30dba002e7g