Instructions to use mrkrak3n/Qwen2.5-3B-Instruct-Flux with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mrkrak3n/Qwen2.5-3B-Instruct-Flux with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mrkrak3n/Qwen2.5-3B-Instruct-Flux") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mrkrak3n/Qwen2.5-3B-Instruct-Flux") model = AutoModelForCausalLM.from_pretrained("mrkrak3n/Qwen2.5-3B-Instruct-Flux") 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 mrkrak3n/Qwen2.5-3B-Instruct-Flux with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mrkrak3n/Qwen2.5-3B-Instruct-Flux" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mrkrak3n/Qwen2.5-3B-Instruct-Flux", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mrkrak3n/Qwen2.5-3B-Instruct-Flux
- SGLang
How to use mrkrak3n/Qwen2.5-3B-Instruct-Flux 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 "mrkrak3n/Qwen2.5-3B-Instruct-Flux" \ --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": "mrkrak3n/Qwen2.5-3B-Instruct-Flux", "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 "mrkrak3n/Qwen2.5-3B-Instruct-Flux" \ --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": "mrkrak3n/Qwen2.5-3B-Instruct-Flux", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use mrkrak3n/Qwen2.5-3B-Instruct-Flux with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for mrkrak3n/Qwen2.5-3B-Instruct-Flux to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for mrkrak3n/Qwen2.5-3B-Instruct-Flux to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for mrkrak3n/Qwen2.5-3B-Instruct-Flux to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="mrkrak3n/Qwen2.5-3B-Instruct-Flux", max_seq_length=2048, ) - Docker Model Runner
How to use mrkrak3n/Qwen2.5-3B-Instruct-Flux with Docker Model Runner:
docker model run hf.co/mrkrak3n/Qwen2.5-3B-Instruct-Flux
Qwen2.5-3B-Instruct-Flux
Qwen2.5-3B-Instruct-Flux is a finetuned model designed to assist in generating detailed and imaginative prompts specifically for Flux. It has been trained using a combination of the FluxDev ControlNet dataset (16k) and synthetic data to provide high-quality prompt generation tailored for creative purposes.
General Usage
To utilize this model effectively:
Set the System Prompt to:
"Act like a prompt engineer specialized in Flux"Provide a simple or underdeveloped user prompt, and the model will expand upon it, adding depth, complexity, and detail to help create a refined and imaginative output.
Example:
- System Prompt: "Act like a prompt engineer specialized in Flux"
- User Prompt: "photo of Garfield cat, orange cat, eating burger seated in sofa. fat cat. during daytime."
- Assistant Response:
"A whimsical, detailed illustration of Garfield the cat, depicted as an orange feline with a distinctive tabby pattern and prominent belly, seated on a cozy red sofa. He is engrossed in a meal of a juicy hamburger, its bun partially open to reveal the cheese, with a satisfied look on his face. The room is bathed in the soft glow of natural light from a nearby window, casting gentle shadows on the plush sofa and adding to the sense of comfort and coziness. The background is slightly blurred, focusing attention solely on Garfield and his culinary delight."
- System Prompt: "Act like a prompt engineer specialized in Flux"
- User Prompt: "digital art of a man walking down a staircase into hell."
- Assistant Response:
"A digital artwork depicting a solitary figure descending a grand, marble staircase, each step leading deeper into an abyssal void. The man's silhouette is crisp and detailed, his face a mix of determination and fear, as he steps forward with each frame. The staircase twists and turns, its steps narrowing as it descends, leading to a bottomless pit. The background is a deep, inky black, punctuated by wisps of smoke and flickers of red light, suggesting flames or infernal fires. The man's shadow stretches out behind him, elongated and distorted, adding a sense of depth and the surreal nature of his journey. The overall effect is both hauntingly beautiful and deeply unsettling, capturing the essence of a descent into darkness."
Usage with ComfyUI
You can integrate this model into ComfyUI by using the custom nodes available in the repository: ComfyUI-Qwen
- Downloads last month
- 5