comfyanonymous / ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
50k stars 5.26k forks source link

How to set clip skip value in comfyui #2223

Open lucasjinreal opened 9 months ago

lucasjinreal commented 9 months ago

In webui there is a slider which set clip skip value,

how to do it in comfyui

image

Also, I am very confused by why comfy ui can not genreate same images compare with webui of same model

not even close.

https://civitai.com/models/43331/majicmix-realistic

this model image are really far from what I get, any body knows why?

this is my workflow.

workflow_sd1.5_upscale_fixed.json

ltdrdata commented 9 months ago

image

Just ComfyUI's node requires negative value. stop_at_clip_layer = -2 is equivalent to clipskip = 2

lucasjinreal commented 9 months ago

@ltdrdata thanku! very helpful. I setted clip skip, but still can not really get a approximate result as the model announced,

this is I got:

image

I have using 30 steps, generate, same prompt, and I scaled, the result like oil painint, but this is what I want:

image

Can u see why?

ltdrdata commented 9 months ago

Your token weights are too high. You should not give weights same with A1111.

lucasjinreal commented 9 months ago

@ltdrdata hi, how to set the token weights can u elebrate? Do u mean cfg? from the webiste it says using 7.0,

does there any a calculate formate between A1111 and comfyui? How?

lucasjinreal commented 9 months ago

@ltdrdata You might know magic, bro!

image

JarekDerp commented 9 months ago

Don't raise issues if you have a question. Ask on Reddit or Discord somewhere. This area is for bugs and report problems with the apps to devs. Also, mark your issues as closed when it's solved.

rovo79 commented 8 months ago

@lucasjinreal

up and down weighting

The importance of parts of the prompt can be up or down-weighted by enclosing the specified part of the prompt in brackets using the following syntax: (prompt:weight). E.g. if we have a prompt flowers inside a blue vase and we want the diffusion model to empathize the flowers we could try reformulating our prompt into: (flowers:1.2) inside a blue vase. Nested loops multiply the weights inside them, e.g. in the prompt ((flowers:1.2):.5) inside a blue vase flowers end up with a weight of 0.6. Using only brackets without specifying a weight is shorthand for (prompt:1.1), e.g. (flower) is equal to (flower:1.1). To use brackets inside a prompt they have to be escaped, e.g.\(1990\). ComfyUI can also add the appropriate weighting syntax for a selected part of the prompt via the keybinds Ctrl+Up and Ctrl+Down. The amount by which these shortcuts up or down-weight can be adjusted in the settings.

https://blenderneko.github.io/ComfyUI-docs/Interface/Textprompts/#up-and-down-weighting

Volantarius commented 8 months ago

Thank you this was very confusing for me to find this setting!

PHI6kai commented 6 months ago

@lucasjinreal Can you share your workflow, I'd like to learn how to use clip step layer.

airtonix commented 5 months ago

for anyone else wondering, the node is called CLIPSetLastLayer found under Conditioning

image

image

Amit30swgoh commented 3 months ago

what is clipskip what does it do whats the different betweern no clip skip to -1 -2 0 1 2 etc and please show photo comparrsion examples ty

croald commented 4 weeks ago

@Amit30swgoh, sometimes when you download a model (checkpoint), in the notes the author recommends some settings. Often 'clip skip' is one of them. Unless you want to get down to the level of expertise where you're editing your own models, you probably wouldn't mess with it otherwise.