FredZhang7
commited on
Commit
•
3da8a05
1
Parent(s):
26f1219
Update README.md
Browse files
README.md
CHANGED
@@ -21,10 +21,12 @@ datasets:
|
|
21 |
|
22 |
## Fast Anime PromptGen
|
23 |
|
24 |
-
|
|
|
|
|
|
|
25 |
|
26 |
Todo:
|
27 |
-
- complete data preprocessing and training description
|
28 |
- upload Danbooru model
|
29 |
|
30 |
## Text-to-image Examples
|
@@ -48,7 +50,7 @@ tokenizer = GPT2Tokenizer.from_pretrained('distilgpt2')
|
|
48 |
tokenizer.add_special_tokens({'pad_token': '[PAD]'})
|
49 |
model = GPT2LMHeadModel.from_pretrained('FredZhang7/anime-anything-promptgen')
|
50 |
|
51 |
-
prompt = r'1girl, genshin
|
52 |
|
53 |
# generate text using fine-tuned model
|
54 |
nlp = pipeline('text-generation', model=model, tokenizer=tokenizer)
|
|
|
21 |
|
22 |
## Fast Anime PromptGen
|
23 |
|
24 |
+
`pytorch_model` is trained on 80K anime tags, all with `up_score` greater than 8 and without "greyscale","girls","boys", and "others", fetched from the [Safebooru API](https://safebooru.donmai.us/posts/random.json).
|
25 |
+
I didn't release the V1 model because it only generated gibberish prompts. After trying all means to correct that behavior, I eventually figured that the cause of the gibberish prompts is not from the model or training duration, but rather from the random usernames present in the training data.
|
26 |
+
Here's the complete [prompt preprocessing](./preprocess.py).
|
27 |
+
|
28 |
|
29 |
Todo:
|
|
|
30 |
- upload Danbooru model
|
31 |
|
32 |
## Text-to-image Examples
|
|
|
50 |
tokenizer.add_special_tokens({'pad_token': '[PAD]'})
|
51 |
model = GPT2LMHeadModel.from_pretrained('FredZhang7/anime-anything-promptgen')
|
52 |
|
53 |
+
prompt = r'1girl, genshin'
|
54 |
|
55 |
# generate text using fine-tuned model
|
56 |
nlp = pipeline('text-generation', model=model, tokenizer=tokenizer)
|