Instructions to use openskyml/midjourney-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use openskyml/midjourney-mini with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("openskyml/midjourney-mini", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
|
Download README.md from openskyml/midjourney-mini: direct link, hf CLI and curl.
- Browser
- Download file 1.97 kB
-
https://huggingface.co/openskyml/midjourney-mini/resolve/main/README.md
- Command line
-
hf download hf://openskyml/midjourney-mini/README.md
-
curl -L -o README.md https://huggingface.co/openskyml/midjourney-mini/resolve/main/README.md
1.97 kB
metadata
license: mit
tags:
- midjourney
- midjourney-mini
- openskyml
pinned: true
language:
- en
- ru
- de
- fr
library_name: diffusers
pipeline_tag: text-to-image
Midjourney-mini
Description
Midjourney-mini is a free artificial intelligence model that can create realistic images based on textual descriptions. It has the following advantages:
- Free: Midjourney-mini is completely free to use for anyone.
- High-quality image generation: The model uses modern deep learning methods to create high-quality images.
- Ease of use: Working with Midjourney-mini does not require special programming or machine learning knowledge. The model has a convenient interface and works in your browser.
Although Midjoureymini is a trimmed-down version of the paid MIjdoureny modle, it still provides powerful functionality and can be used in various applications.
Use
In Diffusers
from diffusers import DiffusionPipeline
pipeline = DiffusionPipeline.from_pretrained("midjourney-community/midjourney-mini")
Deploy in Spaces
import gradio as gr
gr.Interface.load("models/midjourney-community/midjourney-mini").launch()
Deploy in Inference API
import requests
API_URL = "https://huggingface.co/static-proxy/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://huggingface.co/static-proxy/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
});