Update README.md
This commit is contained in:
@@ -1,14 +1,9 @@
|
||||
# ComfyUI_SimpleButcher
|
||||
|
||||
### Why is this needed:
|
||||
I needed to automate the process of generating images and I did not find ready-made simple solutions for this, so I wrote my own.
|
||||
The idea is to repeat the functionality of forge: the script "Prompts from file or textbox".
|
||||
So that you can easily sort through pre-prepared lists of prompts, lora, styles, and connect text as you like.
|
||||
The resulting images must be compatible with Forge, and ideally, no different from it.
|
||||
The problem is that Forge uses the internal name from the Lora file metadata as the lora name, not the file name.
|
||||
Therefore, all existing solutions simply did not understand my templates.
|
||||
I would also like it if lore could be written in any order and any quantity in a text file in this format: `<lora:name:1.0>` or `<lora:name:unet=1.0:te=0.75>` and this would be applied automatically, without the need to create nodes for each lora separately.
|
||||
I would like the `civitai` site to understand metadata, the closest to this was the `alexopus/ComfyUI-Image-Saver` project, but it loses lora written in Forge style, by internal name.
|
||||
I needed to automate the process of generating images and could not find any straightforward ready-made solutions for this purpose. Hence, I developed my own solution. The primary idea is to replicate and expand `Forge's` functionality: specifically, the `Prompts from file or textbox` script. This will allow you to easily combine pre-prepared lists of prompts, LoRA, styles, allowing you to combine texts as you wish.
|
||||
The resulting images prompt in metadata must be compatible with `Forge`, ideally appearing no different than those generated by it. However, I encountered a problem because `Forge` uses the internal name from the LoRA file metadata as the LoRA's name instead of the filename. Consequently, all existing solutions failed to comprehend my templates.
|
||||
I also wish for the ability to write LoRA in any order and quantity within a text file using this format: `lora:name:1.0` or `lora:name:unet=1.0:te=0.75`. This should be automatically applied without the need to create separate nodes for each LoRA. Additionally, I would like it if the `CivitAI` platform could understand metadata. As the closest solution I found was the `alexopus/ComfyUI-Image-Saver` project. However, this alternative loses LORA written in `Forge` style by using the internal name instead of the filename.
|
||||
|
||||

|
||||
[!] You need to remove the first node with empty text, so that it does not block the execution of the chain, since the text in it does not change.
|
||||
@@ -27,9 +22,8 @@ In Windows:
|
||||
- `.\..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt`
|
||||
- Start/restart ComfyUI
|
||||
|
||||
## Node: Simple Load Line From Text File
|
||||
Simple prompt loader from a text file to automate the batch process.
|
||||
Can be combined with each other and create total randomness text and lora that is taken from your text and lora templates.
|
||||
## Node 1: Simple Load Line From Text File
|
||||
Simple tool for loading prompts directly from a text file, enabling automation of the entire batch process. You can combine this nodes to generate fully randomized texts and LoRA, sourced from your own text and LORA templates.
|
||||
|
||||
#### Input:
|
||||
- `start` - *INT* - Start position for increment or decrement methods.
|
||||
@@ -46,8 +40,8 @@ Can be combined with each other and create total randomness text and lora that i
|
||||
|
||||

|
||||
|
||||
## Node: Simple Extract Lora From Text
|
||||
If the text contains lore, written in Forge style: `<lora:name:1.0>` or `<lora:name:unet=1.0:te=0.75>`, this node splits the text into prompts and lore separately
|
||||
## Node 2: Simple Extract Lora From Text
|
||||
If the input text includes LoRA written in `Forge` style, such as `<lora:name:1.0>` or `<lora:name:unet=1.0:te=0.75>`, this node automatically segregates the text into separate prompts and LoRA.
|
||||
|
||||
#### Input:
|
||||
- `text` - *STRING* - Text with mixed lora and prompt.
|
||||
@@ -57,13 +51,9 @@ If the text contains lore, written in Forge style: `<lora:name:1.0>` or `<lora:n
|
||||
|
||||

|
||||
|
||||
## Node: Simple Lora Loader
|
||||
Multiple LoRAs loader, understands discriptions in Forge style: `<lora:name:1.0>` or `<lora:name:unet=1.0:te=0.75>`.
|
||||
Understands both file names and internal lore names, which is read from the metadata of the `*.safetensors` file from the `ss_output_name` field.
|
||||
Once creates a `lora_name.json` dictionary and places it in the lora folder to speed up.
|
||||
Once creates a lora templates to `__txt` folder.
|
||||
Additionally, the hash of all lora is read once.
|
||||
In case of lora update just delete these files and press F5 in confy-ui.
|
||||
## Node 3: Simple Lora Loader
|
||||
This tool can load multiple LoRAs described in Forge style, such as `<lora:name:1.0>` or `<lora:name:unet=1.0:te=0.75>`. It recognizes both file names and internal LoRA names obtained from the metadata of `*.safetensors` files via the `ss_output_name` field.
|
||||
Upon initialization, it generates a `lora_name.json` dictionary, saving it in the LoRA folder to expedite future operations. Additionally, it creates a set of LoRA templates within the `__txt` directory. The hash values for all LoRAs are computed and stored once for efficient retrieval. For updates: if you update LoRAs place, add new LoRA, simply delete these files (`lora_name.json` and the LoRA templates) and press F5 in Confy-UI to reload them.
|
||||
|
||||
#### Input:
|
||||
- `model` - *MODEL* - The diffusion model the LoRA will be applied to.
|
||||
@@ -81,8 +71,8 @@ In case of lora update just delete these files and press F5 in confy-ui.
|
||||
|
||||

|
||||
|
||||
## Node: Simple Image Saver (as Forge)
|
||||
Image Saver with metadata in Forge style. Loras name and hash could be obtained from Simple Lora Loader node. Сreated subfolders with date. Output files contain a sequence number and seed, as Forge does.
|
||||
## Node 4: Simple Image Saver (as Forge)
|
||||
Image Saver designed for saved metadata in `Forge`-style, allowing retrieval of LoRAs' names and hashes directly from the `Simple LoRA Loader node`. This tool automatically organizes output images into subfolders based on the date. The filenames of the saved files include a sequence number and seed.
|
||||
|
||||
#### Input:
|
||||
- `images` - *IMAGE* - image(s) to save.
|
||||
@@ -114,7 +104,7 @@ If not connected these lines will be missing:
|
||||
|
||||

|
||||
|
||||
Maybe it will be useful to someone. This is my first project, there may be mistakes.
|
||||
Maybe it will be useful to someone.
|
||||
|
||||
[!] Tested on Windows only. Tested on Flux only.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user