Moran232 commited on
Commit
a144dfe
·
verified ·
1 Parent(s): 4d475e9

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +6 -22
README.md CHANGED
@@ -27,26 +27,13 @@ JoyAI-Image-Edit is a multimodal foundation model specialized in instruction-gui
27
 
28
  **Requirements**: Python >= 3.10, CUDA-capable GPU
29
 
30
- ### Core Dependencies
31
- The transformers version must be **between 4.57 and 4.58**; otherwise, incorrect results may occur.
32
- | Package | Version | Purpose |
33
- |---------|---------|---------|
34
- | `torch` | >= 2.8 | PyTorch |
35
- | `transformers` | >= 4.57.0, < 4.58.0 | Text encoder |
36
- | `torchvison` | - |Image process|
37
-
38
- ### Install the [Pull Request](https://github.com/huggingface/diffusers/pull/13444]) of JoyAI-Image-Edit of diffusers
39
- ```bash
40
- pip install git+https://github.com/huggingface/diffusers.git@refs/pull/13444/head
41
- ```
42
 
43
- ### Or install from this repo (PR will merge to diffusers main branch soon)
44
  ```bash
45
- pip install torch==2.8 transformers==4.57.6 torchvision
46
-
47
- pip install git+https://github.com/Moran232/diffusers.git@joyimage_edit
48
  ```
49
-
50
  ### Running with Diffusers
51
  ```python
52
  import torch
@@ -62,15 +49,13 @@ print("pipeline loaded")
62
 
63
  img_path = "./test_images/input.png"
64
  prompt = "Remove the construction structure from the top of the crane."
65
-
66
  image = Image.open(img_path).convert("RGB")
67
- prompts = [f"<|im_start|>user\n<image>\n{prompt}<|im_end|>\n"]
68
 
69
  inputs = {
70
  "image": image,
71
- "prompt": prompts,
72
  "generator": torch.manual_seed(0),
73
- "num_inference_steps": 30,
74
  "guidance_scale": 4.0,
75
  }
76
 
@@ -81,7 +66,6 @@ with torch.inference_mode():
81
  image = output.images[0]
82
  image.save("joyai_image_edit_output.png")
83
  print("image saved.")
84
-
85
  ```
86
 
87
 
 
27
 
28
  **Requirements**: Python >= 3.10, CUDA-capable GPU
29
 
30
+ ### Install
31
+ Note: JoyImageEditPipeline will be included in the next official diffusers release (>0.38.0). Until then, install from source as shown above.
 
 
 
 
 
 
 
 
 
 
32
 
 
33
  ```bash
34
+ pip install torch transformers torchvision
35
+ pip install git+https://github.com/huggingface/diffusers.git
 
36
  ```
 
37
  ### Running with Diffusers
38
  ```python
39
  import torch
 
49
 
50
  img_path = "./test_images/input.png"
51
  prompt = "Remove the construction structure from the top of the crane."
 
52
  image = Image.open(img_path).convert("RGB")
 
53
 
54
  inputs = {
55
  "image": image,
56
+ "prompt": prompt,
57
  "generator": torch.manual_seed(0),
58
+ "num_inference_steps": 40,
59
  "guidance_scale": 4.0,
60
  }
61
 
 
66
  image = output.images[0]
67
  image.save("joyai_image_edit_output.png")
68
  print("image saved.")
 
69
  ```
70
 
71