Instructions to use prompthero/openjourney with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use prompthero/openjourney with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("prompthero/openjourney", 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
Error in Inpaint Pipeline
Thanks for your great work. I'm not sure if this model was intended to be used in this pipeline, but the below error occurred when trying to use pipe = StableDiffusionInpaintPipeline.from_pretrained(...model...)
ValueError: Incorrect configuration settings! The config of `pipeline.unet`: FrozenDict([('sample_size', 32), ('in_channels', 4), ('out_channels', 4), ('center_input_sample', False), ('flip_sin_to_cos', True), ('freq_shift', 0), ('down_block_types', ['CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'DownBlock2D']), ('up_block_types', ['UpBlock2D', 'CrossAttnUpBlock2D', 'CrossAttnUpBlock2D', 'CrossAttnUpBlock2D']), ('block_out_channels', [320, 640, 1280, 1280]), ('layers_per_block', 2), ('downsample_padding', 1), ('mid_block_scale_factor', 1), ('act_fn', 'silu'), ('norm_num_groups', 32), ('norm_eps', 1e-05), ('cross_attention_dim', 768), ('attention_head_dim', 8), ('_class_name', 'UNet2DConditionModel'), ('_diffusers_version', '0.8.0.dev0'), ('_name_or_path', '/root/.cache/huggingface/diffusers/models--prompthero--openjourney/snapshots/c187919d42cc45f7035ca0232a357d2dffc02882/unet')]) expects 4 but received `num_channels_latents`: 4 + `num_channels_mask`: 1 + `num_channels_masked_image`: 4 = 9. Please verify the config of `pipeline.unet` or your `mask_image` or `image` input.
i'm getting this error too. were you able to find a solution?
It is because you need to use an inpainting model such as "stabilityai/stable-diffusion-2-inpainting". If you use a model meant for Text to Image & Image to Image, it won't work.
How do I fine tune an inpainting model using Dreambooth? Same as fine tuning a regular Stable Diffusion model? I initially fine tuned a Stable Diffusion model on my photos using Dreambooth. I want to use inpainting with this model to edit and improve the generations. Thanks!