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

Vary Strong + Remix #247

Closed
tglanz opened this issue Nov 29, 2023 · 1 comment
Closed

Vary Strong + Remix #247

tglanz opened this issue Nov 29, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@tglanz
Copy link

tglanz commented Nov 29, 2023

the code that reproduces this issue or a replay of the bug

const { Midjourney } = require("midjourney");

async function main() {
    const client = new Midjourney({
        ServerId: '<server>',
        ChannelId: '<channel>',
        SalaiToken: '<token>',
        Ws: true,
    });

    const prompt1 = "A red boat --version 5.2 --turbo";
    const prompt2 = "A red boat with a big sail --version 5.2 --turbo";

    try {
        await client.init();

        const imagineResult = await client.Imagine(prompt1);
        const upscaleResult = await client.Upscale({
            index: 1,
            msgId: imagineResult.id,
            hash: imagineResult.hash,
            flags: imagineResult.flags,
        })

        const varyStrong = upscaleResult.options.find(option => option.label === "Vary (Strong)");

        await client.Custom({
            msgId: imagineResult.id,
            content: prompt2,
            flags: imagineResult.flags,
            customId: varyStrong.custom,
        });
    } catch (err) {
        console.error(err);
    } finally {
        client.Close();
    }
}

main()
    .then(() => console.log("done"))
    .catch(err => console.error(err));

Describe the bug

Describe the bug

I try to invoke a custom action, using the Custom API, in Remix mode, on an Upscaled image.

The specific actions I tried to do this on are Vary (Strong) and Vary (Subtle).

I specifically need to invoke this on the Upscaled image and have control on the Strong/Subtle options.

Model version is 5.2.

Getting the error:

Error: CustomApi failed with status 400
    at Midjourney.Custom (remix-example/node_modules/midjourney/libs/midjourney.js:216:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async main (remix-example.js:36:9)

Expected behavior

Apply the Vary (Strong) action on the Upscaled image indexed 1, including the provided prompt.

Additional Info

If I use the V1 action on the Imagined image (rather than the Upscaled) it works.

My midjourney is

    "midjourney": "^4.3.13"

error log

api.error.config {
  payload: '{"type":3,"nonce":"<REDACTED>","guild_id":"<REDACTED>","channel_id":"<REDACTED>","message_flags":0,"message_id":"1179458619717201971","application_id":"<REDACTED>","session_id":"<REDACTED>","data":{"component_type":2,"custom_id":"MJ::JOB::high_variation::1::5798b9cb-2a9a-40d0-b1e2-fb0b12cd955e::SOLO"}}',
  config: {
    BotId: '<REDACTED>',
    ChannelId: '<REDACTED>',
    SalaiToken: '<REDACTED>',
    ApiInterval: 350,
    SessionId: '<REDACTED>',
    Debug: false,
    Limit: 50,
    Ws: true,
    MaxWait: 200,
    ImageProxy: '',
    DiscordBaseUrl: 'https://discord.com',
    WsBaseUrl: 'wss://gateway.discord.gg/?encoding=json&v=9',
    fetch: [Function: fetch],
    WebSocket: <ref *1> [class WebSocket extends EventEmitter] {
      CONNECTING: 0,
      OPEN: 1,
      CLOSING: 2,
      CLOSED: 3,
      createWebSocketStream: [Function: createWebSocketStream],
      Server: [class WebSocketServer extends EventEmitter],
      Receiver: [class Receiver extends Writable],
      Sender: [class Sender],
      WebSocket: [Circular *1],
      WebSocketServer: [class WebSocketServer extends EventEmitter]
    },
    ServerId: '<REDACTED>',
    Remix: true
  }
}
@tglanz tglanz added the bug Something isn't working label Nov 29, 2023
@tglanz tglanz closed this as completed Nov 30, 2023
@tglanz tglanz reopened this Nov 30, 2023
@tglanz
Copy link
Author

tglanz commented Nov 30, 2023

This isn't the issue exactly. Opened more accurate Issue: #248

@tglanz tglanz closed this as completed Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant