$git clone https://github.com/awekrx/ChatGPT-MidJourney-promptThis is a ChatGPT based prompt generation model for MidJourney. The purpose of this model is to simplify the creation of images and increase their creativity. By introducing a partial hint, ChatGPT creates a follow-up that can be used to stimulate creativity and provide new ideas
| 1 | # ChatGPT-MidJourney-prompt |
| 2 | |
| 3 | This is a ChatGPT based prompt generation model for MidJourney. The purpose of this model is to simplify the creation of images and increase their creativity. By introducing a partial hint, ChatGPT creates a follow-up that can be used to stimulate creativity and provide new ideas. |
| 4 | |
| 5 | ## What's new |
| 6 | > |
| 7 | > 24.03.2023 |
| 8 | |
| 9 | Create PyPi project. Update file structure, add api key authentication to ChatGPT. |
| 10 | __CLI-app and discord-bot will be available within a few days.__ |
| 11 | |
| 12 | ## Installation |
| 13 | |
| 14 | ```bash |
| 15 | pip install chatGPTMidJourneyPrompt |
| 16 | ``` |
| 17 | |
| 18 | ## Usage |
| 19 | |
| 20 | ```py |
| 21 | from chatGPTMidJourneyPrompt.mjPrompt import PromptGenerator |
| 22 | |
| 23 | # supported authorization methods: via email and password, via token, via api key |
| 24 | config = { |
| 25 | "email": "your_email", |
| 26 | "password": "your_password", |
| 27 | # or |
| 28 | "session_token": "your_session_token", |
| 29 | # or |
| 30 | "api_key": "your_api_key", |
| 31 | } |
| 32 | |
| 33 | promptGenerator = PromptGenerator(config) |
| 34 | |
| 35 | prompt = promptGenerator.V5("any text") |
| 36 | prompt = promptGenerator.V4("any text") |
| 37 | prompt = promptGenerator.niji("any text") |
| 38 | prompt = promptGenerator.testp("any text") |
| 39 | |
| 40 | # or advanced usage if needed |
| 41 | promptConfig = { |
| 42 | "model": "artistic", |
| 43 | "type": "anime", |
| 44 | "renderer": "ray tracing", |
| 45 | "content": "character", |
| 46 | "aspect_ratio": "1:5", |
| 47 | "color": "red", |
| 48 | "url": "example image url", |
| 49 | } |
| 50 | |
| 51 | prompt = promptGenerator.V5("any text", config=promptConfig, words=50) |
| 52 | ``` |
| 53 | |
| 54 | ## MiniMax Provider |
| 55 | |
| 56 | You can use [MiniMax](https://www.minimax.io/) as an alternative LLM backend. MiniMax's M2.7 model offers a 204K context window and is accessed via an OpenAI-compatible API, so no extra SDK is required. |
| 57 | |
| 58 | Set your API key via the environment variable or pass it in the config: |
| 59 | |
| 60 | ```bash |
| 61 | export MINIMAX_API_KEY="your_minimax_api_key" |
| 62 | ``` |
| 63 | |
| 64 | ```py |
| 65 | from chatGPTMidJourneyPrompt.mjPrompt import PromptGenerator |
| 66 | |
| 67 | # Minimal config — reads MINIMAX_API_KEY from the environment |
| 68 | config = {"provider": "minimax"} |
| 69 | promptGenerator = PromptGenerator(config) |
| 70 | |
| 71 | prompt = promptGenerator.V5("cyberpunk cityscape at night") |
| 72 | print(prompt) |
| 73 | # => cyberpunk city::5, neon lights::4, rain::3 --v 5 --s 1000 --q 2 |
| 74 | |
| 75 | # Full config with explicit key, model, and temperature |
| 76 | config = { |
| 77 | "provider": "minimax", |
| 78 | "minimax_api_key": "your_minimax_api_key", |
| 79 | "minimax_model": "MiniMax-M2.7", # or MiniMax-M2.7-highspeed, MiniMax-M2.5, MiniMax-M2.5-highspeed |
| 80 | "temperature": 0.7, # clamped to (0.0, 1.0] |
| 81 | } |
| 82 | promptGenerator = PromptGenerator(config) |
| 83 | prompt = promptGenerator.niji("samurai in the rain", config={"model": "artistic"}) |
| 84 | ``` |
| 85 | |
| 86 | Available MiniMax models: |
| 87 | |
| 88 | | Model | Context | Speed | |
| 89 | |---|---|---| |
| 90 | | `MiniMax-M2.7` *(default)* | 204K | Standard | |
| 91 | | `MiniMax-M2.7-highspeed` | 204K | Fast | |
| 92 | | `MiniMax-M2.5` | 204K | Standard | |
| 93 | | `MiniMax-M2.5-highspeed` | 204K | Fast | |
| 94 | |
| 95 | ## More about config |
| 96 | |
| 97 | ### All config properties |
| 98 | |
| 99 | |model|type|renderer|content|aspect_ratio|color|url| |
| 100 | |---|---|---|---|---|---|---| |
| 101 | |weights, artistic|anime, photorealistic, avatar, couple avatar|octane, unreal engine, ray tracing, mixed|character, landscape, object, light, particles|depends on the model|any|any| |
| 102 | |
| 103 | ### Aspect ratios |
| 104 | |
| 105 | |V5|V4|niji|testp| |
| 106 | |---|---|---|---| |
| 107 | |any|1:1, 1:2, 2:1, 2:3, 3:2, 4:5, 5:4, 4:7, 7:4, 16:9, 9:16|1:2, 2:1|2:3, 3:2| |
| 108 | |
| 109 | ### Model properties support |
| 110 | |
| 111 | |property|V5|V4|niji|testp| |
| 112 | |---|---|---|---|---| |
| 113 | |model|+|+|+|-| |
| 114 | |type|+|+|-|-| |
| 115 | |renderer|+|+|+|-| |
| 116 | |content|+|+|+|-| |
| 117 | |aspect_ratio|+|+|+|+| |
| 118 | |color|+|+|+|-| |
| 119 | |url|+|+|+|+| |
| 120 | |
| 121 | <details> |
| 122 | |
| 123 | <summary> |
| 124 | |
| 125 | ## Results |
| 126 | |
| 127 | </summary> |
| 128 | |
| 129 | _See more examples in my [gallery](https://github.com/awekrx/MidJourney-Arts)_ |
| 130 | |
| 131 | ### Short-weights model |
| 132 | |
| 133 | > prompt: `Sakura blossoms::5, pink flowers::4, Licorice plant::3, Japanese landscape::5, octane render::4, landscape desing::4, red::10, purple::10, , high quality photo::5, soft light::2, sharp-focus::3, hyper realism::4 --v 4 --s 1000 --q 5 --ar 16:9` |
| 134 | |
| 135 |  |