Skip to content

eemeetu/MidJourney-Wrapper

 
 

Repository files navigation

WARNING

DUE TO LACK OF TIME AND MULTIPLE API'S UPDATES, THIS REPOSITORY IS NOT UP TO DATE, AND MAY BE DEPRICATED. I MAY CONSIDER COMING BACK TO THIS PROJECT LATER...

MidJourney-Wrapper

Presentation

The point of this bot is using MidJouney from an account other than the account you paid from. To do so, there should be a Discord bot, which we will call DaVinci (see Globals), and the account subscribed to MidJourney, which we will call Salai, in the same server. Any discord user in the server can use DaVinci commands to generate images, their variations, upscale them...
Warning though; you aren't allowed to use this software in the purpose of sharing your subscription with other people; this software is intended to be used only for learning purposes. If you infringe the rules, please know that you are solely responsible.

Installation

  • Clone the project.
  • Install requirements (only pycord version 2) and discord python api module if needed.
  • Fill Globals.py with your data
  • Run main.py;

Implemented commands documentation

MT stands for mandatory OPT stands for optional

Generating idea

/mj_imagine [ MT : prompt (string)]

ezgif-3-c4476f9a09

Targetting image

Reply to MidJourney Bot message by the following command to target that piece of art for the next operation:

$mj_target

Notice that slash command is not used here because of discord not allowing Interactions during reply. Hence, there is no autocomplete, your reply is simply parsed to get the command.

ezgif-3-c4476f9a09

Upscaling and variations

/mj_upscale [ MT : index (integer) ] [ OPT : reset_target (boolean) ]

index parameter takes values from 1 to 4; 1 is the index of top left image and 4 is the index of buttom right one. The optional parameter reset_target indicates if target you have set before should be reset at the end of current operation; if that's done and you want to upscale image from same message with different index you should use $mj_target command again.

ezgif-3-c4476f9a09

Generated image:

image

Notice that we cannot use /mj_upscale_to_max on this output since we used --hd parameter which makes a sigle upscale maximized.
This last command does not require a parameter and it resets target since no other operation is possible on this output other than upscaling to max. But remember that you need again to target what you need to upscale for the second time.

There is another command that uses the output of /mj_imagine:

/mj_upscale_to_max [ MT : index (integer) ] [ OPT : reset_target (boolean) ]

It behaves the same way as upscaling command.

Additional information

Even though a request error is caught by the bot (a problem with MidJourney bot, a problem with the subscripted account...) since it shows up as HTTP request error, it does not caught errors done by the user; for example if there was a typo using MidJourney parameters like -hd instead of --hd MidJourney reports it to the subscripted user but DaVinci does not complain about it, so pay attention to your inputs. Also read the official user documentation of MidJourney.

Enjoy!

About

MidJourney wrapper in Discord.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.4%
  • Dockerfile 0.6%