Instructions to use treadon/prompt-fungineer-355M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use treadon/prompt-fungineer-355M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="treadon/prompt-fungineer-355M")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("treadon/prompt-fungineer-355M") model = AutoModelForCausalLM.from_pretrained("treadon/prompt-fungineer-355M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use treadon/prompt-fungineer-355M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "treadon/prompt-fungineer-355M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "treadon/prompt-fungineer-355M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/treadon/prompt-fungineer-355M
- SGLang
How to use treadon/prompt-fungineer-355M with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "treadon/prompt-fungineer-355M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "treadon/prompt-fungineer-355M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "treadon/prompt-fungineer-355M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "treadon/prompt-fungineer-355M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use treadon/prompt-fungineer-355M with Docker Model Runner:
docker model run hf.co/treadon/prompt-fungineer-355M
Prompt Fungineer 355M
Follow @treadon on X and treadon on Hugging Face for more AI experiments, evals, and projects.
A GPT-2 based model (355M parameters) fine-tuned to expand short image prompts into detailed, creative prompts for AI image generators like Midjourney, DALL-E, Stable Diffusion, and others.
What It Does
Give it a simple prompt like "a cat on a mountain" and it generates detailed, production-ready prompts with lighting, composition, camera settings, and artistic style suggestions.
Input:
a sunset over the ocean
Output:
A breathtaking sunset over a calm ocean, golden hour lighting casting
warm amber reflections across gentle waves, wispy cirrus clouds painted
in shades of coral and violet, shot with a Canon EOS R5, 24-70mm f/2.8
lens, long exposure capturing silky smooth water, dramatic sky gradient
from deep blue to fiery orange, cinematic composition with rule of thirds
How It Works
The model was fine-tuned on a curated dataset of high-quality image prompts (treadon/image_prompts). It learned the structure and vocabulary that image generation models respond to best.
The input format uses structured tags:
BRF:β Brief/base prompt (your input)POS:β Positive prompt (detailed expansion)ENH:β Enhancers (camera settings, lighting, technical details)INS:β Inspiration (photographer/artist references)NEG:β Negative prompt (what to avoid)
Usage
With the Demo
Try it directly: Prompt Fungineer Space
With Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("treadon/prompt-fungineer-355M")
tokenizer = AutoTokenizer.from_pretrained("gpt2")
prompt = "BRF: a castle in the clouds POS:"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_length=256,
do_sample=True,
top_k=100,
top_p=0.95,
temperature=0.85,
num_return_sequences=4,
pad_token_id=tokenizer.eos_token_id,
)
for output in outputs:
print(tokenizer.decode(output, skip_special_tokens=True))
Model Details
| Attribute | Value |
|---|---|
| Base model | GPT-2 Medium (355M) |
| Fine-tuning | Causal language modeling on image prompt dataset |
| Tokenizer | GPT-2 tokenizer |
| Max length | 256 tokens |
| Language | English |
| License | MIT |
Recommended Settings
| Parameter | Value | Notes |
|---|---|---|
| Temperature | 0.85 | Higher = more creative |
| Top K | 100 | |
| Top P | 0.95 | |
| Max length | 256 |
Options
- Enhancers: Adds camera/lens/lighting metadata (recommended ON)
- Wild Imagination: Lets the model go beyond the base prompt
- Inspiration: Adds photographer references (experimental)
- Negative Prompt: Generates a negative prompt for Stable Diffusion
Limitations
- 355M parameters β produces good but sometimes generic results
- Trained on English prompts only
- Occasionally generates nonsensical photographer names in "Inspiration" mode
- Best for photographic/realistic styles; less effective for abstract art prompts
Links
- Demo: HuggingFace Space
- Training Data: treadon/image_prompts
- Blog Post: Image Prompt Generator
Author
Built by Ritesh Khanna (@treadon)
More from me
For other projects and writeups, see riteshkhanna.com, follow @treadon on X, or treadon on Hugging Face.
- Downloads last month
- 36