iitolstykh commited on
Commit
2fe57cc
·
verified ·
1 Parent(s): 86bba3f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +51 -0
README.md CHANGED
@@ -47,6 +47,57 @@ library_name: diffusers
47
  - **High-Speed Inference:** Utilizes Sana1.5's linear attention mechanism for rapid generation.
48
  - **Multimodal Understanding:** Qwen3-VL ensures strong alignment between visual content and text instructions.
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  ## Citation
51
 
52
  If you use this model in your research or applications, please acknowledge the original projects:
 
47
  - **High-Speed Inference:** Utilizes Sana1.5's linear attention mechanism for rapid generation.
48
  - **Multimodal Understanding:** Qwen3-VL ensures strong alignment between visual content and text instructions.
49
 
50
+
51
+ # Inference Requirements
52
+
53
+ - `vibe` library
54
+ ```bash
55
+ pip install git+https://github.com/ai-forever/VIBE
56
+ ```
57
+ - requirements for `vibe` library:
58
+ ```bash
59
+ pip install transformers==4.57.1 torchvision==0.21.0 torch==2.6.0 diffusers==0.33.1 loguru==0.7.3
60
+ ```
61
+
62
+ # Quick start
63
+
64
+ ```python
65
+ from PIL import Image
66
+ import requests
67
+ from io import BytesIO
68
+ from huggingface_hub import snapshot_download
69
+
70
+ from vibe.editor import ImageEditor
71
+
72
+ # Download model
73
+ model_path = snapshot_download(
74
+ repo_id="iitolstykh/VIBE-Image-Edit",
75
+ repo_type="model",
76
+ )
77
+
78
+ # Load model
79
+ editor = ImageEditor(
80
+ checkpoint_path=model_path,
81
+ image_guidance_scale=1.2,
82
+ guidance_scale=4.5,
83
+ num_inference_steps=20,
84
+ device="cuda:0",
85
+ )
86
+
87
+ # Download test image
88
+ resp = requests.get('https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/3f58a82a-b4b4-40c3-a318-43f9350fcd02/original=true,quality=90/115610275.jpeg')
89
+ image = Image.open(BytesIO(resp.content))
90
+
91
+ # Generate edited image
92
+ edited_image = editor.generate_edited_image(
93
+ instruction="let this case swim in the river",
94
+ conditioning_image=image,
95
+ num_images_per_prompt=1,
96
+ )[0]
97
+
98
+ edited_image.save(f"edited_image.jpg", quality=100)
99
+ ```
100
+
101
  ## Citation
102
 
103
  If you use this model in your research or applications, please acknowledge the original projects: