IC-Light还原细节的节点 DetailTransfer使用时报错-comfyui

🎈问题描述

今天在调试一个工作流节点的时候,遇到一个问题:

Error occurred when executing DetailTransfer: The size of tensor a (848) must match the size of tensor b (853) at non-singleton dimension 2 File "F:\ComfyUI-aki\execution.py", line 317, in execute output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "F:\ComfyUI-aki\execution.py", line 192, in get_output_data return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "F:\ComfyUI-aki\execution.py", line 169, in _map_node_over_list process_inputs(input_dict, i) File "F:\ComfyUI-aki\execution.py", line 158, in process_inputs results.append(getattr(obj, func)(**inputs)) File "F:\ComfyUI-aki\custom_nodes\ComfyUI-IC-Light\nodes.py", line 511, in process tensor_out = torch.lerp(target_tensor, tensor_out, mask)

 报错的节点是这个:

开始以为是图像通道的问题,后来仔细看了下报错信息,排查到问题的原因是输入图像和输出图像尺寸不一致导致的。

那么,过程中我并没有修改图像的尺寸,但是为什么图像大小还会变化呢?

输入图像:

生成图像:

后来又排查了下,发现在vae encoder的时候,他就变化了,所以又长知识了。vae encoder会略微改变图像的大小,所以如果要精确匹配图像的话,就需要特别注意这一点。

🎀解决方法

知道了问题,解决就很方便了,把图像再缩放回原大小就好了,因为本身变化就不大,所以拉伸处理完全没有问题。

完美生成新的图像。 

✨写在最后

如果对comfyui还不熟悉的话,最近面向ComfyUI的新手,写了一门系统性入门图文课程,现在已经更新完成了,内容主要包括如何下载软件、如何搭建自己的工作流、关键基础节点讲解、遇到报错怎么解决等等,如果大家在学习过程中遇到什么问题,也可以直接对应的文章下留言,会持续更新相关答疑内容哈。欢迎订阅哦~

https://blog.csdn.net/jumengxiaoketang/category_12683612.html

​​​

感谢大家的支持~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

聚梦小课堂

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值