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