ToyWorldXL / prompt_extend.py
Yntec's picture
Update prompt_extend.py
3c03595 verified
raw
history blame contribute delete
221 Bytes
from transformers import pipeline
pipe = pipeline('text-generation', model='Gustavosta/MagicPrompt-Stable-Diffusion')
def extend_prompt(prompt):
return pipe(prompt+',', num_return_sequences=1)[0]["generated_text"]