Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wait parameter not working (and potentially another bug) #14

Open
esadatari opened this issue Apr 12, 2023 · 4 comments
Open

wait parameter not working (and potentially another bug) #14

esadatari opened this issue Apr 12, 2023 · 4 comments

Comments

@esadatari
Copy link

First off, thank you so much for this wonderful tool! When it works, it works so well!

I hope I'm providing you enough detail to help you get to the bottom of an issue I'm currently experiencing.

I'm having a bit of trouble with the wait parameter, currently.

  • I tried using wait: 5 and get the following issue error setting flag "wait" from config file: parse error, which may be a bug or a misnomer in the documentation of the parameter for wait showing that it is an (int).

  • When i look in bulk.ai I see the following parameter defined wait time.Duration yaml:"wait" seems to suggest that the variable is intending that it show 5s rather than an integer 5

  • It allows me to use wait: 5s in the config.yaml file, but I'm not able to see it waiting the (hopefully) obvious 5 seconds.

  • I saw the following portion in main.go:

  • fs.DurationVar(&cfg.Wait, "wait", 0, "wait time between prompts (optional)")

  • I tried manually changing the value in main.go to show that the default wait int is equal to 3

  • That seemed to institute a new wait time of 3 seconds, but I then ran into the issue of a sudden influx of repeated jobs being sent out, as well as jobs never being recognized as finished.

The prompts were located in a .txt file, and the three particular prompts causing a lot of trouble were as follows:

  • IMAGE_TYPE: Aerial drone shot | GENRE: Drama | EMOTION: Melancholy | SCENE: An abandoned village with ruined houses and a church, surrounded by a misty forest | ACTORS: None | LOCATION TYPE: Abandoned village | CAMERA MODEL: DJI Mini 2 | CAMERA LENSE: 24mm f/2.8 | SPECIAL EFFECTS: Black and white filter | TAGS: aerial view, abandoned village, ruined houses, misty forest, drama, melancholy --ar 3:2 --v 5 --c 0.5 --s 100 --q 1.8
  • IMAGE_TYPE: Underwater shot | GENRE: Retrofuturism | EMOTION: Mysterious | SCENE: A submerged temple with ancient relics and murals, surrounded by schools of exotic fish | ACTORS: None | LOCATION TYPE: Submerged temple | CAMERA MODEL: Sony A7 III | CAMERA LENSE: 28-70mm f/3.5-5.6 | SPECIAL EFFECTS: Vignette effect to create a vintage look | TAGS: underwater, retrofuturism, mysterious, submerged temple, ancient relics, exotic fish, vintage --seed 498346825 --ar 3:2 --v 5 --c 0.5 --s 100 --q 1.8
  • IMAGE_TYPE: Underwater shot | GENRE: Retrofuturism | EMOTION: Eerie | SCENE: An old, rusted submarine lying at the bottom of the ocean, surrounded by seaweed and fish | ACTORS: None | LOCATION TYPE: Ocean floor | CAMERA MODEL: GoPro HERO10 Black | CAMERA LENSE: 8mm fisheye | SPECIAL EFFECTS: Color grading to create a vintage look | TAGS: underwater, retrofuturism, eerie, rusted submarine, seaweed, fish, vintage --seed 498346825 --ar 3:2 --v 5 --c 0.5 --s 100 --q 1.8

Here's the default log output showing the issues occurring repeatedly:

2023/04/11 20:50:06 album resumed: output/GPT_Underwater_Ruins_02
{"progress": "4", "estimated": "10h22m0s"}
{"progress": "5", "estimated": "8h14m0s"}
{"progress": "6", "estimated": "6h49m0s"}
{"progress": "7", "estimated": "5h48m0s"}
2023/04/11 21:00:14 retrying... midjourney: couldn't receive links message: context deadline exceeded
{"progress": "8", "estimated": "6h37m0s"}
{"progress": "9", "estimated": "5h51m0s"}
{"progress": "10", "estimated": "5h22m0s"}
{"progress": "11", "estimated": "4h50m0s"}
2023/04/11 21:10:09 retrying... midjourney: couldn't receive links message: context deadline exceeded
2023/04/11 21:10:17 retrying... midjourney: couldn't receive links message: context deadline exceeded
2023/04/11 21:10:20 retrying... midjourney: job queued: you have reached the maximum allowed number of concurrent jobs. don't worry, this job will start as soon as another one finishes!
2023/04/11 21:10:22 retrying... midjourney: job queued: you have reached the maximum allowed number of concurrent jobs. don't worry, this job will start as soon as another one finishes!
2023/04/11 21:10:24 ❌ couldn't imagine IMAGE_TYPE: Aerial drone shot | GENRE: Drama | EMOTION: Melancholy | SCENE: An abandoned village with ruined houses and a church, surrounded by a misty forest | ACTORS: None | LOCATION TYPE: Abandoned village | CAMERA MODEL: DJI Mini 2 | CAMERA LENSE: 24mm f/2.8 | SPECIAL EFFECTS: Black and white filter | TAGS: aerial view, abandoned village, ruined houses, misty forest, drama, melancholy --ar 3:2 --v 5 --c 0.5 --s 100 --q 1.8 midjourney: job queued: you have reached the maximum allowed number of concurrent jobs. don't worry, this job will start as soon as another one finishes!
2023/04/11 21:10:27 retrying... midjourney: job queued: you have reached the maximum allowed number of concurrent jobs. don't worry, this job will start as soon as another one finishes!
2023/04/11 21:10:30 retrying... midjourney: job queued: you have reached the maximum allowed number of concurrent jobs. don't worry, this job will start as soon as another one finishes!
2023/04/11 21:10:32 retrying... midjourney: job queued: you have reached the maximum allowed number of concurrent jobs. don't worry, this job will start as soon as another one finishes!
2023/04/11 21:10:35 retrying... midjourney: job queued: you have reached the maximum allowed number of concurrent jobs. don't worry, this job will start as soon as another one finishes!
2023/04/11 21:10:38 ❌ couldn't imagine IMAGE_TYPE: Aerial drone shot | GENRE: Futuristic | EMOTION: Futuristic | SCENE: A futuristic city with sleek and streamlined buildings, now submerged underwater, and a scuba diver exploring the futuristic ruins | ACTORS: Scuba diver | LOCATION TYPE: Submerged futuristic city | CAMERA MODEL: DJI Phantom 4 Pro | CAMERA LENSE: 24mm f/2.8 | SPECIAL EFFECTS: Blue and purple color grading to create a futuristic look | TAGS: aerial view, futuristic city, sleek buildings, submerged, scuba diving, futuristic --ar 3:2 --v 5 --c 0.5 --s 100 --q 1.8 midjourney: job queued: you have reached the maximum allowed number of concurrent jobs. don't worry, this job will start as soon as another one finishes!
2023/04/11 21:10:41 retrying... midjourney: job queued: you have reached the maximum allowed number of concurrent jobs. don't worry, this job will start as soon as another one finishes!
2023/04/11 21:10:44 retrying... midjourney: job queued: you have reached the maximum allowed number of concurrent jobs. don't worry, this job will start as soon as another one finishes!
2023/04/11 21:10:47 retrying... midjourney: queue full: your job queue is full. please wait for a job to finish first, then resubmit this one.
2023/04/11 21:10:50 retrying... midjourney: queue full: your job queue is full. please wait for a job to finish first, then resubmit this one.
2023/04/11 21:10:55 ❌ couldn't imagine IMAGE_TYPE: Aerial drone shot | GENRE: Futuristic | EMOTION: Majestic | SCENE: A futuristic city with majestic architecture and grand monuments, now submerged underwater, and a scuba diver exploring the majestic ruins | ACTORS: Scuba diver | LOCATION TYPE: Submerged futuristic city | CAMERA MODEL: DJI Mavic Air 2S | CAMERA LENSE: 24mm f/2.8 | SPECIAL EFFECTS: High dynamic range (HDR) color grading to create a majestic look | TAGS: aerial view, futuristic city, majestic architecture, submerged, scuba diving, majestic --ar 3:2 --v 5 --c 0.5 --s 100 --q 1.8 midjourney: job queued: you have reached the maximum allowed number of concurrent jobs. don't worry, this job will start as soon as another one finishes!
{"progress": "12", "estimated": "4h32m0s"}
2023/04/11 21:10:58 retrying... midjourney: queue full: your job queue is full. please wait for a job to finish first, then resubmit this one.
2023/04/11 21:11:04 retrying... midjourney: queue full: your job queue is full. please wait for a job to finish first, then resubmit this one.
2023/04/11 21:11:06 retrying... midjourney: queue full: your job queue is full. please wait for a job to finish first, then resubmit this one.
^C2023/04/11 21:11:08 retrying... midjourney: couldn't receive links message: context canceled

I hope the detail provided helps, and let me know if there's anything I can do to help you hunt down this issue!

Here is a list of the prompts, just in case:
GPT_Underwater_Ruins.txt

@esadatari
Copy link
Author

esadatari#0678 is my discord username if you want to hit me up on disco to tshoot further!

igolaizola added a commit that referenced this issue Apr 12, 2023
When job queued error is received instead of returning an error the
response is read from the embedded data of the message and the process
continues.

When a non temporary error is received such as a "queue full" error
the tool should wait before retrying to avoid flooding the queue.

References #14
igolaizola added a commit that referenced this issue Apr 12, 2023
When job queued error is received instead of returning an error the
response is read from the embedded data of the message and the process
continues.

When a non temporary error is received such as a "queue full" error
the tool should wait before retrying to avoid flooding the queue.

References #14
igolaizola added a commit that referenced this issue Apr 12, 2023
When job queued error is received instead of returning an error the
response is read from the embedded data of the message and the process
continues.

When a non temporary error is received such as a "queue full" error
the tool should wait before retrying to avoid flooding the queue.

References #14
@igolaizola
Copy link
Owner

Thanks for reporting the issue @esadatari

I've just merged a fix that deals with queue issues. "Queue full" and "Job queued" errors were not being handled and the result was too many jobs queued.

I'll take a look to the wait parameter. As you said, the README has an error, it's not an int, it's a duration type, so the format should be "5s" instead of "5". But it should be working fine. Let me double check it.

@igolaizola
Copy link
Owner

The wait parameter seems to be working fine to me. I've updated the readme to make it more clear.
Let me know if you still have issues with it.

@esadatari
Copy link
Author

i'm unfortunately seeing rapid succession api calls, still.

often times, it is just not proceeding to download any of the upscales.. it's like it never realizes the job finishes, and then has to timeout before trying again, which can be frustrating when it's lots of prompts all doing this.

i'm on macOS 10.15.7 if that makes a difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants