Downloads · 30 days
52
2% of all-time downloads
RichardErkhov/alibaba-pai_-_pai-bloom-1b1-text2prompt-sd-gguf
alibaba-pai_-_pai-bloom-1b1-text2prompt-sd-gguf is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
52
2% of all-time downloads
All-time downloads
2.5K
Public
Repo size
16 GB
Likes
0
Public
Click a slice to open those files.
.gguf18.9 GB · 100%
From the Hugging Face model README
Quantization made by Richard Erkhov.
pai-bloom-1b1-text2prompt-sd - GGUF
| Name | Quant method | Size |
|---|---|---|
| pai-bloom-1b1-text2prompt-sd.Q2_K.gguf | Q2_K | 0.66GB |
| pai-bloom-1b1-text2prompt-sd.Q3_K_S.gguf | Q3_K_S | 0.73GB |
| pai-bloom-1b1-text2prompt-sd.Q3_K.gguf | Q3_K | 0.79GB |
| pai-bloom-1b1-text2prompt-sd.Q3_K_M.gguf | Q3_K_M | 0.79GB |
| pai-bloom-1b1-text2prompt-sd.Q3_K_L.gguf | Q3_K_L | 0.82GB |
| pai-bloom-1b1-text2prompt-sd.IQ4_XS.gguf | IQ4_XS | 0.84GB |
| pai-bloom-1b1-text2prompt-sd.Q4_0.gguf | Q4_0 | 0.87GB |
| pai-bloom-1b1-text2prompt-sd.IQ4_NL.gguf | IQ4_NL | 0.87GB |
| pai-bloom-1b1-text2prompt-sd.Q4_K_S.gguf | Q4_K_S | 0.87GB |
| pai-bloom-1b1-text2prompt-sd.Q4_K.gguf | Q4_K | 0.91GB |
| pai-bloom-1b1-text2prompt-sd.Q4_K_M.gguf | Q4_K_M | 0.91GB |
| pai-bloom-1b1-text2prompt-sd.Q4_1.gguf | Q4_1 | 0.93GB |
| pai-bloom-1b1-text2prompt-sd.Q5_0.gguf | Q5_0 | 0.99GB |
| pai-bloom-1b1-text2prompt-sd.Q5_K_S.gguf | Q5_K_S | 0.99GB |
| pai-bloom-1b1-text2prompt-sd.Q5_K.gguf | Q5_K | 1.02GB |
| pai-bloom-1b1-text2prompt-sd.Q5_K_M.gguf | Q5_K_M | 1.02GB |
| pai-bloom-1b1-text2prompt-sd.Q5_1.gguf | Q5_1 | 1.05GB |
| pai-bloom-1b1-text2prompt-sd.Q6_K.gguf | Q6_K | 1.12GB |
| pai-bloom-1b1-text2prompt-sd.Q8_0.gguf | Q8_0 | 1.45GB |
license: apache-2.0 widget:
我们开源了一个自动Prompt生成模型,您可以直接输入一个极其简单的Prompt,就可以得到经过语言模型优化过的Prompt,帮助您更简单地生成高颜值图像。
We release an automatic Prompt generation model, you can directly enter an extremely simple Prompt and get a Prompt optimized by the language model to help you generate more beautiful images simply.
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained('alibaba-pai/pai-bloom-1b1-text2prompt-sd')
model = AutoModelForCausalLM.from_pretrained('alibaba-pai/pai-bloom-1b1-text2prompt-sd').eval().cuda()
raw_prompt = '1 girl'
input = f'Instruction: Give a simple description of the image to generate a drawing prompt.\nInput: {raw_prompt}\nOutput:'
input_ids = tokenizer.encode(input, return_tensors='pt').cuda()
outputs = model.generate(
input_ids,
max_length=384,
do_sample=True,
temperature=1.0,
top_k=50,
top_p=0.95,
repetition_penalty=1.2,
num_return_sequences=5)
prompts = tokenizer.batch_decode(outputs[:, input_ids.size(1):], skip_special_tokens=True)
prompts = [p.strip() for p in prompts]
print(prompts)
| Original | BeautifulPrompt |
|---|---|
| prompt: taylor swift, country, golden, fearless,wavehair | prompt: portrait of taylor swift as a beautiful woman, long hair, country, golden ratio, intricate, symmetrical, cinematic lighting, highly detailed, digital painting, artstation, concept art, smooth, sharp focus, illustration |
![]() | ![]() |
| Original | BeautifulPrompt |
|---|---|
| prompt: A majestic sailing ship | prompt: a massive sailing ship, epic, cinematic, artstation, greg rutkowski, james gurney, sparth |
![]() | ![]() |
使用上述模型需遵守AIGC模型开源特别条款。
If you want to use this model, please read this document carefully and abide by the terms.
If you find the model useful, please consider cite the paper:
@inproceedings{emnlp2023a,
author = {Tingfeng Cao and
Chengyu Wang and
Bingyan Liu and
Ziheng Wu and
Jinhui Zhu and
Jun Huang},
title = {BeautifulPrompt: Towards Automatic Prompt Engineering for Text-to-Image Synthesis},
booktitle = {Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing: Industry Track},
pages = {1--11},
year = {2023}
}