Closed ofer-tal closed 1 year ago
My code was already using Ws: true and hooking up to the progress callback.
here is my initialization code - it is ~identical to yours unless I'm missing something:
const midjourneyClient = new Midjourney({
ServerId: process.env.MIDJOURNEY_DISCORD_SERVER_ID,
ChannelId: process.env.MIDJOURNEY_DISCORD_CHANNEL_ID,
SalaiToken: process.env.MIDJOURNEY_DISCORD_TOKEN,
HuggingFaceToken: process.env.HUGGINGFACE_TOKEN,
Debug: true,
Ws: true
});
let lastPreviewProgress = null;
const msg = await midjourneyClient.Imagine('...', async (uri, progress) => {
// ...
to be clear... with this code, and with the most recent version as of yesterday (4.0.98) as well as the previous 3.x versions this has been occuring.
It also seems like MJ is very "trigger happy" with flagging items for this ephemeral processing. We're not talking hard core X/R-rated prompts... mention of "blood" seems to be sufficient to trigger this.
Wow, great catch, I did not notice that before. Thank you. this seems to work nicely.
the code that reproduces this issue or a replay of the bug
await midjourneyClient.Imagine('A dark, bloodied poker table with vampire fangs and playing cards, by Roger Ballen', async (uri, progress) => { ... })
Describe the bug
Describe the bug on some imagine prompts, midjourney switches the generation to "ephemeral mode" (indicated by the words "Only you can see this" during image generation, and by the message "Original message was deleted" after the image is generated). When that happens, while progress & preview URLs are generated, the final image never arrives in the midjourney client - it just continues to wait for the message with the final image url forever.
* Meanwhile on discord -- the message on the discord server channel disappears for users other than the user originating the request and appears with the message "Original message was deleted" for the user posting the imagine request.
According to information posted on Midjourney forums (captures from mj forum pasted below after the screenshot) this can be avoided by sending the request to midjourney as a direct message rather than a channel message.
OR alternatively perhaps adding a "/show job-id" command after the last preview arrives if X seconds passed and the final url is not available (as suggested in one of the posts)?
Expected behavior midjourney client should succeed to "imagine" images in as many cases as possible. If enabling DM generation solves this problem, supporting that (at least as an option) can fix this problem.
Screenshots
error log
not applicable