diff --git a/README.md b/README.md index 0bf5fee..54b61c9 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ additional metadata to ensure compatibility with metadata detection on websites Usage • Credits

- + @@ -66,49 +66,81 @@ git pull --recurse-submodules ``` ## Usage ->The following section may be outdated and could differ from the actual nodes. ### Prompt Reader Node -- The Prompt Reader Node works exactly the same as the +- The `Prompt Reader` Node works exactly the same as the [standalone SD Prompt Reader](https://github.com/receyuki/stable-diffusion-prompt-reader). It uses the Image Data Reader from the [standalone SD Prompt Reader](https://github.com/receyuki/stable-diffusion-prompt-reader), allowing it to support the same formats and receive updates along with the -[SD Prompt Reader](https://github.com/receyuki/stable-diffusion-prompt-reader). - -***For images containing multiple sets of parameters, such as those processed through `hires-fix` or `refiner`, -you will need to modify the `data_index` to select the parameters you need*** - -***For images generated by SDXL and containing multiple sets of prompts, -the text_g will be combined with text_l into a single prompt*** +[SD Prompt Reader](https://github.com/receyuki/stable-diffusion-prompt-reader). +- Due to custom nodes and complex workflows potentially causing issues with SD Prompt Reader's ability +to read image metadata correctly, it is recommended to embed the `Prompt Saver` Node within the workflow +to ensure maximum compatibility. +- For images containing multiple sets of parameters, such as those processed through `hires-fix` or `refiner`, +you will need to modify the `parameter_index` to select the parameters you need +- For images generated by SDXL and containing multiple sets of prompts, +the `text_g` will be combined with `text_l` into a single prompt
reader node
-### Prompt Saver Node & Parameter Generator Node -- The Prompt Saver Node and The Parameter Generator Node are designed to be used together. -- The Prompt Saver Node will write additional metadata in the A1111 format to the output images +### Prompt Saver Node +- The `Prompt Saver` Node and The `Parameter Generator` Node are designed to be used together. +- The `Prompt Saver` Node will write additional metadata in the A1111 format to the output images to be compatible with any tools that support the A1111 format, including SD Prompt Reader and Civitai. Due to custom nodes and complex workflows potentially causing issues with SD Prompt Reader's ability to read image metadata correctly, it is recommended to embed this node within the workflow to ensure maximum compatibility. -- Since it's not possible to directly extract metadata from KSampler, it is necessary to -use the Parameter Generator Node to generate parameters and simultaneously output them to both -the Prompt Saver Node and KSampler. +- Since it's not possible to directly extract metadata from `KSampler`, it is necessary to +use the `Parameter Generator` Node to generate parameters and simultaneously output them to both +the `Prompt Saver` Node and `KSampler`. +- Please refer to the following table for placeholders supported by the `filename` and `path`. + + | Placeholder | + |-------------| + | %date | + | %time | + | %counter | + | %seed | + | %steps | + | %cfg | + | %extension | + | %model | + | %sampler | + | %scheduler | + | %quality | + +- For the `date_format` and `time_format`, please refer to +[strftime.org](https://strftime.org/) or [www.strfti.me](https://www.strfti.me/).
- generator and saver node + generator and saver node +
+ +## Parameter Generator Node +- Since it's not possible to directly extract metadata from `KSampler`, it is necessary to +use the `Parameter Generator` Node to generate parameters and simultaneously output them to both +the `Prompt Saver` Node and `KSampler`. +- The `model_version` and `aspect_ratio` are used only for calculating the optimal resolution of the selected model version +under the chosen aspect ratio. The calculation method is based on the +[Stability AI development documentation](https://platform.stability.ai/docs/features/api-parameters#about-dimensions) +and the [StableSwarmUI source code](https://github.com/Stability-AI/StableSwarmUI) (developed by Stability AI). +- `refiner_start` refers to the proportion of steps completed when the refiner starts running, +i.e., the proportion of base steps to total steps. This is used to calculate the `start_at_step` (`REFINER_START_STEP`) +required by the refiner `KSampler` under the selected step ratio. + +
+ generator and saver node
### Prompt Merger Node & Type Converter Node - Since the A1111 format cannot store `text_g` and `text_l` separately, SDXL users need to use -the Prompt Merger Node to combine `text_g` and `text_l` into a single prompt. -- In some cases, inputs like `model_name`, `sampler_name`, and `scheduler` may conflict with other custom nodes. -You can use the SD Type Converter to convert them into `STRING` type and then -input them into `model_name_str`, `sampler_name_str`, and `scheduler_str`. Please note that inputs of type `STRING` -have higher priority, so do not connect `STRING` inputs unless necessary, as the Prompt Saver will prioritize reading -`STRING` inputs over regular ones. +the `Prompt Merger` Node to combine `text_g` and `text_l` into a single prompt. +- Since `model_name`, `sampler_name`, and `scheduler` are special types +that cannot be directly used by some other nodes, +You can use the `Type Converter` Node to convert them into `STRING` type.
merger and converter node diff --git a/images/generator.png b/images/generator.png new file mode 100644 index 0000000..847c170 Binary files /dev/null and b/images/generator.png differ diff --git a/images/generator_saver.png b/images/generator_saver.png deleted file mode 100644 index d460257..0000000 Binary files a/images/generator_saver.png and /dev/null differ diff --git a/images/merger_converter.png b/images/merger_converter.png index 8d125de..6fdf1fe 100644 Binary files a/images/merger_converter.png and b/images/merger_converter.png differ diff --git a/images/reader.png b/images/reader.png index 0eb05bb..ae9828f 100644 Binary files a/images/reader.png and b/images/reader.png differ diff --git a/images/saver.png b/images/saver.png new file mode 100644 index 0000000..97db66e Binary files /dev/null and b/images/saver.png differ diff --git a/images/screenshot_v100.png b/images/screenshot_v100.png new file mode 100644 index 0000000..c9a7f85 Binary files /dev/null and b/images/screenshot_v100.png differ