Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
张俊怡 a018b17cb1 | 1 year ago | |
---|---|---|
.. | ||
configs | 1 year ago | |
demo | 1 year ago | |
ldm | 1 year ago | |
scripts | 1 year ago | |
README.md | 1 year ago | |
__init__.py | 1 year ago | |
requirements.txt | 1 year ago | |
run_train.py | 1 year ago | |
txt2img.py | 1 year ago |
Stablediffusionv2模型由Stability-AI团队研发,由华为昇腾部门适配Mindspore+Ascend环境实现。
昇腾软硬件解决方案(驱动+固件+CANN)
前往昇腾社区,按照说明下载安装。
AI框架 - MindSpore == 1.9
前往MindSpore官网,按照说明下载安装。
如需更多帮助,可以参考以下资料
第三方依赖
pip install -r requirements.txt
下载stablediffusionv2预训练参数 stablediffusionv2_512.ckpt 至 stablediffusionv2/models/ 目录.
要进行文图生成,可以运行txt2img.py 或者直接使用默认参数运行 infer.sh.
python txt2img.py --prompt [input text] --ckpt_path [ckpt_path] --ckpt_name [ckpt_name] \
--H [image_height] --W [image_width] --output_path [image save folder] \
--n_samples [number of images to generate]
或者
bash scripts/infer.sh
更高的分辨率需要更大的显存. 对于 Ascend 910 芯片, 我们可以同时生成8张512x512的图片。
下面是我们的stablediffusionv2模型生成的一些样例以及对应的[input text]
。
A Van Gogh style oil painting of sunflower
A Van Gogh style oil painting of sunflower
a professional photograph of an astronaut riding a horse
a professional photograph of an astronaut riding a horse
The beautiful night view of the city has various buildings, traffic flow, and lights.
The beautiful night view of the city has various buildings, traffic flow, and lights.
Modernist style, sunset, withered vines, old trees, and mountains
Modernist style, sunset, withered vines, old trees, and mountains
No Description
Python Text Shell Markdown
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》