Instructions to use yijunwang2/krea2-outpaint with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use yijunwang2/krea2-outpaint with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("krea/Krea-2-Turbo", torch_dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("yijunwang2/krea2-outpaint") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
brightness boundary between the original image and the outpainted area
For those brighter pictures, there is an obvious brightness boundary between the original image and the outpainted area. How can I fix this issue?
Maybe try another seed to see whether this always happens to the same image - or can you share the image and prompt?
Thanks for the feedback, I gave it a test from my end - the logic is resizing the original image to target width/height size, say 1024 pixel height on the lady's image and then outpaint on the canvas say 1024x1536 in my case.
I think a possible quick fix is to try using the same resolution to see whether it works, as my training data is at ~1024 pixel level. If that is the cause, then i may think to train that on higher pixel data and see whether it improves.
Thank you so much for your reply—I'll give your suggestions another try. And thanks again for sharing this , it's really awesome! it would be perfect if it could support higher-resolution images in the future.




