How to use succinctly/text2image-prompt-generator with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="succinctly/text2image-prompt-generator")
# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("succinctly/text2image-prompt-generator") model = AutoModelForCausalLM.from_pretrained("succinctly/text2image-prompt-generator")
How to use succinctly/text2image-prompt-generator with vLLM:
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "succinctly/text2image-prompt-generator" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "succinctly/text2image-prompt-generator", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'
docker model run hf.co/succinctly/text2image-prompt-generator
How to use succinctly/text2image-prompt-generator with SGLang:
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "succinctly/text2image-prompt-generator" \ --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": "succinctly/text2image-prompt-generator", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'
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 "succinctly/text2image-prompt-generator" \ --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": "succinctly/text2image-prompt-generator", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'
How to use succinctly/text2image-prompt-generator with Docker Model Runner:
A highly advance robots
https://huggingface.co/succinctly/text2image-prompt-generator?text=Graceful+and+ethereal%3A+Immortals+in+Chinese+mythology+are+often+depicted+as+graceful+and+ethereal+figures%2C+so+the+pose%2C+movement%2C+and+attire+of+the+figure+in+the+painting+should+reflect+this+ethereal+quality.+You+can+use+curves%2C+details%2C+and+other+techniques+to+capture+the+beauty+of+the+immortals%27+grace+and+lightness.%0D%0A%0D%0A++++Noble+and+mysterious%3A+Immortals+are+often+portrayed+as+possessing+a+noble+and+mysterious+quality%2C+which+can+be+conveyed+through+the+use+of+color%2C+composition%2C+and+other+techniques+in+the+painting.+Soft%2C+muted+tones+and+elegant+compositions+can+help+to+capture+the+sense+of+the+immortals%27+nobility+and+mystery.%0D%0A%0D%0A++++Unique+abilities%3A+Immortals+in+Chinese+mythology+are+often+associated+with+unique+abilities%2C+such+as+magical+powers%2C+martial+arts%2C+or+supernatural+objects.+These+abilities+can+be+depicted+in+the+painting+to+capture+the+immortals%27+otherworldly+qualities.%0D%0A%0D%0A++++Mythical+backgrounds%3A+Immortals+in+Chinese+mythology+are+often+associated+with+specific+backgrounds+or+stories%2C+which+can+be+depicted+in+the+painting.+For+example%2C+you+can+create+a+scene+from+the+world+of+Chinese+mythology%2C+or+portray+a+battle+between+gods+and+demons%2C+to+provide+a+fuller+context+for+the+immortals+in+the+painting.%0D%0A%0D%0A++++Attention+to+detail%3A+Chinese+mythology+is+full+of+intricate+details+and+descriptions%2C+which+can+be+included+in+the+painting+to+capture+the+richness+of+the+world+of+immortals.+You+can+depict+the+immortals%27+attire%2C+tools%2C+and+mythological+creatures%2C+among+other+details%2C+to+add+depth+and+complexity+to+the+painting.%0D%0A%0D%0AWhen+creating+a+painting+of+immortals%2C+you+can+use+different+styles%2C+such+as+ink+painting%2C+traditional+Chinese+painting%2C+or+manga%2C+depending+on+your+personal+style+and+preferences%2C+to+create+a+unique+and+creative+painting.um
· Sign up or log in to comment