-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better SDXL support? Individual control over two CLIPs #17
Comments
Also, how about a checkbox in EM tab named
This way you would be able to convert between different embeddings by checking this flag and loading a correct base model to switch mode! |
Can anybody explain me why I get embedding hidden size for SD2 as =1024 but for SDXL part G as =1280 ? |
EDIT: realized that What about if just adding
Also this statement about separately prompting clip that fooocus maintainer wrote can be dismissed. |
I don't understand this. Firstly, any runtime merge expression ought to start with single quote, otherwise it won't get parsed (and will mess up with other extensions if I'd try to interpret it), so the only valid start is Secondly, you seem to include a control character
Show some examples, and note that I cannot delay multiplication for anything but the directly preceding term, so we cannot have "multiplication from left" like
Where, with what software? (Comfy, Diffusers?) |
I realized the
|
Confusing. Couldn't you just |
You are right. I do tend to overcomplicate some things. |
Give several examples how you would use this, especially if you told that you already have experience in messing with two separate prompts? |
Well the influence over image is not equal between the two CLIP models but by multiplying the magnitude of embedding only using L CLIP this can be overcome and since L CLIP is same as SD 1.5 CLIP it has all the openai training still there. |
So you actually need a separate multiplication? This way, to get pure L you will just |
Yes that sounds great. It makes sense too since if you are going to target only one clip you would want to use multiplication in order to compensate a bit. At least from my own experience. Also here are three embeddings that were converted from SD 1.5 to SDXL with the padding technique if you want to check them out for effectiveness, parameters and such: |
By chance, maybe you know why G part is not compatible with SD2 ? |
I've pushed two changes:
The documentation is not updated yet. Can you test everything and make sure it is working as you might expect, and that nothing got broken? |
Everything seemed to be working well but at one point, whatever I put in negative prompt became positive instead for some reason. Gonna investigate it some more. Been doing all kinds of crazy stuff though so it does seem to be working overall |
So yeah things are working as they should. One suggestion though is in addition to placing the safetensor converted embedding when saving is to add a suffix to it since without that, sdxl embedding sharing same name as sd15 embedding will not show up in extensions such as tag autocomplete but instead shows just as the sd15 version. I have gotten used to naming mine with suffixes '_xl' and '15', but something like 'vXL' and 'v1' would be more clear. |
Why to use a prefix if you naturally cannot have loaded both SD1 and SDXL versions in WebUI at the same time? |
Because. When an SDXL model is loaded the extension a1111-sd-webui-tagcomplete is unable to differentiate between the two since it is only used for aliasing and quick acess to embeddings, loras and such through prompt. So if two embeddings has the same name, it then displays it as a SD 1.5 embedding. In image I have an SDXL model loaded, I am using extension in prompt while displaying the actual available SDXL embedding and you can see that the one with the exact same name is displayed as v1 Embedding even though there obviously is a XL one available. That is cause that extension is not meant to do checks for loaded model or anything like that. It is just performing aliasing and prompt shortcuts for embeddings and extra networks. You will have to excuse the name but it is the only one that was left that I had not suffixed. Hope this explains it. Otherwise I suggest you check out the extension I mentioned so you get first hand experience. The extension |
And so what? The embedding is there, and it will be used in generation.
That extension should not list embeddings that are not compatible with the current model, because this is a lie that they are usable: WebUI would not throw any errors but instead will take the name literally as text, without substitution. Showing the wrong type of the embedding because of duplicated name is not a bigger lie!
Why to rename them, if it would be convenient for prompts to keep general names of embeddings which would allow you to swap models without changing the prompt? For example, if your SDXL embedding of a furry dog boy is |
Yeah I will just head over to that extensions repo and ask them to change their entire way of fetching embedding/extra networks names. I have 2600 embeddings. If I would have same name on both xl and v1 variants, currently it would just display as v1 in that menu and I would be clueless to know if that is one that has one for each architecture or if it is one that I have yet to convert. So no there is no convenience by having them being named the same in that context. I would however understand the convenience for casual users that does not use EM for constructing highly complex embeddings through multiple intermediary steps like I do. |
You may backlink here when you do; meanwhile I will be updating my docs for the new syntax… |
The tagcomplete issue has been resolved. By the way, my PR has been merged to webui dev branch. |
How merge expression syntax could be enhanced to incorporate an independent manipulation or L (CLIP as in SD1) and G (OpenCLIP) clips of SDXL?
Currently
<'cat'*2+'1girl'>
will:What do we want:
L*2
butG*1
; orL*0.3
andG*0.7
)What we cannot have:
+
/-
, or do*
//
/:
right away, operating only on two internal variables ("left" operand and "right" operand:*
doesright=right*this
and+
doesleft=left+right; right=this;
)A few ideas:
<'use clip'*1.4 | 'this is OpenCLIP'*0.5>
<'this is OpenCLIP'*0.5:G + use clip'*1.4:L>
('X':L will zero-fill G-part of 'X'; read as "use L" )
Also see a89dde6#commitcomment-140709559
The text was updated successfully, but these errors were encountered: