mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-09-17 23:41:05 +02:00
cleanup
This commit is contained in:
@@ -170,10 +170,9 @@ def build_example(name, identifier, admin_config):
|
|||||||
}
|
}
|
||||||
|
|
||||||
nip89config = NIP89Config()
|
nip89config = NIP89Config()
|
||||||
nip89config.DTAG = check_and_set_d_tag(identifier, name, dvm_config.PRIVATE_KEY,
|
nip89config.DTAG = check_and_set_d_tag(identifier, name, dvm_config.PRIVATE_KEY, nip89info["image"])
|
||||||
nip89info["image"])
|
|
||||||
|
|
||||||
nip89config.CONTENT = json.dumps(nip89info)
|
nip89config.CONTENT = json.dumps(nip89info)
|
||||||
|
|
||||||
return AdvancedSearch(name=name, dvm_config=dvm_config, nip89config=nip89config,
|
return AdvancedSearch(name=name, dvm_config=dvm_config, nip89config=nip89config,
|
||||||
admin_config=admin_config)
|
admin_config=admin_config)
|
||||||
|
|
||||||
|
@@ -191,12 +191,10 @@ def build_example(name, identifier, admin_config):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nip89config = NIP89Config()
|
nip89config = NIP89Config()
|
||||||
nip89config.DTAG = check_and_set_d_tag(identifier, name, dvm_config.PRIVATE_KEY,
|
nip89config.DTAG = check_and_set_d_tag(identifier, name, dvm_config.PRIVATE_KEY, nip89info["image"])
|
||||||
nip89info["image"])
|
|
||||||
|
|
||||||
nip89config.CONTENT = json.dumps(nip89info)
|
nip89config.CONTENT = json.dumps(nip89info)
|
||||||
|
|
||||||
return DiscoverInactiveFollows(name=name, dvm_config=dvm_config, nip89config=nip89config,
|
return DiscoverInactiveFollows(name=name, dvm_config=dvm_config, nip89config=nip89config,
|
||||||
admin_config=admin_config)
|
admin_config=admin_config)
|
||||||
|
|
||||||
|
@@ -16,7 +16,6 @@ from nostr_dvm.utils.nip89_utils import NIP89Config, check_and_set_d_tag
|
|||||||
from nostr_dvm.utils.output_utils import upload_media_to_hoster
|
from nostr_dvm.utils.output_utils import upload_media_to_hoster
|
||||||
from nostr_dvm.utils.zap_utils import get_price_per_sat
|
from nostr_dvm.utils.zap_utils import get_price_per_sat
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
This File contains a Module to transform Text input on OpenAI's servers with DALLE-3 and receive results back.
|
This File contains a Module to transform Text input on OpenAI's servers with DALLE-3 and receive results back.
|
||||||
|
|
||||||
@@ -120,6 +119,7 @@ class ImageGenerationDALLE(DVMTaskInterface):
|
|||||||
print("Error in Module")
|
print("Error in Module")
|
||||||
raise Exception(e)
|
raise Exception(e)
|
||||||
|
|
||||||
|
|
||||||
# We build an example here that we can call by either calling this file directly from the main directory,
|
# We build an example here that we can call by either calling this file directly from the main directory,
|
||||||
# or by adding it to our playground. You can call the example and adjust it to your needs or redefine it in the
|
# or by adding it to our playground. You can call the example and adjust it to your needs or redefine it in the
|
||||||
# playground or elsewhere
|
# playground or elsewhere
|
||||||
@@ -144,12 +144,10 @@ def build_example(name, identifier, admin_config):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
nip89config = NIP89Config()
|
nip89config = NIP89Config()
|
||||||
nip89config.DTAG = check_and_set_d_tag(identifier, name, dvm_config.PRIVATE_KEY,
|
nip89config.DTAG = check_and_set_d_tag(identifier, name, dvm_config.PRIVATE_KEY, nip89info["image"])
|
||||||
nip89info["image"])
|
|
||||||
nip89config.CONTENT = json.dumps(nip89info)
|
nip89config.CONTENT = json.dumps(nip89info)
|
||||||
# We add an optional AdminConfig for this one, and tell the dvm to rebroadcast its NIP89
|
|
||||||
return ImageGenerationDALLE(name=name, dvm_config=dvm_config, nip89config=nip89config, admin_config=admin_config)
|
return ImageGenerationDALLE(name=name, dvm_config=dvm_config, nip89config=nip89config, admin_config=admin_config)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -136,9 +136,9 @@ def build_example(name, identifier, admin_config):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
nip89config = NIP89Config()
|
nip89config = NIP89Config()
|
||||||
nip89config.DTAG = nip89config.DTAG = check_and_set_d_tag(identifier, name, dvm_config.PRIVATE_KEY,
|
nip89config.DTAG = check_and_set_d_tag(identifier, name, dvm_config.PRIVATE_KEY, nip89info["image"])
|
||||||
nip89info["image"])
|
|
||||||
nip89config.CONTENT = json.dumps(nip89info)
|
nip89config.CONTENT = json.dumps(nip89info)
|
||||||
|
|
||||||
return TranslationLibre(name=name, dvm_config=dvm_config, nip89config=nip89config,
|
return TranslationLibre(name=name, dvm_config=dvm_config, nip89config=nip89config,
|
||||||
admin_config=admin_config, options=options)
|
admin_config=admin_config, options=options)
|
||||||
|
|
||||||
|
@@ -53,9 +53,9 @@ class VideoGenerationReplicateSVD(DVMTaskInterface):
|
|||||||
length = "25_frames_with_svd_xt"
|
length = "25_frames_with_svd_xt"
|
||||||
else:
|
else:
|
||||||
length = "14_frames_with_svd"
|
length = "14_frames_with_svd"
|
||||||
sizing_strategy = "maintain_aspect_ratio" #crop_to_16_9, use_image_dimensions
|
sizing_strategy = "maintain_aspect_ratio" # crop_to_16_9, use_image_dimensions
|
||||||
frames_per_second = 6
|
frames_per_second = 6
|
||||||
motion_bucket_id = 127 #Increase overall motion in the generated video
|
motion_bucket_id = 127 # Increase overall motion in the generated video
|
||||||
cond_aug = 0.02 # Amount of noise to add to input image
|
cond_aug = 0.02 # Amount of noise to add to input image
|
||||||
|
|
||||||
for tag in event.tags():
|
for tag in event.tags():
|
||||||
@@ -63,7 +63,7 @@ class VideoGenerationReplicateSVD(DVMTaskInterface):
|
|||||||
input_type = tag.as_vec()[2]
|
input_type = tag.as_vec()[2]
|
||||||
if input_type == "url":
|
if input_type == "url":
|
||||||
url = tag.as_vec()[1]
|
url = tag.as_vec()[1]
|
||||||
#TODO add params as defined above
|
# TODO add params as defined above
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
"url": url,
|
"url": url,
|
||||||
@@ -107,6 +107,7 @@ class VideoGenerationReplicateSVD(DVMTaskInterface):
|
|||||||
print("Error in Module")
|
print("Error in Module")
|
||||||
raise Exception(e)
|
raise Exception(e)
|
||||||
|
|
||||||
|
|
||||||
# We build an example here that we can call by either calling this file directly from the main directory,
|
# We build an example here that we can call by either calling this file directly from the main directory,
|
||||||
# or by adding it to our playground. You can call the example and adjust it to your needs or redefine it in the
|
# or by adding it to our playground. You can call the example and adjust it to your needs or redefine it in the
|
||||||
# playground or elsewhere
|
# playground or elsewhere
|
||||||
@@ -126,14 +127,12 @@ def build_example(name, identifier, admin_config):
|
|||||||
"nip90Params": {}
|
"nip90Params": {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
nip89config = NIP89Config()
|
nip89config = NIP89Config()
|
||||||
nip89config.DTAG = check_and_set_d_tag(identifier, name, dvm_config.PRIVATE_KEY,
|
nip89config.DTAG = check_and_set_d_tag(identifier, name, dvm_config.PRIVATE_KEY, nip89info["image"])
|
||||||
nip89info["image"])
|
|
||||||
nip89config.CONTENT = json.dumps(nip89info)
|
nip89config.CONTENT = json.dumps(nip89info)
|
||||||
# We add an optional AdminConfig for this one, and tell the dvm to rebroadcast its NIP89
|
|
||||||
|
|
||||||
return VideoGenerationReplicateSVD(name=name, dvm_config=dvm_config, nip89config=nip89config, admin_config=admin_config)
|
return VideoGenerationReplicateSVD(name=name, dvm_config=dvm_config, nip89config=nip89config,
|
||||||
|
admin_config=admin_config)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Reference in New Issue
Block a user