lllyasviel/ControlNet

License problem with HED implementation?

hafriedlander opened this issue · 6 comments

Hi,

First, thanks for releasing this work under Apache-2.0. I appreciate it a lot.

I'm re-implementing your annotators for a personal project (gyre.ai) and have been looking for the origins and licenses of the various models in the annotator subfolder.

It looks like the HED implementation is originally from https://github.com/sniklaus/pytorch-hed/ (the code & models are identical). Unfortunately the license on this implementation is GPL-3.0, which doesn't allow re-licensing under Apache-2.0.

Is this the correct origin of that implementation and model?

(There are two other implementations under more permissive licenses, https://github.com/meteorshowers/hed and https://github.com/chongruo/pytorch-HED - unfortunately neither of them come with pretrained models, and I haven't yet checked how cross-compatible they are).

Thanks for bringing this up! I am the author of https://github.com/sniklaus/pytorch-hed/ and I am under the impression that ControlNet indeed copied my code 1) without attribution and 2) while illicitly relicensing it.

https://github.com/xwjabc/hed seems to be able to load the Caffe models from https://github.com/s9xie/hed (which can then be saved as a .pt or .safetensors), and both those are under compatible licenses. Should be easy to swap. Also seems a relatively light to retrain if needed (27 hours on a single Titan X).

True, but that doesn't really address the issue at large - this is a clear violation of the GPL and there are currently 1.6k forks that equally are in violation of the GPL.

Hello Sniklaus, those codes (about 80 lines) are copied from somewhere else and we did not notice that these are your codes.

We are now aware of that those short codes are written by you. It seems that, before the project ControlNet, many people have copied those codes in many places and we find those 80 lines of codes from another place without any source information. We are sorry about the situation.

If you wish we can remove all HED codes and all future ControlNets will not use your codes anymore.

It seems that Stability is also experimenting with HED. We can also inform Stability so that all future Stable Diffusion and ControlNet will use PIDINet and avoid introducing connections to your HED code base.

We can also put a notice to ask Stable Diffusion community to stop using those codes from you as soon as possible, with correct attribution to you and your projects.

Let us know your ideas and thank you for the support!

lvmin

Note that it isn't just the code but also the model, the weights that you are distributing magically have the same md5 as the model that I created (5b180f45403e908a39ce3e737b0df10e). As such, I am afraid that you are not doing yourself a favor by trying to downplay it by using the term "short codes".

Similarly, trying to justify the situation by saying that you copied from others that have copied from me doesn't make the situation any better either. If you copy from somewhere you need to play by the rules and in order to not violate any pre-existing license, the source where you copied the code from would have had to be Apache 2.0 as well. However, you are using a HEDdetector class which was first indexed on GitHub with the release of ControlNet so you not only copied the code from somewhere you also modified it - and as per the Apache 2.0 license you would have had to declare what these changes were. So no matter how you twist it, you didn't play by the rules.

I hope that you understand the seriousness of such an offense, GitHub's policies are clear here and I could just submit a takedown request to have the ControlNet repository deleted. However, I understand that that would be an extreme measure. Instead, I offer to let this go under the following terms. First, the ControlNet readme should have a prominent acknowledgment of any sources. This not only includes me but, if applicable, anyone else from whom you may have copied significant pieces of work from. Second, I would like to have a word with your advisor. I already sent him an email earlier today, please kindly ask him to reach out to me.

And if there is some follow-up/derivative work of ControlNet that you are aware of then please kindly notify the involved parties of this issue, I am fine with anyone using my code as long as they provide attribution. And no need to notify the Stable Diffusion community as a whole, there is no need to blow this out of proportion.

Hello @sniklaus,

Thank you for the message.

We have conducted the following actions:

  1. Implemented "the ControlNet readme should have a prominent acknowledgment of any sources. This not only includes me but, if applicable, anyone else from whom you may have copied significant pieces of work from." See bc492e3
    45bb4e1 59ba081
  2. the email from my advisor will reach out to you.

Let us know your ideas and thank you for the support!

lvmin