徐锦洪 发表于 2024-8-12 17:07:30

Datawhale X魔搭AI夏令营 AIGC方向Task01学习笔记

目次
一、开通PAL-DSW实用
二、报名可图Kolors-LoRA风格故事寻衅赛
三、创建PAL实例
四、跑baseline
五、结果上传魔塔
六、关闭PAL
小白,刚跑通Baseline,初步了解了比赛。
Datawhale官方的速通教程链接:Task 1 从零入门AI生图原理&实践

一、开通PAL-DSW实用



[*]​​​​​​开通PAI-DSW免费试用
https://i-blog.csdnimg.cn/direct/638acb1c960b43dd9bb75b66d5b4c6bf.png
https://i-blog.csdnimg.cn/direct/12007656dc24432481a59d9fa045aaf4.png
https://i-blog.csdnimg.cn/direct/0ee213cb0e0a46c9a2c4cb1d41ce167e.png


[*] 在魔搭社区进行授权
        先完成注册
https://i-blog.csdnimg.cn/direct/5e215d580c9d46bc835adcf41750af93.png
https://i-blog.csdnimg.cn/direct/36c8cbc78652459999bdfbcf873bdfff.pnghttps://i-blog.csdnimg.cn/direct/2691d26263cb445a9498f0ff8dc3d0b9.png
https://i-blog.csdnimg.cn/direct/cd205076796248d5bb6345fc42c68719.png
https://i-blog.csdnimg.cn/direct/d0d9aea09e7949d2a05abca9056da5a8.pnghttps://i-blog.csdnimg.cn/direct/c8e8c4f5cec14b7c9e85bd896987d557.png
       再授权
https://i-blog.csdnimg.cn/direct/64bcfcdf421041e9bd94efd03c201833.png
https://i-blog.csdnimg.cn/direct/d8920317eeac495a848eebd645234d9c.png
https://i-blog.csdnimg.cn/direct/e29807e5ca7343b8a8fdf7a90673ae40.png
https://i-blog.csdnimg.cn/direct/ece93865e0e8428f9ed3387c8d16b9aa.png

二、报名可图Kolors-LoRA风格故事寻衅赛

点击报名比赛
赛题内容:

[*] 参赛者需在可图Kolors 模子的底子上训练LoRA 模子,生成无限风格,如水墨画风格、水彩风格、赛博朋克风格、日漫风格......
[*] 基于LoRA模子生成 8 张图片组成连贯故事,故事内容可自界说;基于8图故事,评估LoRA风格的美感度及连贯性
样例:偶像少女养成日记
https://i-blog.csdnimg.cn/direct/b348ba142cf84fa6ba101b188e12269d.png
https://i-blog.csdnimg.cn/direct/1517ddd5f95b465ab3727064930e6870.png
三、创建PAL实例

链接:https://www.modelscope.cn/my/mynotebook/authorization
https://i-blog.csdnimg.cn/direct/08af13c466b74cbc951820a93aaa97af.png
https://i-blog.csdnimg.cn/direct/1ea6879495884658a3a761867541c05e.png
https://i-blog.csdnimg.cn/direct/bac65def8411410b87dd364db8ab066a.png
https://i-blog.csdnimg.cn/direct/385501a4589e4123b33fb7fc895b6cbe.png
https://i-blog.csdnimg.cn/direct/814273ab6f56448b86f7adff1c14c294.png
https://i-blog.csdnimg.cn/direct/04c3dacf5ddd4a9bad4d93d33c72ab20.png

四、跑baseline



[*] 下载baseline文件
git lfs install
git clone https://www.modelscope.cn/datasets/maochase/kolors.git
https://i-blog.csdnimg.cn/direct/5e851d1faad64785878dd99605966437.png
https://i-blog.csdnimg.cn/direct/0e666c3160894d9b9434d929e06e65fc.png


[*]进入文件夹,打开baseline文件
https://i-blog.csdnimg.cn/direct/7519c9ef280c4efcb5906036eae10b32.pnghttps://i-blog.csdnimg.cn/direct/4d0c7fc608804d2bb52891657994b2ca.png


[*]安装情况,然后重启kernel
https://i-blog.csdnimg.cn/direct/8cb5dca51dc649899a7deca0bd5953b9.png
https://i-blog.csdnimg.cn/direct/5977582710e3439a82f72666112999bf.png


[*] 调解prompt,设置你想要的图片风格,依次修改8张图片的描述(可选)
正向描述词:你想要生成的图片应该包罗的内容
反向提示词:你不盼望生成的图片的内容
https://i-blog.csdnimg.cn/direct/734d391624284e71bc2f932a3448c8d7.png


[*] 依次顺序运行剩余的代码块,点击代码框左上角执行按钮,终极得到图片
https://i-blog.csdnimg.cn/direct/9cebb0e4a11e4a26b40ad609edac0a08.png

五、结果上传魔塔

链接


[*]移动结果文件
mkdir /mnt/workspace/kolors/output & cd
cp /mnt/workspace/kolors/models/lightning_logs/version_0/checkpoints/epoch\=0-step\=500.ckpt /mnt/workspace/kolors/output/
cp /mnt/workspace/kolors/1.jpg /mnt/workspace/kolors/output/     把代码粘贴上去
https://i-blog.csdnimg.cn/direct/7b2e7460dad14c279dc30bf81be50068.png



[*] 下载结果文件
分别下载两个文件到桌面
https://i-blog.csdnimg.cn/direct/d793aee905b8495bb69027ce4705f056.pnghttps://i-blog.csdnimg.cn/direct/1b4d51bb92bb4e5c973b2e22f868142b.png


[*] 创建并上传模子
  点击链接,创建模子。
https://i-blog.csdnimg.cn/direct/798a359ec8cc4bf994525aa0e444a3f3.png
https://i-blog.csdnimg.cn/direct/ef904797f9ad4210a112105f0373219a.png
如许就创建完成了。


[*] 来到创空间,检察本身的模子
https://i-blog.csdnimg.cn/direct/812351bcfdc3453e9c4f96e45f20ad71.png
点击模子,搜索本身的账号名称。
https://i-blog.csdnimg.cn/direct/c87273bf18ee416083fac2a3faffdded.png
(本身跑的)

六、关闭PAL

节流一点试用额度
https://i-blog.csdnimg.cn/direct/778406817c3541e895a1800248247ba0.png


好了,一个简单的Baseline已经跑完了,看看本身都有哪些劳绩吧。

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: Datawhale X魔搭AI夏令营 AIGC方向Task01学习笔记