Code Monkey home page Code Monkey logo

Comments (4)

ccssu avatar ccssu commented on August 23, 2024

Debug found that the inability to update is due to an issue with the torch workflow:

The workflow weight did not change to a list, but rather to a float, as follows:
https://github.com/cubiq/ComfyUI_IPAdapter_plus/blob/d33265adf72974213fd4ea9bdbba1d0f176e7658/CrossAttentionPatch.py#L148-L151

# ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/CrossAttentionPatch.py:161
    else:
        out_ip = optimized_attention(q, ip_k, ip_v, extra_options["n_heads"])
        import pdb; pdb.set_trace()
        out_ip = out_ip * weight # I'm doing this to get the same results as before
  /data/home/fengwen/quant/ComfyUI/comfy/ldm/modules/attention.py(456)forward()
-> return checkpoint(self._forward, (x, context, transformer_options), self.parameters(), self.checkpoint)
  /data/home/fengwen/quant/ComfyUI/comfy/ldm/modules/diffusionmodules/util.py(191)checkpoint()
-> return func(*inputs)
  /data/home/fengwen/quant/ComfyUI/comfy/ldm/modules/attention.py(554)_forward()
-> n = attn2_replace_patch[block_attn2](n, context_attn2, value_attn2, extra_options)
  /data/home/fengwen/quant/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/CrossAttentionPatch.py(38)__call__()
-> out = out + callback(out, q, k, v, extra_options, **self.kwargs[i])
> /data/home/fengwen/quant/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/CrossAttentionPatch.py(164)ipadapter_attention()
-> out_ip = out_ip * weight # I'm doing this to get the same results as before
(Pdb) p 
*** SyntaxError: invalid syntax
(Pdb) p weight
1.0

workflow

from onediff.

ccssu avatar ccssu commented on August 23, 2024

please try it test case @Gutianpei https://github.com/siliconflow/onediff/tree/3aad30db09d13a22c75fee1f11230fcb8562de6a/onediff_comfy_nodes/modules/oneflow/hijack_ipadapter_plus#ipadapter_weights
image

from onediff.

Gutianpei avatar Gutianpei commented on August 23, 2024

please try it test case @Gutianpei https://github.com/siliconflow/onediff/tree/3aad30db09d13a22c75fee1f11230fcb8562de6a/onediff_comfy_nodes/modules/oneflow/hijack_ipadapter_plus#ipadapter_weights image

The link for the workflow is in the private repo, would you mind to share a public link? Thanks!

from onediff.

Gutianpei avatar Gutianpei commented on August 23, 2024

I've tested that changing weights is working, thanks for the help! closing this issue

from onediff.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.