Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
receyuki committed May 10, 2024
1 parent 9bd5da5 commit bb10edc
Showing 1 changed file with 54 additions and 27 deletions.
81 changes: 54 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ A simple standalone viewer for reading prompt from Stable Diffusion generated im
<a href="#supported-formats">Supported Formats</a> •
<a href="#download">Download</a> •
<a href="#usage">Usage</a> •
<a href="#cli">CLI</a> •
<a href="https://github.com/receyuki/comfyui-prompt-reader-node">ComfyUI Node</a> •
<a href="#cli">CLI</a> •
<a href="#faq">FAQ</a> •
Expand All @@ -31,11 +32,13 @@ A simple standalone viewer for reading prompt from Stable Diffusion generated im
<img src="https://github.com/receyuki/stable-diffusion-prompt-reader/raw/master/images/screenshot_v134.png">
</div>

>The SD Prompt Reader is now available as a ComfyUI node. Check out
>the [ComfyUI Prompt Reader Node](https://github.com/receyuki/comfyui-prompt-reader-node) for more information.
> [!TIP]
> The SD Prompt Reader is now available as a ComfyUI node. Check out
> the [ComfyUI Prompt Reader Node](https://github.com/receyuki/comfyui-prompt-reader-node) for more information.
## Features
- Support macOS, Windows and Linux.
- Provides both GUI and CLI
- Simple drag and drop interaction.
- Copy prompt to clipboard.
- Remove prompt from image.
Expand All @@ -54,23 +57,25 @@ A simple standalone viewer for reading prompt from Stable Diffusion generated im
| [StableSwarmUI](https://github.com/Stability-AI/StableSwarmUI)* ||| | |
| [StableSwarmUI (prior to 0.5.8-alpha)](https://github.com/Stability-AI/StableSwarmUI)* ||| | |
| [Fooocus-MRE](https://github.com/MoonRide303/Fooocus-MRE)* ||| | |
| [NovelAI (stealth pnginfo)](https://novelai.net/) || || |
| [NovelAI (legacy)](https://novelai.net/) || | | |
| [InvokeAI](https://github.com/invoke-ai/InvokeAI) || | | |
| [InvokeAI (prior to 2.3.5-post.2)](https://github.com/invoke-ai/InvokeAI) || | | |
| [InvokeAI (prior to 1.15)](https://github.com/invoke-ai/InvokeAI) || | | |
| [ComfyUI](https://github.com/comfyanonymous/ComfyUI)* || | | |
| [Draw Things](https://drawthings.ai/) || | | |
| [NovelAI (stealth pnginfo)](https://novelai.net/) || | | |
| [NovelAI (legacy)](https://novelai.net/) || | | |
| Naifu(4chan) || | | |

\* Limitations apply. See [format limitations](#TXT).

If you are using a tool or format that is not on this list, please help me to support your format
by uploading the original file generated by your tool to the issues, thx.
> [!NOTE]
> If you are using a tool or format that is not on this list, please help me to support your format
> by uploading the original file generated by your tool to the issues, thx.
For ComfyUI users, the SD Prompt Reader is now available as a ComfyUI node.
The [ComfyUI Prompt Reader Node](https://github.com/receyuki/comfyui-prompt-reader-node) is a subproject
of this project, and it is recommended to embed the [Prompt Saver node](https://github.com/receyuki/comfyui-prompt-reader-node#prompt-saver-node--parameter-generator-node) in the [ComfyUI Prompt Reader Node](https://github.com/receyuki/comfyui-prompt-reader-node) within your workflow to ensure maximum compatibility.
> [!TIP]
> For ComfyUI users, the SD Prompt Reader is now available as a ComfyUI node.
> The [ComfyUI Prompt Reader Node](https://github.com/receyuki/comfyui-prompt-reader-node) is a subproject
> of this project, and it is recommended to embed the [Prompt Saver node](https://github.com/receyuki/comfyui-prompt-reader-node#prompt-saver-node--parameter-generator-node) in the [ComfyUI Prompt Reader Node](https://github.com/receyuki/comfyui-prompt-reader-node) within your workflow to ensure maximum compatibility.
## Download
### For Windows users
Expand Down Expand Up @@ -138,7 +143,10 @@ OR
![remove](https://github.com/receyuki/stable-diffusion-prompt-reader/raw/master/images/remove.png)

### Edit image
***Please note that the edited image will be written in A1111 format, it meaning that image in any format will become A1111 format after editing.***
> [!NOTE]
> The edited image will be written in A1111 format, meaning that image in any format
> will become A1111 format after editing.

- Click "Edit" to enter edit mode.
- Edit the prompt directly in the textbox or import a metadata file in txt format.
- Click "Save" will generate a edited image file with suffix "_edited" alongside the original image file.
Expand Down Expand Up @@ -168,16 +176,29 @@ The following parameters are supported:
![single line prompt](https://github.com/receyuki/stable-diffusion-prompt-reader/raw/master/images/single_line_prompt.png)

### ComfyUI SDXL workflow
***The SDXL workflow does not support editing.
If necessary, please remove prompts from image before edit.***
> [!NOTE]
> The SDXL workflow does not support editing.
> If necessary, please remove prompts from image before edit.

If the image's workflow includes multiple sets of SDXL prompts,
namely Clip G(text_g), Clip L(text_l), and Refiner, the SD Prompt Reader will switch to the multi-set prompt display mode as shown in the image below.
There are two interface options available for the multi-set prompt display mode, and you can switch between them using buttons.
![comfyui_sdxl.png](https://github.com/receyuki/stable-diffusion-prompt-reader/raw/master/images/comfyui_sdxl.png)
## CLI
A CLI tool for reading, modifying, and clearing metadata is provided.
In order to use the CLI tool, please [install SD Prompt Reader via pip](#for-linux-users-not-regularly-tested).
### Platforms
#### For Windows users
`SD Prompt Reader CLI.exe` will be placed in the zip package as a separate executable.
Examples:
`"SD Prompt Reader CLI.exe" -i example.png`
#### For macOS users
The executable is located at `SD Prompt Reader.app/Contents/MacOS/SD Prompt Reader`.
Examples:
`/Applications/SD\ Prompt\ Reader.app/Contents/MacOS/SD\ Prompt\ Reader -i example.png`
#### For pip users
Examples:
`sd-prompt-reader-cli -i example.png`
### Modes and Options
#### Modes
- Read Mode: Activated by `-r` or `--read` flag.
Expand Down Expand Up @@ -232,16 +253,19 @@ with a suffix added to the original filename.
1. Importing txt file is only allowed in edit mode.
2. Only A1111 format txt files are supported. You can use txt files generated by the A1111 webui or use the SD prompt reader to export txt from A1111 images
### StableSwarmUI
StableSwarmUI is still in the Alpha testing phase, and its format may change in the future. I will keep track of upcoming updates of StableSwarmUI.
> [!IMPORTANT]
> StableSwarmUI is still in the Alpha testing phase, and its format may change in the future. I will keep track of upcoming updates of StableSwarmUI.
### ComfyUI
1. When custom nodes are used or when the workflow becomes overly complex, there is a high probability that metadata may not be correctly read.
This is because ComfyUI does not store metadata but only the complete workflow. SD Prompt Reader can only handle basic workflows.
It is recommended to embed the [Prompt Saver node](https://github.com/receyuki/comfyui-prompt-reader-node#prompt-saver-node--parameter-generator-node) in the [ComfyUI Prompt Reader Node](https://github.com/receyuki/comfyui-prompt-reader-node) within your workflow to ensure maximum compatibility.
2. If there are multiple sets of data (seed, steps, CFG, etc.) in the setting box, this means that there are multiple KSampler nodes in the flowchart.
3. Due to the nature of ComfyUI, all nodes and flowcharts in the workflow are stored in the image, including those that are not being used. Also, a flowchart can have multiple branches, inputs and outputs.
> [!IMPORTANT]
> When custom nodes are used or when the workflow becomes overly complex, there is a high probability that metadata may not be correctly read.
> This is because ComfyUI does not store metadata but only the complete workflow. SD Prompt Reader can only handle basic workflows.
> It is recommended to embed the [Prompt Saver node](https://github.com/receyuki/comfyui-prompt-reader-node#prompt-saver-node--parameter-generator-node) in the [ComfyUI Prompt Reader Node](https://github.com/receyuki/comfyui-prompt-reader-node) within your workflow to ensure maximum compatibility.
1. If there are multiple sets of data (seed, steps, CFG, etc.) in the setting box, this means that there are multiple KSampler nodes in the flowchart.
2. Due to the nature of ComfyUI, all nodes and flowcharts in the workflow are stored in the image, including those that are not being used. Also, a flowchart can have multiple branches, inputs and outputs.
(e.g. output hires. fixed image and original image simultaneously in a single flowchart)
SD Prompt Reader will traverse all flowcharts and branches and display the longest branch with complete input and output.
4. [ComfyUI SDXL workflow](https://github.com/receyuki/stable-diffusion-prompt-reader#comfyui-sdxl-workflow)
3. [ComfyUI SDXL workflow](https://github.com/receyuki/stable-diffusion-prompt-reader#comfyui-sdxl-workflow)
### Easy Diffusion
By default, Easy Diffusion does not write metadata to images. Please change the _Metadata format_ in settings to _embed_ to write the metadata to images
### Fooocus-MRE
Expand All @@ -250,14 +274,16 @@ SD Prompt Reader only supports images generated by [Fooocus MoonRide Edition](ht
## FAQ
### Malware Alert
The false positive reported by some anti-malwares is caused by the packaging tool _pyinstaller_ which is a common issue for _pyinstaller_ users.
I spent a lot of time trying to fix the Windows Defender false positive before, but I couldn't do it for every antivirus software.
So, you can either trust Windows Defender or use the instruction for Linux users to use this app.
> [!WARNING]
> The false positive reported by some anti-malwares is caused by the packaging tool _pyinstaller_ which is a common issue for _pyinstaller_ users.
> I spent a lot of time trying to fix the Windows Defender false positive before, but I couldn't do it for every antivirus software.
> So, you can either trust Windows Defender or use the instruction for Linux users to use this app.
### "SD Prompt Reader.app" is damaged and can't be opened. You should move it to the Trash
This is a very common macOS issue when you run unsigned non-appstore apps,
and developers must pay $99 per year to Apple to eliminate this issue.
You can choose to **Allow Apps from Anywhere** in **security & privacy** settings which can be dangerous.
The way I prefer is to remove the quarantine attributes.
> [!IMPORTANT]
> This is a very common macOS issue when you run unsigned non-appstore apps,
> and developers must pay $99 per year to Apple to eliminate this issue.
> You can choose to **Allow Apps from Anywhere** in **security & privacy** settings which can be dangerous.
> The way I prefer is to remove the quarantine attributes.
1. Open Terminal from the Applications folder.
2. Type in the following command and hit Enter.

Expand All @@ -278,3 +304,4 @@ If you are still concerned about the security of the app you can use the instruc
- Inspired by [Stable Diffusion web UI](https://github.com/AUTOMATIC1111/stable-diffusion-webui/)
- App icon generated using Stable Diffusion with [IconsMI](https://huggingface.co/jvkape/IconsMI-AppIconsModelforSD)
- Special thanks to [Azusachan](https://github.com/Azusachan) for providing SD server
- The NovelAI stealth pnginfo parser is based on [the official metadata extraction script of NovelAI](https://github.com/NovelAI/novelai-image-metadata)

0 comments on commit bb10edc

Please sign in to comment.