Instructions to use AUTOMATIC/promptgen-majinai-unsafe with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AUTOMATIC/promptgen-majinai-unsafe with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AUTOMATIC/promptgen-majinai-unsafe")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AUTOMATIC/promptgen-majinai-unsafe") model = AutoModelForCausalLM.from_pretrained("AUTOMATIC/promptgen-majinai-unsafe", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AUTOMATIC/promptgen-majinai-unsafe with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AUTOMATIC/promptgen-majinai-unsafe" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AUTOMATIC/promptgen-majinai-unsafe", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AUTOMATIC/promptgen-majinai-unsafe
- SGLang
How to use AUTOMATIC/promptgen-majinai-unsafe 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 "AUTOMATIC/promptgen-majinai-unsafe" \ --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": "AUTOMATIC/promptgen-majinai-unsafe", "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 "AUTOMATIC/promptgen-majinai-unsafe" \ --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": "AUTOMATIC/promptgen-majinai-unsafe", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AUTOMATIC/promptgen-majinai-unsafe with Docker Model Runner:
docker model run hf.co/AUTOMATIC/promptgen-majinai-unsafe
Negative prompt in positive
When used with sd-dynamic-prompts, it add negative prompt in the positive
exemple : 1girl,solo, long hair, light blue hair, blue eyes, cat ears, (hair over one eye:1.2), large breasts, shy smile, cute face, piny skin, solo focus, looking away, happy pose, cum from mouth, cum line, nsfw, shiny new hair, orange vaginal, black nipple, black vaginal wad and white slip or panties as they see fit, shiny gold and amber thighhigh socks and pov, shiny sweat spread between legs, wet towel over your head, shiny hair, blush, Negative prompt: multiple penis, poorly drawn 2girl is too cute, male ejaculation, lowres, 3d girl crying, poorly drawn penis
The negative part is typed in the positive prompt ruining the whole thing
Same thing with Majinai-safe
precision : "Don't apply to negative prompts" was checked