Edit model card

Stable Diffusion Prompt Generator

TODO: Complete me next time

Introcude

...

from transformers import pipeline

pipe = pipeline('text-generation', model_id='Ar4ikov/gpt2-650k-stable-diffusion-prompt-generator')


def get_valid_prompt(text: str) -> str:
  dot_split = text.split('.')[0]
  n_split = text.split('\n')[0]

  return {
    len(dot_split) < len(n_split): dot_split,
    len(n_split) > len(dot_split): n_split,
    len(n_split) == len(dot_split): dot_split   
  }[True]


prompt = 'A Tokio town landscape, sunset, by'

valid_prompt = get_valid_prompt(pipe(prompt, max_length=77)[0]['generated_text'])
print(valid_prompt)
# >>> A Tokio town landscape, sunset, by Greg Rutkowski,Artgerm,trending on Behance,light effect,high detail,3d sculpture,golden ratio,dramatic,dramatic background,digital art
Downloads last month
2,162
Safetensors
Model size
137M params
Tensor type
F32
Β·
U8
Β·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for Ar4ikov/gpt2-650k-stable-diffusion-prompt-generator

Quantizations
1 model

Datasets used to train Ar4ikov/gpt2-650k-stable-diffusion-prompt-generator

Spaces using Ar4ikov/gpt2-650k-stable-diffusion-prompt-generator 6