https://github.com/hansbug/sd_hcp
HCP-based stable diffusion image generator
https://github.com/hansbug/sd_hcp
Last synced: 5 months ago
JSON representation
HCP-based stable diffusion image generator
- Host: GitHub
- URL: https://github.com/hansbug/sd_hcp
- Owner: HansBug
- License: apache-2.0
- Created: 2024-02-27T11:24:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-28T13:11:19.000Z (over 2 years ago)
- Last Synced: 2024-12-29T15:10:15.617Z (over 1 year ago)
- Language: Python
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sd_hcp
HCP-based stable diffusion image generator
## Installation
```shell
git clone https://github.com/HansBug/sd_hcp.git
cd sd_hcp
pip install -r requirements.txt
make init
```
## T2I
```python
import matplotlib.pyplot as plt
from ditk import logging
from sd_hcp.infer import infer_images
logging.try_init_root(level=logging.INFO)
if __name__ == '__main__':
images = infer_images(
prompts=[
'masterpiece, best quality, 1girl, solo, tohsaka rin, portrait',
],
neg_prompts=[
'lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry',
],
seeds=[42],
)
plt.imshow(images[0])
plt.show()
```