Giter Club home page Giter Club logo

midjourneyapi's Introduction

MiDjourneyAPI

This is API for automatic run midjourney image generation in discord

preparation

  1. Sign up discord , invite midjourney bot to your channel and subscribe.
  2. Open F12 developer tools of browser, send a prompt. You can find all required params in developer tools --> network --> interactions --> pyload. Put your params in sender_params.json.

Running

# send prompts to discord
python sender.py --params path/to/sender_params.json --from_file path/to/prompts.json --task-name demo

# download images from discord
# open another shell
python receiver.py --params path/to/sender_params.json --task-name demo

# make sure running render and receiver together and use the same param.json and task-name

change sending time interval according to MidJourney Server busyness, the default is set to 45.0s for relax mode.

# for fast mode we recommend
python sender.py --params path/to/sender_params.json --from_file path/to/prompts.json --task-name demo --wait-time 4.5

Tips

  1. Each IP can only run one MidJourney at the same time
  2. In relax mode, the approximated speed is 60 images/hour, 600 images/hour for fast mode.
  3. Because discord api can only go back to the latest 100 history of channel, earlier history won't be downloaded by receiver. Please make sure receiver and sender run at the same pace.
  4. If you didn't download in time and the image can't be traced back by receiver, invite "Channel Attachments Downloader" bot to your channel. It can trace back about 1000~1500 attachments in channel history. You can also develope a crawler for Midjourney gallery, where all your generated images are stored online.

To Do

  1. Try use pydiscord for more functions.
  2. Midjourney gallery crawler

midjourneyapi's People

Contributors

jaeger416 avatar

Watchers

 avatar

Forkers

bonesun

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.