openjourney

mdjrny-v4
Published 86 days ago

OpenJourney is a text-to-image AI model based on prompthero/midjourney-v4-diffusion and is currently under development by Muhammadreza Haghiri. The main goal of this model is to bring a simple yet effective way of bringing Midjourney style images to the FLOSS world.

NOTE: This model currently works on a computer which has at least one NVIDIA GPU with CUDA support.

pip install diffusers transformers ftfy scipy accelerate

For logging in, you have to use huggingface-cli login command.

1
2
3
4
import torch
from torch import autocast
from diffusers.models import AutoencoderKL
from diffusers import StableDiffusionPipeline
pipe = StableDiffusionPipeline.from_pretrained("openjourney/openjourney", use_auth_token=True)
pipe = pipe.to("cuda")

NOTE: Remember disabling this is not recommended, but since people had problems with some very basic prompts, we offer this. Remember AI art has a vast majority of users, so keep underage and sensitive users safe.

1
2
3
4
def dummy(images, **kwargs): 
	return images, False
			
pipe.safety_checker = dummy
1
2
3
4
5
6
7
prompt = "painting of a building in a stunning landscape"
prompt = f"mdjrny-v4 style {prompt}"

with autocast("cuda"):
  image = pipe(prompt=prompt, num_inference_steps=100, width=512, height=512, guidance_scale=15).images[0]
  
image.save("image.png")

website

Keywords
diffusers
text-to-image
Install
aimm add mdjrny-v4
Version
mdjrny-v4
Published
86 days ago
License
creativeml-openrail-m
Unpacked Size
1.99 GB
Total Files
1