Update README.md
Browse files
README.md
CHANGED
@@ -9,4 +9,41 @@ tags:
|
|
9 |
- prompts
|
10 |
---
|
11 |
A GPT2 model to generate prompts for SDXL or similar models.</br>
|
12 |
-
Trained from the GPT2 small model. Attach a Style to affect the render further.</br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
- prompts
|
10 |
---
|
11 |
A GPT2 model to generate prompts for SDXL or similar models.</br>
|
12 |
+
Trained from the GPT2 small model. Attach a Style to affect the render further.</br>
|
13 |
+
Trained on Syntetic prompts generated with Mistral7b.
|
14 |
+
</br>Dataset: https://huggingface.co/datasets/recoilme/SyntheticPrompts
|
15 |
+
</br>Project by AiArtLab, discord: https://discord.gg/HtXY93VW
|
16 |
+
|
17 |
+
```
|
18 |
+
from transformers import pipeline, GPT2Tokenizer,GPT2LMHeadModel
|
19 |
+
|
20 |
+
checkpoint_path = "recoilme/insomnia_v1"#"base"
|
21 |
+
model = GPT2LMHeadModel.from_pretrained(checkpoint_path)
|
22 |
+
tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
|
23 |
+
|
24 |
+
text_generator = pipeline('text-generation', model=model, tokenizer=tokenizer)
|
25 |
+
|
26 |
+
texts = [
|
27 |
+
"Frog in a Harry Potter costume",
|
28 |
+
"Cat, art by ",
|
29 |
+
"a photo of woman underwater",
|
30 |
+
"thunderstorms on the alien planet, very shocking",
|
31 |
+
"Standing on the land of a new planet, the Female astronaut dances",
|
32 |
+
"The face of the cat woman, a face beautiful, young. The head is adorned with the Egyptian crown of Bastet.",
|
33 |
+
]
|
34 |
+
|
35 |
+
for text in texts:
|
36 |
+
print(f"Input: {text}:")
|
37 |
+
out = text_generator(text, max_length=150, num_return_sequences=2,temperature=1.0,)
|
38 |
+
print(f"Output 1: {out[0]['generated_text']}\n\n")
|
39 |
+
print(f"Output 2: {out[1]['generated_text']}")
|
40 |
+
print("\n")
|
41 |
+
```
|
42 |
+
|
43 |
+
```
|
44 |
+
Input: Frog in a Harry Potter costume:
|
45 |
+
|
46 |
+
Output 1: Frog in a Harry Potter costume:lighting a magical scene, vibrant colors. frogs frolicking in a magical pond, detailed textures on the frog's skin. Post-processing:izard's smile replaced with a pond edge reflection, intricate patterns on the frogs' bodies. Super excited expression towards the frogs, colorful lighting enhancing every detail.
|
47 |
+
|
48 |
+
Output 2: Frog in a Harry Potter costume, complete with red cap and yellow shirt, dashing through a magical forest. The trees are ancient and gnarled, their leaves shimmering with iridescent hues. Frog's eyes are full of determination as he runs, leaving behind a trail of golden sparks. A rainbow arches overhead, adding a touch of whimsy to the scene.
|
49 |
+
```
|