Instructions to use hahahafofo/Qwen-1_8B-Stable-Diffusion-Prompt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hahahafofo/Qwen-1_8B-Stable-Diffusion-Prompt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hahahafofo/Qwen-1_8B-Stable-Diffusion-Prompt", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("hahahafofo/Qwen-1_8B-Stable-Diffusion-Prompt", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use hahahafofo/Qwen-1_8B-Stable-Diffusion-Prompt with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hahahafofo/Qwen-1_8B-Stable-Diffusion-Prompt" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hahahafofo/Qwen-1_8B-Stable-Diffusion-Prompt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hahahafofo/Qwen-1_8B-Stable-Diffusion-Prompt
- SGLang
How to use hahahafofo/Qwen-1_8B-Stable-Diffusion-Prompt 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 "hahahafofo/Qwen-1_8B-Stable-Diffusion-Prompt" \ --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": "hahahafofo/Qwen-1_8B-Stable-Diffusion-Prompt", "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 "hahahafofo/Qwen-1_8B-Stable-Diffusion-Prompt" \ --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": "hahahafofo/Qwen-1_8B-Stable-Diffusion-Prompt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hahahafofo/Qwen-1_8B-Stable-Diffusion-Prompt with Docker Model Runner:
docker model run hf.co/hahahafofo/Qwen-1_8B-Stable-Diffusion-Prompt
模型使用在生成稳定扩散(Stable Diffusion)的提示语(prompt)。它主要通过中文生成相应的英文提示语,充分利用Qwen的能力,支持包括古诗词在内的多种形式进行提示语的生成。此模型基于35k 条数据进行特定于任务的微调(SFT)
模型的对应代码已发布于GitHub,您可以通过以下链接访问并使用SDXL-Turbo进行快速测试生成的提示语: https://github.com/zhongpei/Qwen-SDXL-Turbo.git
This model is designed to generate prompts for Stable Diffusion. It primarily translates Chinese into corresponding English prompts, leveraging the capabilities of Qwen, and supports a variety of formats including classical poetry for prompt generation. The model has been fine-tuned specifically for this task (SFT) using a dataset of 35k entries.
The corresponding code for the model is available on GitHub. You can access and use SDXL-Turbo for rapid test generation of prompts through the following link: https://github.com/zhongpei/Qwen-SDXL-Turbo.git
参数表格(Parameters Table):
| 参数 | 值 |
|---|---|
| 数据量(Data) | 35k |
| 训练周期(Epochs) | 1 |
| 学习率(Learning Rate) | 1e-05 |
| 损失值(Loss) | 1.03 |
- Downloads last month
- 25
docker model run hf.co/hahahafofo/Qwen-1_8B-Stable-Diffusion-Prompt