Git Product home page Git Product logo

midjourney_api's People

Contributors

george-iam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

midjourney_api's Issues

Questions about submitting reference drawings

When adding a picture as a reference picture, the parameters are abnormal.
For example submitted is:
https://cdn.discordapp.com/attachments/1097388640411320393/1112334804248186970/girl.jpg a girl
The output is:
https:cdndiscordappcomattachments10973886404113203931112334804248186970girljpg a girl --seed 1721528761 --ar 3:4 --q 1.0 --stylize 100 --v 5.1
Obviously, image links are filtered out of symbols.

Then I repaired the sender, and I was able to submit tasks with pictures correctly, and pictures were created on Discord, but I couldn’t return to the page.

Can I sponsor this project?

I am very interested in this project. Can it be run directly now? Where should I contact you if I want to sponsor this project?

I am very interested in this project. Can it be run directly now? Where should I contact you if I want to sponsor this project?

how to get sender_params.json

how to get sender_params.json ,
the below values:
"channelid": "", "authorization": "", "application_id": "", "guild_id": "", "session_id": "", "version": "", "id": "",

error while run receiver.py

Thanks for your great work.
i meat some bug while run receiver.py,hope you can provide some help about this.
below is the error information When I start receiver.py:

=========== listening started ===========
urllib3.exceptions.SSLError: EOF occurred in violation of protocol (_ssl.c:1129)

The above exception was the direct cause of the following exception:

urllib3.exceptions.ProxyError: ('Unable to connect to proxy', SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 486, in send
resp = conn.urlopen(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 844, in urlopen
retries = retries.increment(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='discord.com', port=443): Max retries exceeded with url: /api/v10/channels/1105683530970828873/messages?limit=100 (Caused by ProxyError('Unable to connect to proxy', SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\TemporaryFiles\Midjourney_api-main\receiver.py", line 130, in
receiver.main()
File "D:\TemporaryFiles\Midjourney_api-main\receiver.py", line 107, in main
self.collecting_results()
File "D:\TemporaryFiles\Midjourney_api-main\receiver.py", line 44, in collecting_results
message_list = self.retrieve_messages()
File "D:\TemporaryFiles\Midjourney_api-main\receiver.py", line 37, in retrieve_messages
r = requests.get(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 513, in send
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='discord.com', port=443): Max retries exceeded with url: /api/v10/channels/1105683530970828873/messages?limit=100 (Caused by ProxyError('Unable to connect to proxy', SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))))

UnboundLocalError: local variable 'status' referenced before assignment

When sending a new prompt, I see this error on the original terminal :
========================================= Traceback (most recent call last): File "/receiver.py", line 130, in <module> receiver.main() File "/receiver.py", line 107, in main self.collecting_results() File "/receiver.py", line 68, in collecting_results self.awaiting_list.loc[id] = [prompt, status] UnboundLocalError: local variable 'status' referenced before assignment

Is there any way I can fix it?

is there a way to reset midjourney settings in API

hi, thanks for the great work!
I want to reset the midjourney every time before I send a prompt for drawing. This is because I use a shared account and if anyone changed the settings (e.g., set a suffix to --niji 5), then I cannot use the "--v 5.1" model in this API due to conflict suffix.
image

Or if you have a better solution for this?

Thanks

Subscription required

I followed all of the instructions, but when it came to the final step of prompt generation, I get this message from Midjourney Bot on my discord. Do I need a plan?
Screenshot 2023-06-05 at 8 12 37 PM

Problems with receiver.py

Thank you first of all for this project. It is exactly what I need.
I have following Problems:

  1. I can't find the authorization key in my payload. Is it needed?

  2. When I start receiver.py I get following error:

=========== listening started =========== Traceback (most recent call last): File "/Users/matthias/Library/receiver.py", line 133, in <module> receiver.main() File "/Users/matthias/Library/receiver.py", line 110, in main self.collecting_results() File "/Users/matthias/Library/receiver.py", line 49, in collecting_results if (message['author']['username'] == 'Midjourney Bot') and ('**' in message['content']): TypeError: string indices must be integers

I wasn't able to solve it.

I hope you can help me!

How to use the "prompt"?

I just cloned the project and did all the settings based on your instructions. The received part seems to work, but the sender parts doesn’ t work(its processing for the whole time).

I used the command below.
python sender.py --params sender_params.json --prompt "/imagine art"

It would be great to help me figure that out.

How do I get the error text from Midjourney?

How do I get the error text? I can't find all the messages that are parsed from the discord - the script doesn't seem to see these messages... Very strange. Sorry for bad English
17 05-20 46 41
17 05-20 46 11

UnboundLocalError: cannot access local variable 'status' where it is not associated with a value

Whenever I send a prompt, it gets detected by the receiver and shows "Waiting to start" as status, but a moment later I get the following error:

prompts in progress:
prompt status
1199706074954080277 a face ,ultrarealistic photography, cinematic ... Waiting to start

Traceback (most recent call last):
File "C:\Users\User\Documents\video-generation\server\MJ_API\receiver.py", line 130, in
receiver.main()
File "C:\Users\User\Documents\video-generation\server\MJ_API\receiver.py", line 107, in main
self.collecting_results()
File "C:\Users\User\Documents\video-generation\server\MJ_API\receiver.py", line 75, in collecting_results
self.awaiting_list.loc[id] = [prompt, status]
^^^^^^
UnboundLocalError: cannot access local variable 'status' where it is not associated with a value

I've seen someone with a similar issue where the solution was to change the model version to leave it at --v 5, but it didn't work for me.

TimeoutError: [Errno 60] Operation timed out

python /Users/nihao/Desktop/mycode/python/Midjourney/Midjourney_api/sender.py --params /Users/nihao/Desktop/mycode/python/Midjourney/Midjourney_api/sender_params.json --prompt 'a pig'
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
TimeoutError: [Errno 60] Operation timed out

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.