Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Hukasx0 authored Nov 11, 2023
1 parent f0140b0 commit 3ec34cf
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# Character factory

version using Zephyr 7B beta:
<a target="_blank" href="https://colab.research.google.com/drive/1JqkrtFXKalcmuMvST2VltoS1UVwoQINH">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a>

version using Mistral 7b instruct 0.1:
<a target="_blank" href="https://colab.research.google.com/drive/108koWoCDGaLZhZ0eV-gFuWtsnnLFMeCB">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a>

This Python script is designed to help you generate characters for [SillyTavern](https://github.com/SillyTavern/SillyTavern), [TavernAI](https://github.com/TavernAI/TavernAI), [TextGenerationWebUI](https://github.com/oobabooga/text-generation-webui) and many more, using LLM (Large Language Model) and Stable Diffusion. The script utilizes various deep learning models to create detailed character cards, including names, summaries, personalities, greeting messages, and character avatars.

<div>
Expand Down Expand Up @@ -54,31 +60,38 @@ When you run the script for the first time, the script will automatically downlo
```--example-messages``` Specify example messages for the character using this flag. If you provide example messages, they will be used for the character. If not provided, the script will use LLM to generate example messages for the character.

## Colab usage
1. Open the notebook in Google Colab by clicking the badge:
1. Open the notebook in Google Colab by clicking one of those badges:

version using Zephyr 7B beta:
<a target="_blank" href="https://colab.research.google.com/drive/1JqkrtFXKalcmuMvST2VltoS1UVwoQINH">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a>

2. After opening the link, you will see the notebook within the Google Colab environment.
3. Make sure to check whether a GPU is selected for your environment. Running your script on a CPU will not work. To verify the GPU selection, follow these steps:
version using Mistral 7b instruct 0.1:
<a target="_blank" href="https://colab.research.google.com/drive/108koWoCDGaLZhZ0eV-gFuWtsnnLFMeCB">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a>

3. After opening the link, you will see the notebook within the Google Colab environment.
4. Make sure to check whether a GPU is selected for your environment. Running your script on a CPU will not work. To verify the GPU selection, follow these steps:
1. Click on "Runtime" in the top menu.
2. Change the CPU to one of these: T4 GPU, A100 GPU, V100 GPU
3. Click "Save."
4. After the environment starts, you need to run each cell in turn
5. If everything is prepared, you can just run the last cell to generate characters
5. After the environment starts, you need to run each cell in turn
6. If everything is prepared, you can just run the last cell to generate characters

## Example usage:
```
python ./app/main.py --topic "anime schoolgirl" --negative-prompt "hyperrealistic, realistic, photo"
python ./app/main-zephyr.py --topic "{{user}}'s pessimistic, monday-hating cat" --negative-prompt "human, gore, nsfw"
```
```
python ./app/main.py --topic "noir style detective" --negative-prompt "fantasy, animation, anime, nature"
python ./app/main-zephyr.py --topic "{{user}}'s childhood friend, who secretly loves him" --gender "female" --negative-prompt "gore, nude, nsfw"
```
```
python ./app/main.py --topic "Old mage master of lightning" --negative-prompt "anime, nature, city, modern, young"
python ./app/main-mistral.py --topic "Old mage master of lightning" --gender "male" --negative-prompt "anime, nature, city, modern, young"
```
```
python ./app/main.py --name "Albert Einstein" --topic "science" --avatar-prompt "Albert Einstein"
python ./app/main-mistral.py --name "Albert Einstein" --topic "science" --avatar-prompt "Albert Einstein"
```

## License
Expand Down

0 comments on commit 3ec34cf

Please sign in to comment.