GithubHelp home page GithubHelp logo

inkbunny-extension's Introduction


Inkbunny Extensions

Inkbunny API api reference api github Go Report Card
Inkbunny ML contributors Commit Activity GitHub Repo stars


Disclaimer: This project is not affiliated or endorsed by Inkbunny.

Go Gopher climbing a ladder.

This project is a collection of userscripts and tools to enhance the Inkbunny experience. It includes a browser extension to detect AI-generated images and a live BBCode preview for Inkbunny.

Inkbunny AI Bridge is designed to detect AI-generated images made with stable diffusion in Inkbunny submissions. It processes files and descriptions and uses heuristics to determine if the submission follows the guidelines.

By using crafted heuristics, as well as the potential to use an LLM to inference the parameters. A general purpose API library is available to integrate with your own program logic.

Table of Contents

  1. Live BBCode Preview
  2. Inkbunny AI Bridge
  3. Installation Instructions

Live BBCode Preview

You can quickly preview the BBCode while writing comments, editing a submission description, creating a journal entry, or writing a ticket. The script is available as Inkbunny Live BBCode Preview.user.js.

Live BBCode Preview

Inkbunny AI Bridge

The Inkbunny AI Bridge extends the functionality of your browser through a userscript that creates a ticket ready for your review. Based on advanced heuristics, the script prepares everything you need to ensure the content meets Inkbunny's standards.

It displays a badge on each submission to quickly notify you of any potential flagged submission worth verifying.

Inkbunny AI Bridge

It constructs a prepared ticket based on the heuristics for you to audit and modify to then submit to Inkbunny.

Ticket

Full api server

Additionally, there's a full api server that provides additional tools.

A demo app is available either at https://inkbunny.keiau.space or in retool. Inkbunny Ticket Auditor

Installation Instructions

Make sure you have api turned on in your Inkbunny account settings. You will need your API key and SID to use the Inkbunny API. You can change this in your account settings

There are two parts to the Inkbunny AI Bridge, the server and the userscript.

You will need to install a userscript manager extension in your web browser. You can use tampermonkey, greasemonkey or any similar userscript extension.

Userscript

After installing a userscript manager, you can install the Inkbunny AI Bridge userscript.

  1. The current version of the userscript is available in scripts.
  2. Click on the "Raw" button, your userscript manager will recognize this as a userscript and ask for confirmation to install it.
  3. Alternatively you can either download or copy the content of the userscript and paste it in your userscript manager.

A simpler userscript is available if you do need the other features and only want the labelling, blurring or removal of AI generated images.

Todo:

  • Fix blurring and removal of AI generated images (the old script does this but the new one is currently broken)
  • Allow editing of the prepared ticket
  • Highlight more relevant metadata and print generation objects (e.g. model, prompt, etc). Currently you can view this in the console debug.
  • Better styling

Configuring the Userscript

After installing the userscript, you need to configure it to match your server URL. If you're running the server locally, the default URL is http://localhost:1323.

menu

  1. Click on the Tampermonkey icon in your browser to open the menu.
  2. Find the Inkbunny AI Bridge and Set API URL if you're using a different server.
  3. In the same menu, you can login using the User menu (login) button
  4. You can choose between three different options for AI thumbnails:
    • Label - This will add a label to the submission.
    • Blur - This will blur the submission.
    • Remove - This will remove the submission.

Now, the Inkbunny AI Bridge should be ready to use.

Server

Set the environment variables for the server to run. You can set the following environment variables:

export PORT "your_port" # default is 1323
export API_HOST "your_api_host"
export SD_HOST "your_sd_host" # default is "http://localhost:7860"
export REDIS_HOST "your_redis_host" # default is "localhost:6379", when not set, uses local memory cache
export REDIS_PASSWORD "your_redis_password"
export REDIS_USER "your_redis_user" # when not set, uses 'default'

./inkbunny-ai-bridge

An optional Redis server can be used for caching. If not set, it will fall back to local memory cache. You can always override this behavior for most request by setting the Cache-Control header to no-cache.

Building from Source

If you're building from source, you will need to install the dependencies: Download Go 1.22.3 or later from the official website.

git clone https://github.com/ellypaws/inkbunny-extension.git
cd inkbunny-extension

go build -o inkbunny-ai-bridge
./inkbunny-ai-bridge

You can also use the pre-built binaries from the releases page.

inkbunny-extension's People

Contributors

ellypaws avatar

Stargazers

Xientra avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.