ChatGPT-MidJourney-prompt

awekrxMIT更新放缓

输入一句提示词,由 ChatGPT 自动补全成适合 MidJourney 的完整绘画提示,帮你省去反复琢磨措辞、激发更多创意灵感。

This is a ChatGPT based prompt generation model for MidJorney. 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.

2.0.3发布于 2023-03-24 18:40 UTC345star52fork同步于 2026-11-07 07:30 UTC

怎么上手

由 README 提炼,执行前请确认
pip install chatGPTMidJourneyPrompt
硬件要求按 README 说明

README 未说明;调用的是 ChatGPT 或 MiniMax 的云端 API,本地只需能跑 Python 并联网

支持 Apple Silicon
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

输入一句提示词,自动扩写成 MidJourney 可用的完整 prompt,省去手写参数

输入一句提示词,由 ChatGPT 自动补全成适合 MidJourney 的完整绘画提示,帮你省去反复琢磨措辞、激发更多创意灵感。

核心能力

  • 按 V5、V4、niji、testp 四种模型分别生成对应格式的 prompt
  • 支持 model、type、renderer、content、aspect_ratio、color、url 等结构化配置
  • 支持邮箱密码、session_token、api_key 三种 ChatGPT 授权方式
  • 可切换 MiniMax 作为后端,走 OpenAI 兼容接口,无需额外 SDK
  • 通过 words 参数控制生成词数,用权重语法给关键词加权

容易踩的坑

需要自备 ChatGPT 账号凭据或 API key,否则无法生成;MiniMax 后端需先设置 MINIMAX_API_KEY 环境变量;各模型支持的配置项不同,例如 testp 不支持 model、type、color,传了也不会生效

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

3 个版本2.0.3
  1. 2.0.3ChatGPT-MidJourney-prompt v2.0.3最新正式版2023-03-24 · 2023-03-24 18:40 UTC
    • PyPi package is created
    • Add API key authentication
    • Rewrite the code structure to make it easier to add new features
  2. 1.1 ChatGPT-MidJourney-prompt v1.12023-03-11 · 2023-03-11 20:12 UTC
    查看更新说明
    • Added use as a discord bot
  3. 1.0ChatGPT-MidJourney-prompt v1.02023-03-08 · 2023-03-08 10:44 UTC

    这个版本没有写更新说明。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    ChatGPT-MidJourney-prompt

    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.

    What's new

    24.03.2023

    Create PyPi project. Update file structure, add api key authentication to ChatGPT. CLI-app and discord-bot will be available within a few days.

    Installation

    pip install chatGPTMidJourneyPrompt
    

    Usage

       from chatGPTMidJourneyPrompt.mjPrompt import PromptGenerator
    
       # supported authorization methods: via email and password, via token, via api key
       config = {
          "email": "your_email",
          "password": "your_password",
          # or
          "session_token": "your_session_token",
          # or
          "api_key": "your_api_key",
       }
    
       promptGenerator = PromptGenerator(config)
    
       prompt = promptGenerator.V5("any text")
       prompt = promptGenerator.V4("any text")
       prompt = promptGenerator.niji("any text")
       prompt = promptGenerator.testp("any text")
    
       # or advanced usage if needed
       promptConfig = {
        "model": "artistic",
        "type": "anime",
        "renderer": "ray tracing",
        "content": "character",
        "aspect_ratio": "1:5",
        "color": "red",
        "url": "example image url",
    }
    
       prompt = promptGenerator.V5("any text", config=promptConfig, words=50)
    

    MiniMax Provider

    You can use MiniMax 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.

    Set your API key via the environment variable or pass it in the config:

    export MINIMAX_API_KEY="your_minimax_api_key"
    
    from chatGPTMidJourneyPrompt.mjPrompt import PromptGenerator
    
    # Minimal config — reads MINIMAX_API_KEY from the environment
    config = {"provider": "minimax"}
    promptGenerator = PromptGenerator(config)
    
    prompt = promptGenerator.V5("cyberpunk cityscape at night")
    print(prompt)
    # => cyberpunk city::5, neon lights::4, rain::3 --v 5 --s 1000 --q 2
    
    # Full config with explicit key, model, and temperature
    config = {
        "provider": "minimax",
        "minimax_api_key": "your_minimax_api_key",
        "minimax_model": "MiniMax-M2.7",   # or MiniMax-M2.7-highspeed, MiniMax-M2.5, MiniMax-M2.5-highspeed
        "temperature": 0.7,                 # clamped to (0.0, 1.0]
    }
    promptGenerator = PromptGenerator(config)
    prompt = promptGenerator.niji("samurai in the rain", config={"model": "artistic"})
    

    Available MiniMax models:

    ModelContextSpeed
    MiniMax-M2.7 (default)204KStandard
    MiniMax-M2.7-highspeed204KFast
    MiniMax-M2.5204KStandard
    MiniMax-M2.5-highspeed204KFast

    More about config

    All config properties

    modeltyperenderercontentaspect_ratiocolorurl
    weights, artisticanime, photorealistic, avatar, couple avataroctane, unreal engine, ray tracing, mixedcharacter, landscape, object, light, particlesdepends on the modelanyany

    Aspect ratios

    V5V4nijitestp
    any1:1, 1:2, 2:1, 2:3, 3:2, 4:5, 5:4, 4:7, 7:4, 16:9, 9:161:2, 2:12:3, 3:2

    Model properties support

    propertyV5V4nijitestp
    model+++-
    type++--
    renderer+++-
    content+++-
    aspect_ratio++++
    color+++-
    url++++

    Results

    See more examples in my gallery

    Short-weights model

    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

    prompt: Stars::5, galaxy::4, space::5, , , , --v 4 --ar 3:2 --s 1000 --q 5 --ar 1:2

    Artistic model

    prompt: Elven assassin with a masked face and intricate runes. Highly detailed photorealism showcases the intricate details of the mask and runic markings. Focused on the assassin's face, with a blurred background. The lighting is a blend of candlelight and twilight, adding a sense of mystery to the character. The style is a mix of ancient and fantasy. Resolution: --ar 16:9 --s 1000 --q 2 --upbeta --v 4

    prompt: An elven warrior girl wielding a sword, dressed in armor made of intricate metals and fabrics. She stands against a futuristic background with high-tech elements, rendered with the latest technologies. Focused, blurred background, full-body::5 soft light::1 high quality photo::1 --v 4 --ar 3:2 --s 1000 --q 5

    Niji

    prompt: Stray dog::3, samurai::5, katana::5, dirt road::3, countryside::3, --niji --q 2

    License

    This project is licensed under the MIT License.

    Acknowledgments

    Thanks a lot to the development of AI and separately to ChatGPT for generating the Readme. And also acheong08 for creating ChatGPT.

    Future

    More advanced options for generating prompts