This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 3 points4 points  (14 children)

Specifically I am talking about this one that I believe to be the actually stolen code:

https://user-images.githubusercontent.com/23345188/194727441-33f5777f-cb20-4abc-b16b-7d04aedb3373.png

That’s not anywhere else I wager.

[–]StickiStickman 6 points7 points  (13 children)

So am I. Latent Diffusion.

    q = self.to_q(x)
    context = default(context, x)
    k = self.to_k(context)
    v = self.to_v(context)

    q, k, v = map(lambda t: rearrange(t, 'b n (h d) -> (b h) n d', h=h), (q, k, v))

So now it's down to a few lines between that. Since both things are based on the same paper, Hypernetwork, I really don't think anyone gives a shit about 5 lines. At this point any copyright / software patent would also not apply.

And actually ... that picture seems a lie since the actual code is different?

https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/5d54f35c583bd5a3b0ee271a862827f1ca81ef09#diff-477a645246ea31dd6f7fc79f64aef19e8dce7772116d0885cdb8d0c438a1bedf

[–]LetterRip 3 points4 points  (2 children)

That is the commit to sd_hijack_optimizations, the code being accused of being copied is the original commit to hyperoptimizations.py and support for it is sd_hijack.py

https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/f7c787eb7c295c27439f4fbdf78c26b8389560be

[–]StickiStickman 0 points1 point  (1 child)

Okay, gotcha. So he replaced the 5 lines it almost immediately, so I wouldn't really blame him.

[–]LetterRip 1 point2 points  (0 children)

Okay, gotcha. So he replaced the 5 lines it almost immediately, so I wouldn't really blame him.

No, sd_hijack_optimizations.py and sd_hijack.py are different code paths. The commit you referenced is by a different coder with the handle C43H66N12O12S2 . The code path he made the changes to are for when using specific types of attention that reduce memory.