Edit model card

Chinese Stable Diffusion Prompt Extend Model Card

svjack/prompt-extend-chinese is a Chinese-specific latent text-to-text generator generating style cues given a short Chinese prompt input. This generator may make the Stable Diffusion model perform well with the help of some meaningful style cues.

The above idea is sourced from a project named prompt-extend, it extending stable diffusion English prompts with suitable style cues using text generation. And people can try it on HuggingFace Space.

from transformers import T5Tokenizer, MT5ForConditionalGeneration
model = "svjack/prompt-extend-chinese"
device = "cpu"
tokenizer = T5Tokenizer.from_pretrained(model)
model = MT5ForConditionalGeneration.from_pretrained(model).to(device).eval()
prompt = "护国公克伦威尔"
encode = tokenizer(prompt, return_tensors='pt').to(device)
answer = model.generate(encode.input_ids)[0]
decoded = tokenizer.decode(answer, skip_special_tokens=True)

With the help of this generator, people can give some enhance to the stable diffusion model. Take svjack/Stable-Diffusion-FineTuned-zh-v1 for example. below image is the enhanced version of above.

第一次世界大战 第一次世界大战 第一次世界大战,在艺术站的潮流,8,高度详细,高质量,高分辨率,获 第一次世界大战,在艺术站的潮流,8,高度详细,高质量,高分辨率,获

And below example is pivotal.

护国公克伦威尔 护国公克伦威尔 护国公克伦威尔,的肖像,由,和,制作,在艺术站上趋势 护国公克伦威尔,的肖像,由,和,制作,在艺术站上趋势

Downloads last month
Hosted inference API

Inference API has been turned off for this model.