fix: service
This commit is contained in:
parent
8fd7950a62
commit
b10685cc06
@ -1,7 +1,11 @@
|
||||
[Unit]
|
||||
Description=Matrix AI
|
||||
After=multi-user.target[Service]
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
ExecStart=/usr/bin/python3 /home/0xmrtt/matrixai/run.sh
|
||||
ExecStart=/home/0xmrtt/matrixai/run.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -445,8 +445,12 @@ def run():
|
||||
async def generate_image(image_prompt, style_value, ratio_value, negative):
|
||||
imagine = AsyncImagine()
|
||||
filename = str(uuid.uuid4()) + ".png"
|
||||
try:
|
||||
style_enum = Style[style_value]
|
||||
ratio_enum = Ratio[ratio_value]
|
||||
except KeyError:
|
||||
style_enum = Style.IMAGINE_V3
|
||||
ratio_enum = Ratio.RATIO_1X1
|
||||
img_data = await imagine.sdprem(
|
||||
prompt=image_prompt,
|
||||
style=style_enum,
|
||||
|
Loading…
Reference in New Issue
Block a user