mirror of
https://github.com/aljazceru/nostrdvm.git
synced 2026-01-06 15:54:18 +01:00
future: rework functions to async to be compatible with newest nostrsdk
This commit is contained in:
@@ -34,11 +34,9 @@ class ImageGenerationMLX(DVMTaskInterface):
|
||||
("tqdm", "tqdm"),
|
||||
]
|
||||
|
||||
def __init__(self, name, dvm_config: DVMConfig, nip89config: NIP89Config, nip88config: NIP88Config = None,
|
||||
admin_config: AdminConfig = None, options=None):
|
||||
async def init_dvm(self, name, dvm_config: DVMConfig, nip89config: NIP89Config, nip88config: NIP88Config = None,
|
||||
admin_config: AdminConfig = None, options=None):
|
||||
dvm_config.SCRIPT = os.path.abspath(__file__)
|
||||
super().__init__(name=name, dvm_config=dvm_config, nip89config=nip89config, nip88config=nip88config,
|
||||
admin_config=admin_config, options=options)
|
||||
|
||||
def is_input_supported(self, tags, client=None, dvm_config=None):
|
||||
for tag in tags:
|
||||
@@ -95,7 +93,7 @@ class ImageGenerationMLX(DVMTaskInterface):
|
||||
|
||||
return request_form
|
||||
|
||||
def process(self, request_form):
|
||||
async def process(self, request_form):
|
||||
try:
|
||||
import mlx.core as mx
|
||||
from nostr_dvm.backends.mlx.modules.stable_diffusion import StableDiffusion
|
||||
|
||||
Reference in New Issue
Block a user