Instructions to use trollek/ImagePromptHelper-danube3-500M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use trollek/ImagePromptHelper-danube3-500M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="trollek/ImagePromptHelper-danube3-500M") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("trollek/ImagePromptHelper-danube3-500M") model = AutoModelForCausalLM.from_pretrained("trollek/ImagePromptHelper-danube3-500M") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use trollek/ImagePromptHelper-danube3-500M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "trollek/ImagePromptHelper-danube3-500M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trollek/ImagePromptHelper-danube3-500M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/trollek/ImagePromptHelper-danube3-500M
- SGLang
How to use trollek/ImagePromptHelper-danube3-500M 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 "trollek/ImagePromptHelper-danube3-500M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trollek/ImagePromptHelper-danube3-500M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "trollek/ImagePromptHelper-danube3-500M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "trollek/ImagePromptHelper-danube3-500M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use trollek/ImagePromptHelper-danube3-500M with Docker Model Runner:
docker model run hf.co/trollek/ImagePromptHelper-danube3-500M
Another image prompt helper
It can be used like my first image prompt helper, OR you can use one of the following prefixes to your prompt:
- Detailed:
- Very detailed:
- Danbooru:
- Mixed:
Thanks to MiaoshouAI for their Florence-2-large-PromptGen-v1.5 model, with which I created the SFT dataset this model was trained with.
Quants
Huggingface:
Ollama:
ollama pull trollek/imageprompthelper-danube3-500m
Examples
Prompt: a snake inside a boot in an art museum
Response: A vibrant and intricately decorated art exhibit features a large, slender python nestled inside a wooden box. The snake's body is adorned with colorful flowers and vines, and its eyes are closed as it gazes intently at the world below. The room is filled with antique art and antique furniture, creating a surreal and captivating scene.
Prompt: Danbooru: a snake inside a boot in an art museum
Response: solo, open mouth, no humans, 1girl, animal, plant, humanoid, animal focus, leather, green eyes, leather jacket, plant on ground, leather footwear, art museum
Prompt: Detailed: a snake inside a boot in an art museum
Response: a snake inside a black leather boots, placed inside the center of a dimly lit room, on the left side of the frame, the snake is positioned in front of a large window, allowing natural light to filter through and illuminate the scene, the background features a circular mirror, reflecting a snake-like creature that appears to be close to the camera, the leather boots are worn by an anthropomorphic creature with a slim body, wearing a black tunic underneath, the overall atmosphere is one of mystery and intrigue, inviting the viewer to step into the scene
Prompt: Mixed: a snake inside a boot in an art museum
Response: a photograph of a snake inside a wooden boot in an art museum, the snake is positioned in the center of the image, facing the viewer, its body is intricately detailed, with a smooth, textured surface that appears to be made of wood, and its head is adorned with small, delicate, curved scales that resemble scales, giving it a realistic, almost human-like appearance, the background features a grand, dimly lit room with large windows, allowing natural light to flood in, casting a soft glow on the room, the windows are framed with glass, allowing the viewer to see the snake inside the boot, the museum's walls are made of stone, with intricate carvings and ornate designs, adding to the historical context, the overall mood of one of awe and wonder, with the snake as the focal point, the photograph captures the essence of a museum's museum, emphasizing the intricate details and the natural beauty of the setting, the photograph captures the essence of a museum's historical and cultural heritage, making it a captivating and thought-provoking piece of art
(creature), no humans, animal, nature, scenery, wooden floor, museum, snake, wooden door, museum
- Downloads last month
- 9