--- license: apache-2.0 library_name: diffusers pipeline_tag: image-to-image tags: - image-editing - multi-image - diffusers - joyai base_model: - Qwen/Qwen3-VL-8B-Instruct --- # JD Open Source - Open Technology, Shared Future. [中文](./README_CN.md) ## Our Mission We are dedicated to empowering developers and enterprises through open technology, collectively building an efficient, reliable, and innovative tech ecosystem. We believe that open source is a bridge connecting technology with the community, accelerating technological accessibility and value creation. ## Our Governance Our open-source projects operate under a transparent governance model, ensuring their healthy and sustainable growth. We are guided by: - Open Decision-Making: All major technical decisions are openly discussed within the community. We welcome feedback and suggestions from everyone. - Meritocracy: Roles and permissions are based on an individual's contributions to the project. Anyone who consistently contributes has the opportunity to become a core maintainer. - Code of Conduct: We strictly adhere to our Code of Conduct to ensure a friendly, inclusive, and respectful community for all. ## How to Get Involved We welcome everyone with a passion for technology to join our community, whether you are a seasoned developer or just starting out. Here are a few ways you can contribute: - Submit an Issue: Found a bug or have a new feature idea? Feel free to open an issue in our project repositories. - Contribute Code: Submit your code fixes or new features via a Pull Request. Please read the project's contribution guide first. - Improve Documentation: Help us translate or improve our documentation to benefit more users. - Join the Discussion: Participate in our community forums or chat groups to share your thoughts and experiences. ## Our Projects You can find all our open-source projects here https://github.com/jd-opensource, or visit our homepage for more information. ## Contact Us org.ospo1@jd.com # JoyAI-Image Edit Plus JoyAI-Image Edit Plus is a multi-image instruction-guided editing model from the [JoyAI-Image](https://github.com/jd-opensource/JoyAI-Image) family. It accepts **multiple reference images** and a text instruction to generate a new image that combines elements from the references according to the instruction. ## Model Architecture | Component | Model | Size | |-----------|-------|------| | Text Encoder | Qwen3-VL-8B-Instruct | 8B | | Transformer (MMDiT) | JoyImageEditPlusTransformer3DModel | 16B | | VAE | AutoencoderKLWan | 240M | | Scheduler | FlowMatchEulerDiscreteScheduler | - | ## Installation `JoyImageEditPlusPipeline` has not yet been merged into the official diffusers release. Before it is available in a stable version, you need to install diffusers from the PR branch: ```bash pip install git+https://github.com/tangyanf/diffusers.git@add-joyimage-edit-plus ``` If you have already installed diffusers, make sure to uninstall it first: ```bash pip uninstall diffusers -y pip install git+https://github.com/tangyanf/diffusers.git@add-joyimage-edit-plus ``` Once the PR is merged into the official diffusers repository, you can switch back to the standard installation: ```bash pip install diffusers --upgrade ``` ## Usage ```python import torch from PIL import Image from diffusers import JoyImageEditPlusPipeline pipe = JoyImageEditPlusPipeline.from_pretrained( "jdopensource/JoyAI-Image-Edit-Plus-Diffusers", torch_dtype=torch.bfloat16, ).to("cuda") # Load reference images images = [ Image.open("reference_0.png").convert("RGB"), Image.open("reference_1.png").convert("RGB"), ] # Determine output resolution from the last reference image target_h, target_w = pipe.vae_image_processor.get_default_height_width(images[-1]) # Generate result = pipe( images=images, prompt="Combine the person from the second image with the scene from the first image.", negative_prompt="low quality, blurry, deformed", height=target_h, width=target_w, num_inference_steps=30, guidance_scale=4.0, generator=torch.Generator(device="cuda").manual_seed(42), ) result.images[0].save("output.png") ``` ## Example **Prompt:** "The woman is lovingly holding the cute puppy in her arms" | Input 0 | Input 1 | Output | |---------|---------|--------| | ![input_0](examples/input_0.png) | ![input_1](examples/input_1.png) | ![output](examples/output.png) | ## Recommended Parameters | Parameter | Value | |-----------|-------| | `num_inference_steps` | 30 | | `guidance_scale` | 4.0 | | `torch_dtype` | `torch.bfloat16` | | Resolution | Auto-detected via `vae_image_processor.get_default_height_width()` (1024-base buckets) | ## CLI Inference ```bash python inference.py \ --model_path jdopensource/JoyAI-Image-Edit-Plus-Diffusers \ --images examples/input_0.png examples/input_1.png \ --prompt "The woman is lovingly holding the cute puppy in her arms" \ --num_inference_steps 30 \ --guidance_scale 4.0 \ --seed 42 \ --output output.png ``` ## Model Details - **Developed by**: Sky Meilin - **License**: Apache-2.0 - **Diffusers version**: >= 0.39.0 - **Framework**: PyTorch ## Citation ```bibtex @misc{joyai-image-2025, title={JoyAI-Image: A Unified Multimodal Foundation Model for Image Understanding, Generation, and Editing}, author={Joy Future Academy, JD}, year={2025}, url={https://github.com/jd-opensource/JoyAI-Image} } ```