Added Readme
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
# ComfyUI Coziness
|
||||
|
||||
Custom nodes for [ComfyUI](https://github.com/comfyanonymous/ComfyUI).
|
||||
|
||||
- [MultiLora Loader](#multilora-loader): Uses a textual description of loras to add to a model
|
||||
- [Lora Text Extractor](#lora-text-extractor): Takes text, such as a prompt, and filters out lora descriptions. You can connect the filtered text to CLIP Text Encode and the extracted loras to MultiLora Loader.
|
||||
|
||||
## Installing
|
||||
|
||||
Just add [MultiLoraLoader.py](MultiLoraLoader.py) to ComfyUI's `custom_nodes` directory.
|
||||
|
||||
## MultiLora Loader
|
||||
|
||||
Uses a textual description to specify the loras you want to add to a checkpoint model.
|
||||
|
||||

|
||||
|
||||
You can add the node from the `loaders` category at `loaders > MultiLora Loader`.
|
||||
|
||||
Connect the inputs & outputs like you would with the normal ComfyUI lora nodes. In the text box, type the loras you want to use, each on one line. The format is:
|
||||
|
||||
`file_name[:weight1[:weight2]]`
|
||||
|
||||
If you specify only one weight, it used for both model and clip. If you specify two, the first weight is for the model and the second is for the clip. If you specify none, it uses 1 for both.
|
||||
|
||||
There's two ways to specify each file name. If your Lora directory has the following contents,
|
||||
|
||||
```
|
||||
- one.safetensors
|
||||
- Some Folder
|
||||
- two.safetensors
|
||||
```
|
||||
|
||||
You can use either the full subpath, like `Some Folder/two.safetensors`, or just the file name itself, like `two`.
|
||||
|
||||
Also, to make copy & pasting Automatic1111 prompts easy, it accepts names wrapped in `<lora:..>` or `<lyco:...>`. It doesn't make a difference if you use lora or lyco, the stuff is completely ignored.
|
||||
|
||||
You can also use `#` to start a comment.
|
||||
|
||||
Here's an example loading six loras with each form,
|
||||
|
||||
```
|
||||
one
|
||||
Some Folder/two.safetensors:1.1
|
||||
three:1
|
||||
four:1:0.5
|
||||
<lora:five> # this is a comment
|
||||
<lyco:six:0.8:0.7>
|
||||
# <lora:nope> this isn't loaded because it's commented out
|
||||
```
|
||||
|
||||
## Lora Text Extractor
|
||||
|
||||
Takes the input text and extracts loras specified using Automatic1111's lora syntax out of it. It has two outputs: one for the filtered text without the loras, and another with the stuff that was removed from it, separated by newlines. You can connect the filtered text output to a CLIP Text Encode node to use as your prompt, and the lora text output to MultiLora Loader.
|
||||
|
||||

|
||||
|
||||
You can add the node from the `utils` category at `utils > Lora Text Extractor`.
|
||||
|
||||
In order to connect to those nodes, you have to convert their text boxes into inputs. Right-click on each node (CLIP Text Encode and MultiLora Loader) and select "Convert text to input" from the menu.
|
||||
|
||||

|
||||
|
||||
### Example Input & Outputs
|
||||
|
||||
#### Input
|
||||
|
||||
```
|
||||
pizza <lora:add_detail:0.5>,<lora:epi_noiseoffset2:1.1>,
|
||||
```
|
||||
|
||||
#### Outputs
|
||||
|
||||
###### Filtered Text
|
||||
```
|
||||
pizza ,,
|
||||
```
|
||||
###### Extracted Loras
|
||||
```
|
||||
<lora:add_detail:0.5>
|
||||
<lora:epi_noiseoffset2:1.1>
|
||||
```
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 73 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 71 KiB |
Reference in New Issue
Block a user