There has been debate about using MIT as license for Krita plugins, so I am making a new thread to ask and discuss what licenses can be used for a krita plugin.
The official stance is that the licenses should be either GNU GPL or compatible licenses without any restrictions.
Lets use this thread to discuss this issue.
EDIT : I don’t think anyone of us here are lawyers so take this discussion and opinions with a pinch of salt
Not sure if i can give an answer here directly or not, but the subject is directly related to plugin and is not insignificant…
So I post in a collapsible section to not visually pollute too much the topic @raghukamath feel free to split posts in a dedicated topic if needed
Plugin license
I know it’s not the place to debate on AI, but as the AI subject is already a “hot” subject, I think it’s better if plugin is made at least with respect of licenses…
The GPL license allows to include MIT licensed source code/libraries in project, but the MIT license doesn’t allows to include GPL licensed source code/libraries MIT License FAQ - Tawesoft Knowledge Base
Currently the MIT license applied to plugin is violating the license itself…
So the solution is, as @TheTwo considered, to split plugin in different modules:
All source code that doesn’t interact with Krita API (ie: no import krita in source code and that can be executed outside Krita) can be under MIT license (or other compatible GPL license, and also according to original license applied on used source code/libraries)
All source code that made the junction between Krita and other modules must be under GPL license; and whole plugin itself have to be released under GPL license
I didn’t took a look about how plugin is coded, but basically something like this should be Ok:
As the dev is more active in his Discord server I copied there a link to Grum999 post about solving the issue with the license, and he liked the idea but needs some more help with it:
Developer's answer
well nice diagram and I have no problem to change some things. But first they have to give an detailed information about how to split Krita plugin in different files and classes like in any other project. At the moment I have to put everything in one large file because of Scripter is working like this. And I do not want to restart Krita for just one single change. Other (might be better) solution: they make their API MIT as well.
I don’t think so, I think that in the last part he was just thinking out loud about the easiest solution for him. I should have probably edited out that part, sorry.
The thing I think he could use some help is in “getting detailed information about how to split Krita plugin in different files and classes”, so he can then apply different licenses for each part of the code.
No problem, I doubted that it was a serious request, considering that it is really hard to do that.
Splitting the plugin was a suggestion, I hope someone helps them.
Do they have problem making their plugin GPL licensed? They would just need to change the license and no extra work. Frankly they should have checked the license before doing the work.
Blatant disregard for license is not good. We are just trying to help. It may not be a matter of concern for you, but Free and open source software are free and open source because of the licenses. I would suggest you to read a bit about it. If you don’t have anything to add to the discussion then please refrain from posting.
it is just a two minute work select the gpl license and publish that is all.
Right from the start this question is being ignored in this thread. If you have so much disregard for free software license then why work with it.
I don’t have discord account and don’t wan’t to create one and/or have to install discord on my computer
The best place to get help is here
I read the topic but I’m unable to understand where to find plugin source code
@raghukamath I understand this like you: he’s asking to change to Krita’s API license…
Krita can’t change the license of the API without changing Krita’s license itself (and changing Krita’s license is not possible and even if it was, I’m pretty sure that nobody will do it just for a plugin )
There’s clearly a misunderstood of what license are and how to use them, and @imperator I really don’t understand why to choose an open MIT license when it’s technically not possible as the source code is in violation with the MIT license
The easier way to manage this on plugin:
To put the"big one file" plugin under GPL v3
To rewrite and split plugin in different modules later, with different licenses for modules
Anyone a little bit serious with licenses stuff won’t take risk to fork or use a code that is in violation with the chosen license
class ModifierData
– because use Krita method to read/write plugin settings; read/write settings outside Krita would let this class being under MIT license
class ModifierDialog
– because use Krita method to get icons; replacing 2 line would let this class being under MIT license
def selectImage
– because use Krita’s API to manipulate Krita’s document
def getDocument
– because use Krita’s API to manipulate Krita’s document
def getLayer
– because use Krita’s API to manipulate Krita’s document
def getSelection
– because use Krita’s API to manipulate Krita’s document
def expandSelection
– because use Krita’s API to manipulate Krita’s document
def TxtToImage
– because use Krita’s API to manipulate Krita’s selection; could be easily splitted in 2 function (one MIT licensed, on GPL licensed)
def ImageToImage
– because use Krita’s API to manipulate Krita’s selection; could be easily splitted in 2 function (one MIT licensed, on GPL licensed)
def Inpainting
– because use Krita’s API to manipulate Krita’s selection & layers content; could be easily splitted in 2 function (one MIT licensed, on GPL licensed)
Can be MIT
class SDConfig
class SDParameters
def errorMessage
class SDConfigDialog
class showTiling
class showImages
def imageResultDialog
def base64ToQImage
def getServerData
class runSD
def getFullPrompt
def Config
stable_diffusion.py
Should be GPL
A license.txt file should be provided, because currently it’s not explicit under which license the plugin is
Not clear to me, but there’s no license defined for stable-diffusion-web-ui
And there’s currently 70contributors on it…
It’s compliant in the way the a GPL licensed source code can use MIT licensed source code if MIT license is respected.
In the other way, a MIT licensed source code can’t include GPL licensed source, it’s a violation of MIT & GPL licenses…
Edit:
in addition to your link @raghukamath, you can see GPL license is compatible with Public Domain because you can use public domain source code in a GPL licensed source code.
But clearly, you can’t use GPL source code in a public domain source code… it’s violating GPL
Some additional explanation of what I understood of licenses, because this is really disturbing me…
A MIT licensed source code can’t be published by anyone under GPL license source code (or any other license) without any modification of source code: the original source code will stay under MIT license
but
You can modify a MIT licensed source code and publish the modified version under GPL license (or any other) if:
You keep original copyright owner in source code
You keep the original MIT license declaration
Indicate in EULA (especially for closed source software) the usage of MIT licensed source with owner copyrights
→ you can fork a MIT project, modify it, and publish it with another license as long as you indicate that the original source code written by XXX was under MIT license
A MIT source code can’t use non compatible licensed source: GPL is not compatible with MIT because MIT violate the GPL license
A GPL licensed source code can’t be published under a less restrictive license like MIT or DP (or a more restrictive license)
→ You can’t fork Krita source code, modify it a little bit and decide to publish the modified version under MIT or proprietary license…
A GPL source code can’t use non compatible licensed source (like BY-CC-NC used for mixbox)
A GPL source code can use compatible licensed source: MIT is compatible with GPL because GPL doesn’t violate MIT license
Then, a Krita plugin as it’s using Krita API published under GPL license, must be published under GPL license
After, as I explained, it’s possible to build a plugin in different modules:
Autonomous modules that don’t need Krita API can be published under MIT license or any GPL compatible license
Module that made link between autonomouse modules & Krita must be under GPL license
Plugin, because containing GPL source code from case 2) must be under GPL license
So concerning the stable diffusion plugin, to answer @imperatorquestion:
GNU only would not be an option for me. But what about dual license GNU and MIT?
Yes, you can:
Plugin is published under GPL license
Modules using Krita API are published under GPL license
Modules not using Krita API are published under MIT license
That will also violate the GPL. The entire plugin has to be compatible with the GPL. That may not apply to stable diffusion itself, depending on the communication method.
A GPL software can include MIT licensed source code
If you have part of code in your plugin that is not related to Krita, you can define this part of source code under a GPL compatible license like MIT; only part using GPL license code MUST be under GPL license code, and then the global plugin MUST be published under GPL license
For example Krita is under GPL license, but includes source code from different licenses (Apache 2.0, MIT, …)
For this part, I didn’t took a look.
As I write in a post above, the stable-diffusion-web-ui don’t have any license: so it’s difficult to determinate impact.
But, for what I saw in source code, it’s seems plugin communicate with SD through http protocol, using JSON formatted data: in this case you don’t care what is the license on server side (until you provide the server in your plugin source code…)