docker-prompt-generator  by soulteary

Docker image for prompt generation

created 2 years ago
1,171 stars

Top 33.9% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project provides a Dockerized tool for generating prompts for AI image generation models like MidJourney and Stable Diffusion. It targets users who want to leverage AI to create better prompts, supporting both direct Chinese input and image-to-prompt translation, ultimately aiming to simplify and enhance the AI art creation workflow.

How It Works

The tool utilizes a pipeline of pre-trained models: a text-to-image prompt generator (succinctly/text2image-prompt-generator), a Chinese-to-English translator (Helsinki-NLP/opus-mt-zh-en), and a CLIP model (laion/CLIP-ViT-H-14-laion2B-s32B-b79K). Users can input prompts in Chinese, which are then translated and processed by the prompt generator to produce optimized prompts for image models. It also supports parsing prompts from existing images.

Quick Start & Requirements

  • Install: Clone the repository and build Docker images using provided Dockerfile.base, Dockerfile.cpu, and Dockerfile.gpu.
  • Run: Execute docker run commands for CPU or GPU variants, mapping port 7860.
  • Prerequisites: Docker, NVIDIA Container Toolkit (for GPU support). CPU-only usage is also supported.
  • Links: GitHub Repository

Highlighted Details

  • Supports direct Chinese prompt input and translation.
  • Capable of parsing prompts from images.
  • Offers both CPU and GPU Docker images for flexibility.
  • Leverages established models for prompt generation and translation.

Maintenance & Community

The project is maintained by soulteary. No specific community channels or roadmap are detailed in the README.

Licensing & Compatibility

The README does not explicitly state a license. The project uses models from Hugging Face, which have their own licenses (e.g., MIT for Helsinki-NLP, potentially others for the prompt and CLIP models). Compatibility for commercial use would depend on the licenses of the underlying models.

Limitations & Caveats

The project relies on external models whose performance and availability are not guaranteed. The README does not detail specific performance benchmarks or known limitations of the prompt generation itself.

Health Check
Last commit

2 years ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
3 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.