Views
No views yet
| Package | Version | Purpose |
|---|---|---|
torch | >= 2.8 | PyTorch |
transformers | >= 4.57.0, < 4.58.0 | Text encoder |
torchvison | - | Image process |
einops | - | Tensor manipulation |
pip install git+https://github.com/huggingface/diffusers.git@refs/pull/13444/head1pip install torch==2.8 transformers==4.57.6 torchvision einops
2
3pip install git+https://github.com/Moran232/diffusers.git@joyimage_edit1import torch
2from PIL import Image
3
4from diffusers import JoyImageEditPipeline
5
6pipeline = JoyImageEditPipeline.from_pretrained("jdopensource/JoyAI-Image-Edit-Diffusers")
7pipeline.to(torch.bfloat16)
8pipeline.to("cuda")
9pipeline.set_progress_bar_config(disable=None)
10print("pipeline loaded")
11
12img_path = "./test_images/input.png"
13prompt = "Move the board into the red box and finally remove the red box."
14
15image = Image.open(img_path).convert("RGB")
16prompts = [f"<|im_start|>user\n<image>\n{prompt}<|im_end|>\n"]
17
18inputs = {
19 "image": image,
20 "prompt": prompts,
21 "generator": torch.manual_seed(0),
22 "num_inference_steps": 30,
23 "guidance_scale": 4.0,
24}
25
26print("run pipeline...")
27
28with torch.inference_mode():
29 output = pipeline(**inputs)
30 image = output.images[0]
31 image.save("joyai_image_edit_output.png")
32 print("image saved.")
33Move the <object> into the red box and finally remove the red box.<object> with a clear description of the target object to be moved.Move the board into the red box and finally remove the red box.

Rotate the <object> to show the <view> side view.<view> values:frontrightleftrearfront rightfront leftrear rightrear left<object> with a clear description of the object to rotate.<view> with one of the supported directions above.Rotate the dog to show the left side view.

1Move the camera.
2- Camera rotation: Yaw {y_rotation}°, Pitch {p_rotation}°.
3- Camera zoom: in/out/unchanged.
4- Keep the 3D scene static; only change the viewpoint.{y_rotation} specifies the yaw rotation angle in degrees.{p_rotation} specifies the pitch rotation angle in degrees.Camera zoom must be one of:inoutunchanged1Move the camera.
2- Camera rotation: Yaw 45°, Pitch 0°.
3- Camera zoom: in.
4- Keep the 3D scene static; only change the viewpoint.1Move the camera.
2- Camera rotation: Yaw 0.0°, Pitch -15.0°.
3- Camera zoom: unchanged.
4- Keep the 3D scene static; only change the viewpoint.
