contains the modified api.py and necessary files for the TRTtensor patch
Go to file
cofob 23a9b8a8e3
Add kid tag
2024-01-06 09:43:54 +07:00
#Original Update for 1.7.0 2023-12-23 15:08:07 +00:00
TRT-Patch Update for 1.7.0 2023-12-23 15:07:33 +00:00
LICENSE Initial commit 2023-11-14 19:41:07 +00:00
Readme.md Add README 2024-01-06 09:38:07 +07:00
api.py Add kid tag 2024-01-06 09:43:54 +07:00

Readme.md

This api.py file has some additional modifications that can be activated within the api.py file.

This file replaces modules/api/api.py .

::: error Don't overwrite your original api.py file. Rename it to something different like api_original.py and then copy the modified api.py into your modules/api folder.

:::

A clean, original api.py file can be found in the #Original API File folder

After replacing the file you will need to restart your A1111 Stable-diffusion to apply the changes.

The modified API.py file can do the following:

  1. Eris Promptlog:
    • Every Prompt that is send from through the API will be saved in a Textfile, with the current date as name, in a folder named "logs"
  2. Eris Imagelog:
    • Every generated Images will be saved in the default "outputs" folder
  3. Eris Consolelog:
    • Every Prompt that is send from through the API will be displayed in the console/terminal window
  4. Eris TRTpatch:
    • Necessary modification for the TRT Plugin to work.
    • Please read the Readme in the TRT-Patch folder for the additional instructions
  5. Eris Imagelimit:
    • Will resize and limit every request down to 1024px max on height and width, keeping the aspect ratio. Also reduces Steps down to 35 if the set Steps exceeds 35
    • Compatible with TRTpatch. Please read the Readme in the TRT-Patch folder for the additional instructions
  6. Eris AntiChildPorn:
    • Will prevent the generation of child porn images.

Enabling the Modifications

To enable any of these modifications open the api.py file with an text editor and go to line 61. Alternatively you can search for # Eris modifier switches to find the correct place.

There you should now see the following:

eris_promtlog = False 
eris_imagelog = False
eris_consolelog = False
eris_TRTpatch = False
eris_imagelimit = False
eris_antichildporn = False

Change the False to True to enable any of the modifications.

For example to enable the Promptlog, Imagelog and AntiChildPorn:

eris_promtlog = True
eris_imagelog = True
eris_consolelog = False
eris_TRTpatch = False
eris_imagelimit = False
eris_antichildporn = True

Don't forget to save the api.py file again and (re)start your A1111 Stable-difussion

::: warn Additional and !!necessary!! Instructions for the TRT-Patch are in the TRT-Patch Folder

:::