mirror of
https://github.com/aljazceru/nostrdvm.git
synced 2026-02-18 12:44:31 +01:00
simplify nip89
This commit is contained in:
@@ -176,23 +176,23 @@ def build_example(name, identifier, admin_config, server_address, default_model=
|
||||
# address it should use. These parameters can be freely defined in the task component
|
||||
options = {'default_model': default_model, 'default_lora': default_lora, 'server': server_address}
|
||||
|
||||
nip90params = {
|
||||
"negative_prompt": {
|
||||
"required": False,
|
||||
"values": []
|
||||
},
|
||||
"ratio": {
|
||||
"required": False,
|
||||
"values": ["1:1", "4:3", "16:9", "3:4", "9:16", "10:16"]
|
||||
}
|
||||
}
|
||||
|
||||
nip89info = {
|
||||
"name": name,
|
||||
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
|
||||
"about": "I draw images based on a prompt with a Model called unstable diffusion",
|
||||
"encryptionSupported": True,
|
||||
"cashuAccepted": True,
|
||||
"nip90Params": nip90params
|
||||
"nip90Params": {
|
||||
"negative_prompt": {
|
||||
"required": False,
|
||||
"values": []
|
||||
},
|
||||
"ratio": {
|
||||
"required": False,
|
||||
"values": ["1:1", "4:3", "16:9", "3:4", "9:16", "10:16"]
|
||||
}
|
||||
}
|
||||
}
|
||||
nip89config = NIP89Config()
|
||||
nip89config.DTAG = check_and_set_d_tag(identifier, name, dvm_config.PRIVATE_KEY,
|
||||
|
||||
@@ -200,28 +200,26 @@ def build_example(name, identifier, admin_config, server_address, default_lora="
|
||||
dvm_config = build_default_config(identifier)
|
||||
admin_config.LUD16 = dvm_config.LN_ADDRESS
|
||||
|
||||
nip90params = {
|
||||
"negative_prompt": {
|
||||
"required": False,
|
||||
"values": []
|
||||
},
|
||||
"lora": {
|
||||
"required": False,
|
||||
"values": ["inkpunk", "timburton", "voxel"]
|
||||
},
|
||||
|
||||
"strength": {
|
||||
"required": False,
|
||||
"values": []
|
||||
}
|
||||
}
|
||||
nip89info = {
|
||||
"name": name,
|
||||
"image": "https://image.nostr.build/229c14e440895da30de77b3ca145d66d4b04efb4027ba3c44ca147eecde891f1.jpg",
|
||||
"about": "I convert an image to another image, kinda random for now. ",
|
||||
"encryptionSupported": True,
|
||||
"cashuAccepted": True,
|
||||
"nip90Params": nip90params
|
||||
"nip90Params": {
|
||||
"negative_prompt": {
|
||||
"required": False,
|
||||
"values": []
|
||||
},
|
||||
"lora": {
|
||||
"required": False,
|
||||
"values": ["inkpunk", "timburton", "voxel"]
|
||||
},
|
||||
"strength": {
|
||||
"required": False,
|
||||
"values": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# A module might have options it can be initialized with, here we set a default model, lora and the server
|
||||
|
||||
@@ -115,23 +115,22 @@ def build_example(name, identifier, admin_config, server_address):
|
||||
dvm_config = build_default_config(identifier)
|
||||
admin_config.LUD16 = dvm_config.LN_ADDRESS
|
||||
|
||||
nip90params = {
|
||||
"method": {
|
||||
"required": False,
|
||||
"values": ["prompt", "analysis"]
|
||||
},
|
||||
"mode": {
|
||||
"required": False,
|
||||
"values": ["best", "classic", "fast", "negative"]
|
||||
}
|
||||
}
|
||||
nip89info = {
|
||||
"name": name,
|
||||
"image": "https://image.nostr.build/229c14e440895da30de77b3ca145d66d4b04efb4027ba3c44ca147eecde891f1.jpg",
|
||||
"about": "I analyse Images an return a prompt or a prompt analysis",
|
||||
"encryptionSupported": True,
|
||||
"cashuAccepted": True,
|
||||
"nip90Params": nip90params
|
||||
"nip90Params": {
|
||||
"method": {
|
||||
"required": False,
|
||||
"values": ["prompt", "analysis"]
|
||||
},
|
||||
"mode": {
|
||||
"required": False,
|
||||
"values": ["best", "classic", "fast", "negative"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# A module might have options it can be initialized with, here we set a default model, lora and the server
|
||||
|
||||
@@ -113,19 +113,18 @@ def build_example(name, identifier, admin_config, server_address):
|
||||
dvm_config = build_default_config(identifier)
|
||||
admin_config.LUD16 = dvm_config.LN_ADDRESS
|
||||
|
||||
nip90params = {
|
||||
"upscale": {
|
||||
"required": False,
|
||||
"values": ["2", "3", "4"]
|
||||
}
|
||||
}
|
||||
nip89info = {
|
||||
"name": name,
|
||||
"image": "https://image.nostr.build/229c14e440895da30de77b3ca145d66d4b04efb4027ba3c44ca147eecde891f1.jpg",
|
||||
"about": "I upscale an image using realESRGan up to factor 4 (default is factor 4)",
|
||||
"encryptionSupported": True,
|
||||
"cashuAccepted": True,
|
||||
"nip90Params": nip90params
|
||||
"nip90Params": {
|
||||
"upscale": {
|
||||
"required": False,
|
||||
"values": ["2", "3", "4"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# A module might have options it can be initialized with, here we set a default model, lora and the server
|
||||
|
||||
@@ -160,24 +160,23 @@ def build_example(name, identifier, admin_config, server_address):
|
||||
# address it should use. These parameters can be freely defined in the task component
|
||||
options = {'default_model': "base", 'server': server_address}
|
||||
|
||||
nip90params = {
|
||||
"model": {
|
||||
"required": False,
|
||||
"values": ["base", "tiny", "small", "medium", "large-v1", "large-v2", "tiny.en", "base.en", "small.en",
|
||||
"medium.en"]
|
||||
},
|
||||
"alignment": {
|
||||
"required": False,
|
||||
"values": ["raw", "segment", "word"]
|
||||
}
|
||||
}
|
||||
nip89info = {
|
||||
"name": name,
|
||||
"image": "https://image.nostr.build/c33ca6fc4cc038ca4adb46fdfdfda34951656f87ee364ef59095bae1495ce669.jpg",
|
||||
"about": "I extract text from media files with WhisperX",
|
||||
"encryptionSupported": True,
|
||||
"cashuAccepted": True,
|
||||
"nip90Params": nip90params
|
||||
"nip90Params": {
|
||||
"model": {
|
||||
"required": False,
|
||||
"values": ["base", "tiny", "small", "medium", "large-v1", "large-v2", "tiny.en", "base.en", "small.en",
|
||||
"medium.en"]
|
||||
},
|
||||
"alignment": {
|
||||
"required": False,
|
||||
"values": ["raw", "segment", "word"]
|
||||
}
|
||||
}
|
||||
}
|
||||
nip89config = NIP89Config()
|
||||
nip89config.DTAG = check_and_set_d_tag(identifier, name, dvm_config.PRIVATE_KEY,
|
||||
|
||||
Reference in New Issue
Block a user