Midjourney-mini
Collection
2 items
•
Updated
Midjourney-mini is a free artificial intelligence model that can create realistic images based on textual descriptions. It has the following advantages:
Although Midjoureymini is a trimmed-down version of the paid MIjdoureny modle, it still provides powerful functionality and can be used in various applications.
from diffusers import DiffusionPipeline
pipeline = DiffusionPipeline.from_pretrained("midjourney-community/midjourney-mini")
import gradio as gr
gr.Interface.load("models/midjourney-community/midjourney-mini").launch()
import requests
API_URL = "https://api-inference.huggingface.co/models/midjourney-community/midjourney-mini"
headers = {"Authorization": "Bearer hf_token"}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.content
image_bytes = query({
"inputs": "Astronaut riding a horse",
})
async function query(data) {
const response = await fetch(
"https://api-inference.huggingface.co/models/midjourney-community/midjourney-mini",
{
headers: { Authorization: "Bearer hf_token" },
method: "POST",
body: JSON.stringify(data),
}
);
const result = await response.blob();
return result;
}
query({"inputs": "Astronaut riding a horse"}).then((response) => {
// Use image
});