update flux

This commit is contained in:
Believethehype 2024-12-02 14:48:45 +01:00
parent c8933cc679
commit 6cfd2ddd14
2 changed files with 10 additions and 8 deletions

View File

@ -66,8 +66,8 @@ class ImageGenerationReplicateFluxPro(DVMTaskInterface):
async def create_request_from_nostr_event(self, event, client=None, dvm_config=None):
request_form = {"jobID": event.id().to_hex() + "_" + self.NAME.replace(" ", "")}
prompt = ""
width = "1024"
height = "1024"
width = "4"
height = "5"
for tag in event.tags().to_vec():
@ -94,7 +94,7 @@ class ImageGenerationReplicateFluxPro(DVMTaskInterface):
options = {
"prompt": prompt,
"size": width + "x" + height,
"ratio": width + ":" + height,
"number": 1
}
request_form['options'] = json.dumps(options)
@ -111,7 +111,7 @@ class ImageGenerationReplicateFluxPro(DVMTaskInterface):
output = replicate.run(
"black-forest-labs/flux-1.1-pro",
input={"prompt": options["prompt"],
"aspect_ratio": "4:5",
"aspect_ratio": options["ratio"],
"output_format": "jpg",
"output_quality": 80,
"safety_tolerance": 2,

View File

@ -315,7 +315,7 @@ def build_replicate(name, identifier, model, announce):
nip89info = {
"name": name,
"picture": "https://i.nostr.build/qnoBIN4jSkfF8IHk.png",
"about": "I use Replicate to run StableDiffusion XL",
"about": "I make images with StableDiffusion XL",
"supportsEncryption": True,
"acceptsNutZaps": False,
"nip90Params": {
@ -352,7 +352,7 @@ def build_replicate_recraft(name, identifier, announce):
nip89info = {
"name": name,
"picture": "https://i.nostr.build/jSbrXvYglXCzSeAc.jpg",
"about": "I use Replicate to run Recraft v3",
"about": "I produce images with Recraft v3",
"supportsEncryption": True,
"acceptsNutZaps": False,
"nip90Params": {
@ -387,13 +387,13 @@ def build_replicate_fluxpro(name, identifier, announce):
nip89info = {
"name": name,
"picture": "https://i.nostr.build/AQTujqzVmLxLmG16.jpg",
"about": "I use Replicate to FluxPro 1.1.",
"about": "I provide images with FluxPro 1.1",
"supportsEncryption": True,
"acceptsNutZaps": False,
"nip90Params": {
"size": {
"required": False,
"values": ["5:4"]
"values": ["4:5"]
}
}
}
@ -442,6 +442,8 @@ def playground(announce=False):
bot_config.SUPPORTED_DVMS.append(recraftreplicate)
recraftreplicate.run()
media_bringer = build_media_converter("Nostr AI DVM Media Converter", "media_converter", announce)
#bot_config.SUPPORTED_DVMS.append(media_bringer)