Text Generation
Transformers
Safetensors
gpt2
text-generation-inference
8-bit precision
bitsandbytes
Run this model with HF Jobs
Run RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits") model = AutoModelForCausalLM.from_pretrained("RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits
- SGLang
How to use RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits 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 "RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits" \ --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": "RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits", "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 "RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits" \ --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": "RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits with Docker Model Runner:
docker model run hf.co/RichardErkhov/Gustavosta_-_MagicPrompt-Stable-Diffusion-8bits
uploaded readme
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748Quantization made by Richard Erkhov.
[Github](https://github.com/RichardErkhov)
[Discord](https://discord.gg/pvy7H8DZMG)
[Request more models](https://github.com/RichardErkhov/quant_request)
MagicPrompt-Stable-Diffusion - bnb 8bits- Model creator: https://huggingface.co/Gustavosta/- Original model: https://huggingface.co/Gustavosta/MagicPrompt-Stable-Diffusion/
Original model description:---license: mit---
# MagicPrompt - Stable Diffusion
This is a model from the MagicPrompt series of models, which are [GPT-2](https://huggingface.co/gpt2) models intended to generate prompt texts for imaging AIs, in this case: [Stable Diffusion](https://huggingface.co/CompVis/stable-diffusion).
## 🖼️ Here's an example:
<img src="https://files.catbox.moe/ac3jq7.png">
This model was trained with 150,000 steps and a set of about 80,000 data filtered and extracted from the image finder for Stable Diffusion: "[Lexica.art](https://lexica.art/)". It was a little difficult to extract the data, since the search engine still doesn't have a public API without being protected by cloudflare, but if you want to take a look at the original dataset, you can have a look here: [datasets/Gustavosta/Stable-Diffusion-Prompts](https://huggingface.co/datasets/Gustavosta/Stable-Diffusion-Prompts).
If you want to test the model with a demo, you can go to: "[spaces/Gustavosta/MagicPrompt-Stable-Diffusion](https://huggingface.co/spaces/Gustavosta/MagicPrompt-Stable-Diffusion)".
## 💻 You can see other MagicPrompt models:
- For Dall-E 2: [Gustavosta/MagicPrompt-Dalle](https://huggingface.co/Gustavosta/MagicPrompt-Dalle)- For Midjourney: [Gustavosta/MagicPrompt-Midourney](https://huggingface.co/Gustavosta/MagicPrompt-Midjourney) **[⚠️ In progress]**- MagicPrompt full: [Gustavosta/MagicPrompt](https://huggingface.co/Gustavosta/MagicPrompt) **[⚠️ In progress]**
## ⚖️ Licence:
[MIT](https://huggingface.co/models?license=license:mit)
When using this model, please credit: [Gustavosta](https://huggingface.co/Gustavosta)
**Thanks for reading this far! :)**
README.mdAdded+48