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

TypeError: Cannot read properties of undefined (reading 'model') #15

Open
nalnir opened this issue May 21, 2023 · 2 comments
Open

TypeError: Cannot read properties of undefined (reading 'model') #15

nalnir opened this issue May 21, 2023 · 2 comments

Comments

@nalnir
Copy link

nalnir commented May 21, 2023

I've seen the same error in 2 other issues that are closed, but circumstances are different for me when getting the error.
First I tried to generate 2 images by setting optional "num_outputs: 2" and the error happened for the first time so I stuck to just one image generation and it worked couple of times, but then the error happened again. Now its just the same error all the time.

@oelin
Copy link
Owner

oelin commented May 22, 2023

I'll try and see if I can reproduce this error. Also note that on the Replicate page for Openjourney only 1 and 4 are valid values for the num_outputs parameter.

@nalnir
Copy link
Author

nalnir commented May 22, 2023

Ah ok, yeah I see that now. Thanks for pointing that out. Hopefully this error will get resolved. I am using typescript btw and created my own midjourney-client.d.ts

declare module 'midjourney-client' 
{
    type MidjourneyResponse = string[];
  
    interface MidjourneyOptions {
      width?: number;
      heigth?: number;
      num_outputs?: number;
      num_inference_steps?: number;
      guidance_scale?: number;
      seed?: number;
    }
  
    interface MidjourneyClient {
      (input: string, options?: MidjourneyOptions): Promise<MidjourneyResponse>;
    }
  
    const midjourney: MidjourneyClient;
  
    export default midjourney;
  }

It did work well with using it couple of times, but now, the same error persists.

@nalnir nalnir closed this as completed May 22, 2023
@nalnir nalnir reopened this May 22, 2023
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