Text Generation
Transformers
Safetensors
gpt2
text-generation-inference
8-bit precision
bitsandbytes
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")# 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") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- 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 files
README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Quantization made by Richard Erkhov.
|
| 2 |
+
|
| 3 |
+
[Github](https://github.com/RichardErkhov)
|
| 4 |
+
|
| 5 |
+
[Discord](https://discord.gg/pvy7H8DZMG)
|
| 6 |
+
|
| 7 |
+
[Request more models](https://github.com/RichardErkhov/quant_request)
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
MagicPrompt-Stable-Diffusion - bnb 8bits
|
| 11 |
+
- Model creator: https://huggingface.co/Gustavosta/
|
| 12 |
+
- Original model: https://huggingface.co/Gustavosta/MagicPrompt-Stable-Diffusion/
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
Original model description:
|
| 18 |
+
---
|
| 19 |
+
license: mit
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
# MagicPrompt - Stable Diffusion
|
| 23 |
+
|
| 24 |
+
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).
|
| 25 |
+
|
| 26 |
+
## 🖼️ Here's an example:
|
| 27 |
+
|
| 28 |
+
<img src="https://files.catbox.moe/ac3jq7.png">
|
| 29 |
+
|
| 30 |
+
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).
|
| 31 |
+
|
| 32 |
+
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)".
|
| 33 |
+
|
| 34 |
+
## 💻 You can see other MagicPrompt models:
|
| 35 |
+
|
| 36 |
+
- For Dall-E 2: [Gustavosta/MagicPrompt-Dalle](https://huggingface.co/Gustavosta/MagicPrompt-Dalle)
|
| 37 |
+
- For Midjourney: [Gustavosta/MagicPrompt-Midourney](https://huggingface.co/Gustavosta/MagicPrompt-Midjourney) **[⚠️ In progress]**
|
| 38 |
+
- MagicPrompt full: [Gustavosta/MagicPrompt](https://huggingface.co/Gustavosta/MagicPrompt) **[⚠️ In progress]**
|
| 39 |
+
|
| 40 |
+
## ⚖️ Licence:
|
| 41 |
+
|
| 42 |
+
[MIT](https://huggingface.co/models?license=license:mit)
|
| 43 |
+
|
| 44 |
+
When using this model, please credit: [Gustavosta](https://huggingface.co/Gustavosta)
|
| 45 |
+
|
| 46 |
+
**Thanks for reading this far! :)**
|
| 47 |
+
|
| 48 |
+
|