Bài viết này viết về homelab cơ bản mình đang sử dụng. Vẫn còn cần nhiều improve, tuy nhiên do 1 số hạn chế kiến thức nên vẫn chưa được đầy đủ.
Diagram

Bài viết này viết về homelab cơ bản mình đang sử dụng. Vẫn còn cần nhiều improve, tuy nhiên do 1 số hạn chế kiến thức nên vẫn chưa được đầy đủ.
Diagram
Sau một thời gian nghịch Stable Diffusion thì giờ cũng chút hứng thú với … code Laravel cho em nó.
https://github.com/jooservices/Stable-Diffusion
Về cơ bản
`$prompt->portraits('Irene Aronson')
thì sẽ tự add prompt là portraits của nghệ sĩ Irene AronsonAlrite. Tuy nhiên trước đó thì cần chuẩn bị 1 số thứ
Description=systemd service start stable-diffusion
[Service]
Type=simple
Restart=always
RestartSec=1
ExecStart=/bin/bash /home/joos/stable-diffusion-webui/webui.sh
User=joos
WorkingDirectory=/home/joos/stable-diffusion-webui/
StandardOutput=append:/var/log/sdwebui.log
StandardError=append:/var/log/sdwebui.log
[Install]
WantedBy=multi-user.target
Xong ! Giờ thì ta có 2 cách
php artisan stable-diffusion:generate --prompt="a beautiful girl at 20 years old. she has colorful hair"
Command này sẽ sinh ra 1.001 queues ứng với prompt trên và … toàn bộ models mình đang có.
$response = $service
->txt2img()
->generate($payload)
->save($queue->uuid)
->getResponse();