batch_size = 16
learning_rate = 0.001 # this is why I didn't have to spend _forever_ on it
Generate extension with "<s>Prompt: " and whatever your normal prompt is.
I did this myself. I sat down and just ranked images for so long. It's gone through a couple iterations. Only the biases and layernorm weights were trained. The commit messages are a MESS.
First iteration of this project
# Install libraries needed to run the models
!pip install transformers diffusers accelerate -qq
# Import the librariesfrom diffusers import StableDiffusionPipeline, EulerDiscreteScheduler
from transformers import pipeline
import torch
# This is the model that the transformer was finetuned to generate prompts for
model_id = "stabilityai/stable-diffusion-2-base"# Use the Euler scheduler here
scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, revision="fp16", torch_dtype=torch.float16)
pipe = pipe.to("cuda")
# Load the transformer model
prompt_pipe = pipeline("text-generation", model="crumb/bloom-560m-RLHF-SD2-prompter")
prompt = "cool landscape"# Auto-complete prompt
prompt = "<s>Prompt: " + prompt + ","
extended_prompt = prompt_pipe(prompt, do_sample=True, max_length=42)[0]['generated_text']
extended_prompt = extended_prompt[10:]
print("Prompt is now: ", extended_prompt)
# Generate image
image = pipe(extended_prompt).images[0]
image.save("output.png")
image
Prompt is now: cool landscape, concept art
Prompt is now: cool landscape, concept art, sharp focus, digital painting
short additions, they work though I guess (results vary)
It's also very good at generating prompts by itself, with just the "Prompt:" prompt.
<s>Prompt: 1 0 th century, highly detailed, concept art, cinematic lighting, unreal engine, trending on artstation, artstation hd, artstation hq, very very detailed
Further testing to be done in this area (automated training with aesthetic predicting models, larger data collection about prompt scores, better training in general)
Also, enjoy this graphic I had to make myself because I kept being indecisive of the reward methodology
Runs of crumb bloom-560m-RLHF-SD2-prompter on huggingface.co
108
Total runs
9
24-hour runs
18
3-day runs
66
7-day runs
68
30-day runs
More Information About bloom-560m-RLHF-SD2-prompter huggingface.co Model
More bloom-560m-RLHF-SD2-prompter license Visit here:
bloom-560m-RLHF-SD2-prompter huggingface.co is an AI model on huggingface.co that provides bloom-560m-RLHF-SD2-prompter's model effect (), which can be used instantly with this crumb bloom-560m-RLHF-SD2-prompter model. huggingface.co supports a free trial of the bloom-560m-RLHF-SD2-prompter model, and also provides paid use of the bloom-560m-RLHF-SD2-prompter. Support call bloom-560m-RLHF-SD2-prompter model through api, including Node.js, Python, http.
bloom-560m-RLHF-SD2-prompter huggingface.co is an online trial and call api platform, which integrates bloom-560m-RLHF-SD2-prompter's modeling effects, including api services, and provides a free online trial of bloom-560m-RLHF-SD2-prompter, you can try bloom-560m-RLHF-SD2-prompter online for free by clicking the link below.
crumb bloom-560m-RLHF-SD2-prompter online free url in huggingface.co:
bloom-560m-RLHF-SD2-prompter is an open source model from GitHub that offers a free installation service, and any user can find bloom-560m-RLHF-SD2-prompter on GitHub to install. At the same time, huggingface.co provides the effect of bloom-560m-RLHF-SD2-prompter install, users can directly use bloom-560m-RLHF-SD2-prompter installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
bloom-560m-RLHF-SD2-prompter install url in huggingface.co: