Skip to content

Commit 4fd005d

Browse files
authored
Merge pull request #23 from Comfy-Org/ClipSetLastLayer
Update Clip Set Last Layer docs
2 parents b0bb653 + ab49952 commit 4fd005d

File tree

7 files changed

+197
-50
lines changed

7 files changed

+197
-50
lines changed
Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,33 @@
1-
This node is designed to modify the behavior of a CLIP model by setting a specific layer as the last one to be executed. It allows for the customization of the depth of processing within the CLIP model, potentially affecting the model's output by limiting the amount of information processed.
1+
`CLIP Set Last Layer` is a core node in ComfyUI for controlling the processing depth of CLIP models. It allows users to precisely control where the CLIP text encoder stops processing, affecting both the depth of text understanding and the style of generated images.
2+
3+
Imagine the CLIP model as a 24-layer intelligent brain:
4+
5+
- Shallow layers (1-8): Recognize basic letters and words
6+
- Middle layers (9-16): Understand grammar and sentence structure
7+
- Deep layers (17-24): Grasp abstract concepts and complex semantics
8+
9+
`CLIP Set Last Layer` works like a **"thinking depth controller"**:
10+
11+
-1: Use all 24 layers (complete understanding)
12+
-2: Stop at layer 23 (slightly simplified)
13+
-12: Stop at layer 13 (medium understanding)
14+
-24: Use only layer 1 (basic understanding)
215

316
## Inputs
417

5-
| Parameter | Data Type | Description |
6-
|----------------------|-----------|-------------|
7-
| `clip` | `CLIP` | The CLIP model to be modified. This parameter allows the node to directly interact with and alter the structure of the CLIP model. |
8-
| `stop_at_clip_layer` | `INT` | Specifies the layer at which the CLIP model should stop processing. This allows for control over the depth of computation and can be used to adjust the model's behavior or performance. |
18+
| Parameter | Data Type | Default | Range | Description |
19+
|-----------|-----------|---------|--------|-------------|
20+
| `clip` | CLIP | - | - | The CLIP model to be modified |
21+
| `stop_at_clip_layer` | INT | -1 | -24 to -1 | Specifies which layer to stop at, -1 uses all layers, -24 uses only the first layer |
922

1023
## Outputs
1124

12-
| Parameter | Data Type | Description |
13-
|-----------|-------------|-------------|
14-
| `clip` | CLIP | The modified CLIP model with the specified layer set as the last one. This output enables further use or analysis of the adjusted model. |
25+
| Output Name | Data Type | Description |
26+
|-------------|-----------|-------------|
27+
| clip | CLIP | The modified CLIP model with the specified layer set as the last one |
28+
29+
## Why Set the Last Layer
30+
31+
- **Performance Optimization**: Like not needing a PhD to understand simple sentences, sometimes shallow understanding is enough and faster
32+
- **Style Control**: Different levels of understanding produce different artistic styles
33+
- **Compatibility**: Some models might perform better at specific layers
Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,33 @@
1-
Este nodo está diseñado para modificar el comportamiento de un modelo CLIP al establecer una capa específica como la última en ejecutarse. Permite la personalización de la profundidad de procesamiento dentro del modelo CLIP, lo que puede afectar la salida del modelo al limitar la cantidad de información procesada.
1+
`Establecer Última Capa de CLIP` es un nodo central en ComfyUI para controlar la profundidad de procesamiento de los modelos CLIP. Permite a los usuarios controlar con precisión dónde se detiene el procesamiento del codificador de texto CLIP, afectando tanto la profundidad de comprensión del texto como el estilo de las imágenes generadas.
2+
3+
Imagine el modelo CLIP como un cerebro inteligente de 24 capas:
4+
5+
- Capas superficiales (1-8): Reconocen letras y palabras básicas
6+
- Capas intermedias (9-16): Comprenden gramática y estructura de oraciones
7+
- Capas profundas (17-24): Captan conceptos abstractos y semántica compleja
8+
9+
`Establecer Última Capa de CLIP` funciona como un **"controlador de profundidad de pensamiento"**:
10+
11+
-1: Usa todas las 24 capas (comprensión completa)
12+
-2: Se detiene en la capa 23 (ligeramente simplificado)
13+
-12: Se detiene en la capa 13 (comprensión media)
14+
-24: Usa solo la capa 1 (comprensión básica)
215

316
## Entradas
417

5-
| Parámetro | Data Type | Descripción |
6-
|---------------------|--------------|-------------|
7-
| `clip` | `CLIP` | El modelo CLIP que se va a modificar. Este parámetro permite que el nodo interactúe directamente y altere la estructura del modelo CLIP. |
8-
| `stop_at_clip_layer` | `INT` | Especifica la capa en la que el modelo CLIP debe dejar de procesar. Esto permite controlar la profundidad de cálculo y se puede utilizar para ajustar el comportamiento o rendimiento del modelo. |
18+
| Parámetro | Tipo de Dato | Valor Predeterminado | Rango | Descripción |
19+
|-----------|--------------|---------------------|--------|-------------|
20+
| `clip` | CLIP | - | - | El modelo CLIP a modificar |
21+
| `detener_en_capa_clip` | INT | -1 | -24 a -1 | Especifica en qué capa detenerse, -1 usa todas las capas, -24 usa solo la primera capa |
922

1023
## Salidas
1124

12-
| Parámetro | Data Type | Descripción |
13-
|-----------|-------------|-------------|
14-
| `clip` | CLIP | El modelo CLIP modificado con la capa especificada establecida como la última. Esta salida permite un uso o análisis adicional del modelo ajustado.
25+
| Nombre de Salida | Tipo de Dato | Descripción |
26+
|-----------------|--------------|-------------|
27+
| clip | CLIP | El modelo CLIP modificado con la capa especificada establecida como la última |
28+
29+
## Por Qué Establecer la Última Capa
30+
31+
- **Optimización de Rendimiento**: Como no necesitas un doctorado para entender oraciones simples, a veces una comprensión superficial es suficiente y más rápida
32+
- **Control de Estilo**: Diferentes niveles de comprensión producen diferentes estilos artísticos
33+
- **Compatibilidad**: Algunos modelos pueden funcionar mejor en capas específicas
Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,33 @@
1-
Ce nœud est conçu pour modifier le comportement d'un modèle CLIP en définissant une couche spécifique comme la dernière à être exécutée. Cela permet de personnaliser la profondeur de traitement au sein du modèle CLIP, affectant potentiellement la sortie du modèle en limitant la quantité d'informations traitées.
1+
`Définir la Dernière Couche CLIP` est un nœud central dans ComfyUI pour contrôler la profondeur de traitement des modèles CLIP. Il permet aux utilisateurs de contrôler précisément où l'encodeur de texte CLIP arrête son traitement, affectant à la fois la profondeur de compréhension du texte et le style des images générées.
2+
3+
Imaginez le modèle CLIP comme un cerveau intelligent à 24 couches :
4+
5+
- Couches superficielles (1-8) : Reconnaissent les lettres et mots de base
6+
- Couches intermédiaires (9-16) : Comprennent la grammaire et la structure des phrases
7+
- Couches profondes (17-24) : Saisissent les concepts abstraits et la sémantique complexe
8+
9+
`Définir la Dernière Couche CLIP` fonctionne comme un **"contrôleur de profondeur de réflexion"** :
10+
11+
-1 : Utilise les 24 couches (compréhension complète)
12+
-2 : S'arrête à la couche 23 (légèrement simplifié)
13+
-12 : S'arrête à la couche 13 (compréhension moyenne)
14+
-24 : Utilise uniquement la couche 1 (compréhension basique)
215

316
## Entrées
417

5-
| Paramètre | Data Type | Description |
6-
|---------------------|--------------|-------------|
7-
| `clip` | `CLIP` | Le modèle CLIP à modifier. Ce paramètre permet au nœud d'interagir directement avec et de modifier la structure du modèle CLIP. |
8-
| `stop_at_clip_layer` | `INT` | Spécifie la couche à laquelle le modèle CLIP doit arrêter le traitement. Cela permet de contrôler la profondeur de calcul et peut être utilisé pour ajuster le comportement ou la performance du modèle. |
18+
| Paramètre | Type de Donnée | Valeur par Défaut | Plage | Description |
19+
|-----------|----------------|-------------------|--------|-------------|
20+
| `clip` | CLIP | - | - | Le modèle CLIP à modifier |
21+
| `arrêt_couche_clip` | INT | -1 | -24 à -1 | Spécifie la couche d'arrêt, -1 utilise toutes les couches, -24 utilise uniquement la première couche |
922

1023
## Sorties
1124

12-
| Paramètre | Type de Donnée | Description |
13-
|-----------|-------------|-------------|
14-
| `clip` | CLIP | Le modèle CLIP modifié avec la couche spécifiée définie comme la dernière. Cette sortie permet une utilisation ou une analyse ultérieure du modèle ajusté. |
25+
| Nom de Sortie | Type de Donnée | Description |
26+
|---------------|----------------|-------------|
27+
| clip | CLIP | Le modèle CLIP modifié avec la couche spécifiée définie comme dernière |
28+
29+
## Pourquoi Définir la Dernière Couche
30+
31+
- **Optimisation des Performances** : Comme on n'a pas besoin d'un doctorat pour comprendre des phrases simples, parfois une compréhension superficielle suffit et est plus rapide
32+
- **Contrôle du Style** : Différents niveaux de compréhension produisent différents styles artistiques
33+
- **Compatibilité** : Certains modèles peuvent mieux fonctionner à des couches spécifiques
Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,33 @@
1-
このノードは、特定の層を最後に実行するように設定することで、CLIPモデルの動作を変更するために設計されています。これにより、CLIPモデル内の処理の深さをカスタマイズでき、処理される情報量を制限することでモデルの出力に影響を与える可能性があります。
1+
`CLIPの最終層を設定` は、CLIPモデルの処理深度を制御するComfyUIの核となるノードです。CLIPテキストエンコーダーがどの層で処理を停止するかを正確に制御でき、テキスト理解の深さと生成される画像のスタイルに影響を与えます。
2+
3+
CLIPモデルを24層の知的な脳として想像してみましょう:
4+
5+
- 浅い層(1-8層):基本的な文字や単語を認識
6+
- 中間層(9-16層):文法や文章構造を理解
7+
- 深い層(17-24層):抽象的な概念や複雑な意味を把握
8+
9+
`CLIPの最終層を設定`**"思考の深さコントローラー"** のように機能します:
10+
11+
-1: 全24層を使用(完全な理解)
12+
-2: 23層で停止(やや簡略化)
13+
-12: 13層で停止(中程度の理解)
14+
-24: 1層のみ使用(基本的な理解)
215

316
## 入力
417

5-
| パラメータ | Data Type | 説明 |
6-
|---------------------|--------------|-------------|
7-
| `clip` | `CLIP` | 修正されるCLIPモデル。このパラメータにより、ノードはCLIPモデルの構造に直接的に関与し、変更を加えることができます。 |
8-
| `stop_at_clip_layer` | `INT` | CLIPモデルが処理を停止する層を指定します。これにより、計算の深さを制御し、モデルの動作や性能を調整することができます。 |
18+
| パラメータ | データ型 | デフォルト値 | 範囲 | 説明 |
19+
|-----------|----------|--------------|------|------|
20+
| `clip` | CLIP | - | - | 修正対象のCLIPモデル |
21+
| `クリップ_レイヤーで停止` | INT | -1 | -24から-1 | 停止する層を指定、-1は全層使用、-24は最初の層のみ使用 |
922

1023
## 出力
1124

12-
| パラメータ | データ型 | 説明 |
13-
|-----------|-------------|-------------|
14-
| `clip` | CLIP | 指定された層を最後に設定した修正済みのCLIPモデル。この出力により、調整されたモデルのさらなる使用や分析が可能になります。 |
25+
| 出力名 | データ型 | 説明 |
26+
|--------|----------|------|
27+
| clip | CLIP | 指定された層を最後に設定した修正済みのCLIPモデル |
28+
29+
## なぜ最終層を設定するのか
30+
31+
- **パフォーマンスの最適化**:単純な文章を理解するのに博士号は必要ないように、時には浅い理解で十分で、より高速です
32+
- **スタイルのコントロール**:理解の深さの違いにより、異なる芸術的スタイルが生まれます
33+
- **互換性**:特定の層で最高のパフォーマンスを発揮するモデルもあります
Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,33 @@
1-
이 노드는 CLIP 모델의 특정 레이어를 마지막으로 설정하여 CLIP 모델의 동작을 수정하도록 설계되었습니다. 이는 CLIP 모델 내에서 처리 깊이를 사용자 정의할 수 있게 하여, 처리되는 정보의 양을 제한함으로써 모델의 출력을 잠재적으로 영향을 미칠 수 있습니다.
1+
`CLIP 마지막 레이어 설정`은 ComfyUI에서 CLIP 모델의 처리 깊이를 제어하는 핵심 노드입니다. 사용자가 CLIP 텍스트 인코더가 어느 레이어에서 처리를 중단할지 정확하게 제어할 수 있어, 텍스트 이해의 깊이와 생성되는 이미지의 스타일에 영향을 미칩니다.
22

3-
## Input types
3+
CLIP 모델을 24개 레이어를 가진 지능적인 두뇌로 상상해보세요:
44

5-
| Parameter | Data Type | Description |
6-
|---------------------|--------------|-------------|
7-
| `clip` | `CLIP` | 수정할 CLIP 모델입니다. 이 매개변수는 노드가 CLIP 모델의 구조와 직접 상호작용하고 변경할 수 있도록 합니다. |
8-
| `stop_at_clip_layer` | `INT` | CLIP 모델이 처리 중단할 레이어를 지정합니다. 이는 계산 깊이를 제어할 수 있게 하며, 모델의 동작이나 성능을 조정하는 데 사용할 수 있습니다. |
5+
- 얕은 레이어 (1-8층): 기본적인 문자와 단어를 인식
6+
- 중간 레이어 (9-16층): 문법과 문장 구조를 이해
7+
- 깊은 레이어 (17-24층): 추상적 개념과 복잡한 의미를 파악
98

10-
## Output types
9+
`CLIP 마지막 레이어 설정`**"사고 깊이 조절기"**처럼 작동합니다:
1110

12-
| Parameter | Data Type | Description |
13-
|-----------|-------------|-------------|
14-
| `clip` | CLIP | 지정된 레이어가 마지막으로 설정된 수정된 CLIP 모델입니다. 이 출력은 조정된 모델의 추가 사용 또는 분석을 가능하게 합니다. |
11+
-1: 전체 24개 레이어 사용 (완전한 이해)
12+
-2: 23번째 레이어에서 중단 (약간 단순화)
13+
-12: 13번째 레이어에서 중단 (중간 수준의 이해)
14+
-24: 1번째 레이어만 사용 (기본적인 이해)
15+
16+
## 입력
17+
18+
| 매개변수 | 데이터 타입 | 기본값 | 범위 | 설명 |
19+
|----------|------------|--------|-------|------|
20+
| `clip` | CLIP | - | - | 수정할 CLIP 모델 |
21+
| `CLIP_레이어_중단점` | INT | -1 | -24부터 -1까지 | 중단할 레이어 지정, -1은 전체 레이어 사용, -24는 첫 번째 레이어만 사용 |
22+
23+
## 출력
24+
25+
| 출력명 | 데이터 타입 | 설명 |
26+
|--------|------------|------|
27+
| clip | CLIP | 지정된 레이어가 마지막으로 설정된 수정된 CLIP 모델 |
28+
29+
## 마지막 레이어를 설정하는 이유
30+
31+
- **성능 최적화**: 간단한 문장을 이해하는 데 박사 학위가 필요하지 않듯이, 때로는 얕은 이해만으로도 충분하고 더 빠릅니다
32+
- **스타일 제어**: 이해의 깊이가 다르면 다른 예술적 스타일이 생성됩니다
33+
- **호환성**: 특정 레이어에서 더 좋은 성능을 보이는 모델들이 있습니다
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
`Установить последний слой CLIP` - это ключевой узел в ComfyUI для управления глубиной обработки моделей CLIP. Он позволяет пользователям точно контролировать, на каком слое текстовый кодировщик CLIP прекращает обработку, влияя как на глубину понимания текста, так и на стиль генерируемых изображений.
2+
3+
Представьте модель CLIP как 24-слойный интеллектуальный мозг:
4+
5+
- Поверхностные слои (1-8): Распознают базовые буквы и слова
6+
- Средние слои (9-16): Понимают грамматику и структуру предложений
7+
- Глубокие слои (17-24): Постигают абстрактные концепции и сложную семантику
8+
9+
`Установить последний слой CLIP` работает как **"регулятор глубины мышления"**:
10+
11+
-1: Использовать все 24 слоя (полное понимание)
12+
-2: Остановиться на 23 слое (слегка упрощённое)
13+
-12: Остановиться на 13 слое (среднее понимание)
14+
-24: Использовать только 1 слой (базовое понимание)
15+
16+
## Входы
17+
18+
| Параметр | Тип данных | По умолчанию | Диапазон | Описание |
19+
|----------|------------|---------------|-----------|-----------|
20+
| `clip` | CLIP | - | - | Модель CLIP для модификации |
21+
| `остановиться_на_clip_слое` | INT | -1 | от -24 до -1 | Указывает, на каком слое остановиться, -1 использует все слои, -24 использует только первый слой |
22+
23+
## Выходы
24+
25+
| Имя выхода | Тип данных | Описание |
26+
|------------|------------|-----------|
27+
| clip | CLIP | Модифицированная модель CLIP с указанным слоем, установленным как последний |
28+
29+
## Зачем устанавливать последний слой
30+
31+
- **Оптимизация производительности**: Как не нужна докторская степень для понимания простых предложений, иногда достаточно поверхностного понимания, и это быстрее
32+
- **Контроль стиля**: Разные уровни понимания создают разные художественные стили
33+
- **Совместимость**: Некоторые модели могут работать лучше на определённых слоях

0 commit comments

Comments
 (0)