Skip to content
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

Implement 'Concept Sliders: LoRA Adaptors for Precise Control in Diffusion Models' #2028

Open
0xdevalias opened this issue Nov 23, 2023 · 8 comments

Comments

@0xdevalias
Copy link

0xdevalias commented Nov 23, 2023

Implement 'Concept Sliders: LoRA Adaptors for Precise Control in Diffusion Models'

Basically allows fine grained image tweaks using 'sliders'

See Also

@comfyanonymous
Copy link
Owner

They seem to work fine already? Here's a very quick test with eyesize.pt with strength_model -2.0 to strength_model 2.0
ComfyUI_11473_
ComfyUI_11474_
ComfyUI_11475_
ComfyUI_11476_
ComfyUI_11477_

@rohitgandikota
Copy link

Hi team,

I'm Rohit- the author of "Concept Sliders." I would also strongly recommend using the inference time SDEdit technowue we use for more precise control. Basically, during inference, we use the pretrained model for the first t timesteps and then start using the sliders. This will allow for a smoother control.

@nomadoor
Copy link

Concept Sliders
Concept Sliders_eyesize.json

This could be an example of a workflow.
I used KSampler Advance with LoRA after 4 steps.

@guoreex
Copy link

guoreex commented Nov 26, 2023

This could be an example of a workflow. I used KSampler Advance with LoRA after 4 steps.

Great job, this is a method of using Concept Sliders with the existing LORA process. My understanding is that this method affects the computation of CLIP. However, it seems that the design of Concept Sliders is not equivalent to LORA. The author’s description is here: rohitgandikota/sliders#2 (comment). According to the author’s description, Concept Sliders can affect inference at multiple stages such as the text encoder, U-net, High res, etc. If we can precisely know that the source of the inference error is the text encoder or U-net, then we can use Concept Sliders to correct the inference at that stage without affecting other inference processes, precisely fixing errors. For example, the common problem with fingers, etc.

So what I want to express is, is there a way for Concept Sliders to access the computation at the U-net and more stage in comfyui?

An auto1111 webui plugin, LoRa Control - Dynamic Weights Controller (https://github.com/cheald/sd-webui-loractl#lora-control—dynamic-weights-controller), provides a control idea. The syntax used is <lora:network_name:0@0,[email protected],0@1:unet=0@0,0.5@1>

I just started to get in touch with SD, I don’t know if my thoughts are accurate and reasonable, please correct me.

@nomadoor
Copy link

LoRa Control - Dynamic Weights Controller

If you prepare the same number of Ksampler Advanced nodes as the number of sampling steps, you can do the same kind of complex control of LoRA as this.
But I guess nobody would do that 🤣

Either way, since the inference methods seem to be different, a LoRA adapter dedicated to Concept Sliders needs to be developed.

@nomadoor
Copy link

Concept_Sliders_R
Concept_Sliders_R.json
I had made a mistake in the settings of the KSamplerAdvanced node.
Although the difference is trivial, here is the corrected workflow.

  • Previous Ver.
    -1st KSampler : return_with_leftover_noise - disable
    -2nd KSampler : add_noise - enable
  • Current Ver.
    -1st KSampler : return_with_leftover_noise - enable
    -2nd KSampler : add_noise - disable

@brendanhoar
Copy link

IIRC, discussion about this elsewhere indicated that developers were waiting for resolution of #2666 , the execution model inversion changes, before attempting work like this.

Anyone want to take a look at to see if this is more feasible now?

@pecanela
Copy link

i'm really newbie about, but if I have many types of sliders for good eyes, correct hands, curlyhair, all archives in format .pt. Where directory should I put those archives in comfyUI folders?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants