|
|
|
|
@ -211,6 +211,8 @@ python hf-inference-cuda-example.py
|
|
|
|
|
|
|
|
|
|
Modify hf-training-example.py, also feel free to use more or less lines of SD prompts examples in csv file:
|
|
|
|
|
|
|
|
|
|
You may also prepare your own dataset, for example, with Positive and Negative and even Sampler etc lines interleaving in csv.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
MODEL = 'decapoda-research/llama-7b-hf'
|
|
|
|
|
DATA_FILE_PATH = 'datasets/stable_diffusion_prompts.csv'
|
|
|
|
|
@ -223,6 +225,12 @@ Then run the training, then after a long-long time, use something like this as p
|
|
|
|
|
batch = tokenizer("A portrait of a beautiful girl, ", return_tensors="pt")
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
If you have used dataset with Positive: Negative: lines, initial prompt may looks like:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
batch = tokenizer("Positive: A warship flying thru the Wormhole, ", return_tensors="pt")
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Run inference, this should return continued prompt.
|
|
|
|
|
|
|
|
|
|
## Reference
|
|
|
|
|
|