useapi / midjourney-api-client Goto Github PK
View Code? Open in Web Editor NEWPython client library for Midjourney API by useapi.net
Home Page: https://useapi.net
Python client library for Midjourney API by useapi.net
Home Page: https://useapi.net
It could be possible to extend useapi with recently added Character Reference feature from midjourney?
Any clue why I am getting following error ?
2024-03-26T20:40:19CET: https://cdn.discordapp.com/attachments/1222206121834582160/1222265765936500796/miroslavvranka_Photo_selfie_of_45-year-old_American_male_ce57b1e7-311c-4a4b-9b84-d8b3a66ac831.png?ex=661596b3&is=660321b3&hm=7161effc3d59197774d4b6e43de5ec56b6007c45aabc5dc4e98b6ece9baaaca1& url
2024-03-26T20:40:19CET: buttons ['U1', 'U2', 'U3', 'U4', '๐', 'V1', 'V2', 'V3', 'V4'] buttons
2024-03-26T20:40:20CET: Exception when calling jobs_button_post: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Date': 'Tue, 26 Mar 2024 19:40:20 GMT', 'Content-Type': 'application/json', 'Content-Length': '117', 'Connection': 'keep-alive', 'Report-To': '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=AR%2FMmnXmHEF2sPfke3Iu6nbid12k902FGaWkJLtgVmaseryacvpkeZZBCLEz6EpR8yLI1%2BUB%2BqW93YW4zRCSUlA0NfV%2BxxNjkahbZrJAfGbgkXA9ZZhhZ72zX%2F27cBUphQ%3D%3D"}],"group":"cf-nel","max_age":604800}', 'NEL': '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}', 'Vary': 'Accept-Encoding', 'Server': 'cloudflare', 'CF-RAY': '86a99c9edb230a69-AMS', 'alt-svc': 'h3=":443"; ma=86400'})
HTTP response body: {"error":"Button U3 not found in job ***************** buttons ","code":400}
when I am running imagine + command fnc in attached process_prompts() below in 2 threads ?
def process_prompts(prompts_df):
df = pandas.read_csv(prompts_df)
random_digit = random.choice([i for i in range(1, 7)])
random_command = random.choice([f"U{i}" for i in range(1, 5)])
for index, row in df.iterrows():
log_api.info(f"triggered prompt >>> {row['Prompt']} <<")
mjc.imagine_command(row['Prompt'])
try:
mjc.button_command(random_command)
except ValidationError as ve:
log_api.error(f"Validation error occurred: {ve}")
except Exception as e:
log_api.error(f"An unexpected error occurred: {e}")
df.at[index, 'PromptCalled'] = True
log_api.info(f"prompt >>> {row['Prompt']} << is done! ")
time.sleep(random_digit)
if __name__ == "__main__":
prompts_df = [prompts_1, prompts_2]
with ThreadPoolExecutor(max_workers=2) as executor:
resp = executor.map(process_prompts, prompts_df)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.