daspartho/prompt-extend

extending stable diffusion prompts with suitable style cues using text generation

177

stars

25

commits

Jupyter Notebook

primary language

Dec 20, 2022

updated

huggingface.co/spaces/daspartho/prompt-extend
deep-learning
gpt-2
huggingface-spaces
huggingface-transformers
machine-learning
nlp
prompt
stable-diffusion
text-generation
Browse cluster: PyTorch Vision & Multimodal AI

README

Prompt Extend

Generic badge

Text generation model for generating suitable style cues given the main idea for a prompt.

Play with it on HuggingFace Space.

Tokenizer and Model on HuggingFace Hub.

Usage

from transformers import pipeline

text_pipe = pipeline('text-generation', model='daspartho/prompt-extend')

prompt = "peaceful village landscape"
extended_prompt = text_pipe(prompt, num_return_sequences=1)[0]["generated_text"]
print(extended_prompt)
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("daspartho/prompt-extend")

model = AutoModelForCausalLM.from_pretrained("daspartho/prompt-extend")

Code

Examples

Contributing

If you want to contribute code, simply create a pull request. If you have an idea, create an issue and the developers will look into it!

Contributors

daspartho

25 commits

daspartho/prompt-extend

extending stable diffusion prompts with suitable style cues using text generation

177

stars

25

commits

Jupyter Notebook

primary language

Dec 20, 2022

updated

huggingface.co/spaces/daspartho/prompt-extend
deep-learning
gpt-2
huggingface-spaces
huggingface-transformers
machine-learning
nlp
prompt
stable-diffusion
text-generation
Browse cluster: PyTorch Vision & Multimodal AI

README

Prompt Extend

Generic badge

Text generation model for generating suitable style cues given the main idea for a prompt.

Play with it on HuggingFace Space.

Tokenizer and Model on HuggingFace Hub.

Usage

from transformers import pipeline

text_pipe = pipeline('text-generation', model='daspartho/prompt-extend')

prompt = "peaceful village landscape"
extended_prompt = text_pipe(prompt, num_return_sequences=1)[0]["generated_text"]
print(extended_prompt)
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("daspartho/prompt-extend")

model = AutoModelForCausalLM.from_pretrained("daspartho/prompt-extend")

Code

Examples

Contributing

If you want to contribute code, simply create a pull request. If you have an idea, create an issue and the developers will look into it!

Contributors

daspartho

25 commits

Languages

Jupyter Notebook

100.0%