liyangbing commited on
Commit
6000ff1
·
1 Parent(s): 6877160

image edit

Browse files
Files changed (2) hide show
  1. README.md +2 -2
  2. index.html +38 -34
README.md CHANGED
@@ -1,11 +1,11 @@
1
  ---
2
- title: Qwen Image
3
  emoji: 💻
4
  colorFrom: blue
5
  colorTo: gray
6
  sdk: static
7
  pinned: false
8
- short_description: QwenImage
9
  ---
10
 
11
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: Qwen Image Edit
3
  emoji: 💻
4
  colorFrom: blue
5
  colorTo: gray
6
  sdk: static
7
  pinned: false
8
+ short_description: QwenImageEdit
9
  ---
10
 
11
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -3,20 +3,20 @@
3
  <head>
4
  <meta charset="utf-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Qwen-Image - Advanced Text-to-Image Generation by Alibaba Cloud</title>
7
- <meta name="description" content="Qwen-Image: Part of the Qwen (Tongyi Qianwen) model series by Alibaba Cloud. A powerful text-to-image generative model that creates stunning images from text prompts with high-quality rendering, artistic style control, and exceptional detail." />
8
- <meta name="keywords" content="Qwen-Image, Qwen, Tongyi Qianwen, Alibaba Cloud, Text-to-Image, AI Models, Prompt Engineering, Image Generation, AI Art, Generative AI, Image Synthesis, Multimodal AI" />
9
 
10
  <!-- Open Graph / Social Media Meta Tags -->
11
- <meta property="og:title" content="Qwen-Image - Advanced Text-to-Image Generation by Alibaba Cloud" />
12
- <meta property="og:description" content="Transform your text into stunning images with Qwen-Image, part of the Tongyi Qianwen model series developed by Alibaba Cloud" />
13
  <meta property="og:type" content="website" />
14
- <meta property="og:url" content="https://huggingface.co/Qwen/Qwen-Image" />
15
 
16
  <!-- Additional Meta Information -->
17
  <meta name="author" content="Alibaba Cloud Qwen Team" />
18
  <meta name="robots" content="index, follow" />
19
- <link rel="canonical" href="https://huggingface.co/Qwen/Qwen-Image" />
20
 
21
  <link rel="stylesheet" href="style.css" />
22
  </head>
@@ -25,10 +25,10 @@
25
  <div class="nav-content">
26
  <div class="nav-logo">QWEN</div>
27
  <div class="nav-links">
28
- <a href="https://wavespeed.ai/models/wavespeed-ai/qwen-image/text-to-image" class="nav-link" target="_blank" rel="noopener noreferrer">Home</a>
29
  <a href="https://wavespeed.ai/docs" class="nav-link" target="_blank" rel="noopener noreferrer">Documentation</a>
30
  <a href="https://wavespeed.ai/blog" class="nav-link" target="_blank" rel="noopener noreferrer">Blog</a>
31
- <a href="https://wavespeed.ai/models/wavespeed-ai/qwen-image/text-to-image" class="nav-button" target="_blank" rel="noopener noreferrer">Visit WaveSpeedAI →</a>
32
  </div>
33
  </div>
34
  </nav>
@@ -36,14 +36,14 @@
36
  <div class="container">
37
  <div class="content">
38
  <div class="logo-section">
39
- <h1>Qwen-Image</h1>
40
  <p class="subtitle">By Alibaba Cloud Qwen Team</p>
41
  </div>
42
 
43
  <div class="announcement-section">
44
- <p class="announcement">Qwen-Image is now available!</p>
45
  <div class="divider"></div>
46
- <p class="description">Open-source Advanced Text-to-Image Generative Model</p>
47
  </div>
48
 
49
  <div class="hero-image">
@@ -52,7 +52,7 @@
52
 
53
  <section class="intro-section">
54
  <h2>Introduction</h2>
55
- <p>We are thrilled to release Qwen-Image, an image generation foundation model in the Qwen series that achieves significant advances in complex text rendering and precise image editing. Experiments show strong general capabilities in both image generation and editing, with exceptional performance in text rendering, especially for Chinese.</p>
56
  <div class="benchmark-image">
57
  <img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/bench.png" alt="Qwen-Image Benchmark" class="full-width-img">
58
  </div>
@@ -61,7 +61,7 @@
61
  <div class="features-section">
62
  <div class="feature">
63
  <h3>🚀 Multimodal AI Capabilities</h3>
64
- <p>Part of the Qwen (Tongyi Qianwen) model series, offering powerful text-to-image generation with exceptional understanding of complex prompts</p>
65
  </div>
66
 
67
  <div class="feature">
@@ -79,7 +79,7 @@
79
  <p>Choose your preferred Qwen image model:</p>
80
 
81
  <h3>Option 1: Using the latest Qwen VLo model</h3>
82
- <p>The new Qwen VLo model supports both text-to-image and image-to-image generation with progressive generation feature.</p>
83
  <div class="code-block">
84
  <pre><code>pip install dashscope>=1.20.7</code></pre>
85
  </div>
@@ -90,14 +90,15 @@ from dashscope import ImageSynthesis
90
  # Set your API key
91
  dashscope.api_key = "YOUR_API_KEY"
92
 
93
- # Text-to-image generation
94
  response = ImageSynthesis.call(
95
  model='qwen-vlo',
96
- prompt='A coffee shop entrance features a chalkboard sign reading "Qwen Coffee 😊 $2 per cup"',
97
  negative_prompt='blurry, low quality',
98
  n=1, # Number of images to generate
99
  size='1024*1024', # Image size
100
- steps=50 # Diffusion steps
 
101
  )
102
 
103
  # Save the generated image
@@ -109,7 +110,7 @@ else:
109
  print(f'Failed to generate image: {response.message}')</code></pre>
110
  </div>
111
 
112
- <h3>Option 2: Using Qwen-Image with diffusers</h3>
113
  <p>Install the latest version of diffusers</p>
114
  <div class="code-block">
115
  <pre><code>pip install git+https://github.com/huggingface/diffusers</code></pre>
@@ -119,7 +120,7 @@ else:
119
  <pre><code>from diffusers import DiffusionPipeline
120
  import torch
121
 
122
- model_name = "Qwen/Qwen-Image"
123
 
124
  # Load the pipeline
125
  if torch.cuda.is_available():
@@ -137,8 +138,11 @@ positive_magic = {
137
  "zh": "超清,4K,电影级构图" # for chinese prompt
138
  }
139
 
140
- # Generate image
141
- prompt = '''A coffee shop entrance features a chalkboard sign reading "Qwen Coffee 😊 $2 per cup," with a neon light beside it displaying "通义千问". Next to it hangs a poster showing a beautiful Chinese woman, and beneath the poster is written "π≈3.1415926-53589793-23846264-33832795-02384197". Ultra HD, 4K, cinematic composition'''
 
 
 
142
 
143
  negative_prompt = " "
144
 
@@ -156,9 +160,9 @@ width, height = aspect_ratios["16:9"]
156
  image = pipe(
157
  prompt=prompt + positive_magic["en"],
158
  negative_prompt=negative_prompt,
159
- width=width,
160
- height=height,
161
  num_inference_steps=50,
 
162
  true_cfg_scale=4.0,
163
  generator=torch.Generator(device="cuda").manual_seed(42)
164
  ).images[0]
@@ -172,8 +176,8 @@ image.save("example.png")</code></pre>
172
 
173
  <div class="showcase-item-full">
174
  <div class="showcase-description-full">
175
- <h3>Superior Text Rendering</h3>
176
- <p>One of its standout capabilities is high-fidelity text rendering across diverse images. Whether it's alphabetic languages like English or logographic scripts like Chinese, Qwen-Image preserves typographic details, layout coherence, and contextual harmony with stunning accuracy. Text isn't just overlaid—it's seamlessly integrated into the visual fabric.</p>
177
  </div>
178
  <div class="showcase-image-full">
179
  <img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/s1.jpg" alt="Text Rendering Example" class="showcase-img-full">
@@ -182,8 +186,8 @@ image.save("example.png")</code></pre>
182
 
183
  <div class="showcase-item-full">
184
  <div class="showcase-description-full">
185
- <h3>Artistic Style Support</h3>
186
- <p>Beyond text, Qwen-Image excels at general image generation with support for a wide range of artistic styles. From photorealistic scenes to impressionist paintings, from anime aesthetics to minimalist design, the model adapts fluidly to creative prompts, making it a versatile tool for artists, designers, and storytellers.</p>
187
  </div>
188
  <div class="showcase-image-full">
189
  <img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/s2.jpg" alt="Artistic Styles Example" class="showcase-img-full">
@@ -192,8 +196,8 @@ image.save("example.png")</code></pre>
192
 
193
  <div class="showcase-item-full">
194
  <div class="showcase-description-full">
195
- <h3>Advanced Image Editing</h3>
196
- <p>When it comes to image editing, Qwen-Image goes far beyond simple adjustments. It enables advanced operations such as style transfer, object insertion or removal, detail enhancement, text editing within images, and even human pose manipulation—all with intuitive input and coherent output. This level of control brings professional-grade editing within reach of everyday users.</p>
197
  </div>
198
  <div class="showcase-image-full">
199
  <img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/s3.jpg" alt="Image Editing Example" class="showcase-img-full">
@@ -202,8 +206,8 @@ image.save("example.png")</code></pre>
202
 
203
  <div class="showcase-item-full">
204
  <div class="showcase-description-full">
205
- <h3>Image Understanding</h3>
206
- <p>But Qwen-Image doesn't just create or edit—it understands. It supports a suite of image understanding tasks, including object detection, semantic segmentation, depth and edge (Canny) estimation, novel view synthesis, and super-resolution. These capabilities, while technically distinct, can all be seen as specialized forms of intelligent image editing, powered by deep visual comprehension.</p>
207
  </div>
208
  <div class="showcase-image-full">
209
  <img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/s4.jpg" alt="Image Understanding Example" class="showcase-img-full">
@@ -211,14 +215,14 @@ image.save("example.png")</code></pre>
211
  </div>
212
 
213
  <div class="showcase-conclusion">
214
- <p>Together, these features make Qwen-Image not just a tool for generating pretty pictures, but a comprehensive foundation model for intelligent visual creation and manipulation—where language, layout, and imagery converge.</p>
215
  </div>
216
  </section>
217
 
218
  <div class="resource-links-section">
219
  <h2>Resources</h2>
220
  <div class="resource-links">
221
- <a href="https://huggingface.co/Qwen/Qwen-Image" target="_blank" rel="noopener noreferrer" class="resource-link">Qwen-Image on Hugging Face</a>
222
  <a href="https://github.com/QwenLM/Qwen" target="_blank" rel="noopener noreferrer" class="resource-link">Qwen GitHub</a>
223
  <a href="https://www.alibabacloud.com/en/solutions/generative-ai/qwen" target="_blank" rel="noopener noreferrer" class="resource-link">Alibaba Cloud Qwen</a>
224
  <a href="https://modelscope.cn/models/qwen/Qwen-Image" target="_blank" rel="noopener noreferrer" class="resource-link">ModelScope</a>
 
3
  <head>
4
  <meta charset="utf-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Qwen-Image Edit - Advanced Image-to-Image Generation by Alibaba Cloud</title>
7
+ <meta name="description" content="Qwen-Image Edit: Part of the Qwen (Tongyi Qianwen) model series by Alibaba Cloud. A powerful image-to-image generative model that transforms existing images with high-quality rendering, artistic style control, and exceptional detail." />
8
+ <meta name="keywords" content="Qwen-Image Edit, Qwen, Tongyi Qianwen, Alibaba Cloud, Image-to-Image, AI Models, Image Editing, Image Generation, AI Art, Generative AI, Image Synthesis, Multimodal AI" />
9
 
10
  <!-- Open Graph / Social Media Meta Tags -->
11
+ <meta property="og:title" content="Qwen-Image Edit - Advanced Image-to-Image Generation by Alibaba Cloud" />
12
+ <meta property="og:description" content="Transform your existing images into stunning new creations with Qwen-Image Edit, part of the Tongyi Qianwen model series developed by Alibaba Cloud" />
13
  <meta property="og:type" content="website" />
14
+ <meta property="og:url" content="https://huggingface.co/Qwen/Qwen-Image-Edit" />
15
 
16
  <!-- Additional Meta Information -->
17
  <meta name="author" content="Alibaba Cloud Qwen Team" />
18
  <meta name="robots" content="index, follow" />
19
+ <link rel="canonical" href="https://huggingface.co/Qwen/Qwen-Image-Edit" />
20
 
21
  <link rel="stylesheet" href="style.css" />
22
  </head>
 
25
  <div class="nav-content">
26
  <div class="nav-logo">QWEN</div>
27
  <div class="nav-links">
28
+ <a href="https://wavespeed.ai/models/wavespeed-ai/qwen-image-edit/image-to-image" class="nav-link" target="_blank" rel="noopener noreferrer">Home</a>
29
  <a href="https://wavespeed.ai/docs" class="nav-link" target="_blank" rel="noopener noreferrer">Documentation</a>
30
  <a href="https://wavespeed.ai/blog" class="nav-link" target="_blank" rel="noopener noreferrer">Blog</a>
31
+ <a href="https://wavespeed.ai/models/wavespeed-ai/qwen-image-edit/image-to-image" class="nav-button" target="_blank" rel="noopener noreferrer">Visit WaveSpeedAI →</a>
32
  </div>
33
  </div>
34
  </nav>
 
36
  <div class="container">
37
  <div class="content">
38
  <div class="logo-section">
39
+ <h1>Qwen-Image Edit</h1>
40
  <p class="subtitle">By Alibaba Cloud Qwen Team</p>
41
  </div>
42
 
43
  <div class="announcement-section">
44
+ <p class="announcement">Qwen-Image Edit is now available!</p>
45
  <div class="divider"></div>
46
+ <p class="description">Open-source Advanced Image-to-Image Generative Model</p>
47
  </div>
48
 
49
  <div class="hero-image">
 
52
 
53
  <section class="intro-section">
54
  <h2>Introduction</h2>
55
+ <p>We are thrilled to release Qwen-Image Edit, an image editing foundation model in the Qwen series that achieves significant advances in transforming existing images with precise control. Experiments show strong capabilities in image-to-image generation, with exceptional performance in maintaining original image structure while applying creative transformations.</p>
56
  <div class="benchmark-image">
57
  <img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/bench.png" alt="Qwen-Image Benchmark" class="full-width-img">
58
  </div>
 
61
  <div class="features-section">
62
  <div class="feature">
63
  <h3>🚀 Multimodal AI Capabilities</h3>
64
+ <p>Part of the Qwen (Tongyi Qianwen) model series, offering powerful image-to-image generation with exceptional understanding of complex editing requirements</p>
65
  </div>
66
 
67
  <div class="feature">
 
79
  <p>Choose your preferred Qwen image model:</p>
80
 
81
  <h3>Option 1: Using the latest Qwen VLo model</h3>
82
+ <p>The new Qwen VLo model specializes in image-to-image generation with progressive editing features.</p>
83
  <div class="code-block">
84
  <pre><code>pip install dashscope>=1.20.7</code></pre>
85
  </div>
 
90
  # Set your API key
91
  dashscope.api_key = "YOUR_API_KEY"
92
 
93
+ # Image-to-image generation
94
  response = ImageSynthesis.call(
95
  model='qwen-vlo',
96
+ prompt='Transform this coffee shop into a futuristic cyber cafe with neon lights',
97
  negative_prompt='blurry, low quality',
98
  n=1, # Number of images to generate
99
  size='1024*1024', # Image size
100
+ steps=50, # Diffusion steps
101
+ image='path/to/input_image.jpg' # Input image for editing
102
  )
103
 
104
  # Save the generated image
 
110
  print(f'Failed to generate image: {response.message}')</code></pre>
111
  </div>
112
 
113
+ <h3>Option 2: Using Qwen-Image Edit with diffusers</h3>
114
  <p>Install the latest version of diffusers</p>
115
  <div class="code-block">
116
  <pre><code>pip install git+https://github.com/huggingface/diffusers</code></pre>
 
120
  <pre><code>from diffusers import DiffusionPipeline
121
  import torch
122
 
123
+ model_name = "Qwen/Qwen-Image-Edit"
124
 
125
  # Load the pipeline
126
  if torch.cuda.is_available():
 
138
  "zh": "超清,4K,电影级构图" # for chinese prompt
139
  }
140
 
141
+ # Load input image
142
+ init_image = PIL.Image.open("input_image.jpg").convert("RGB")
143
+
144
+ # Define editing prompt
145
+ prompt = '''Transform this image into a watercolor painting with vibrant colors and artistic brush strokes. Ultra HD, 4K, cinematic composition'''
146
 
147
  negative_prompt = " "
148
 
 
160
  image = pipe(
161
  prompt=prompt + positive_magic["en"],
162
  negative_prompt=negative_prompt,
163
+ image=init_image, # Input image for editing
 
164
  num_inference_steps=50,
165
+ strength=0.75, # Control how much to transform the original image
166
  true_cfg_scale=4.0,
167
  generator=torch.Generator(device="cuda").manual_seed(42)
168
  ).images[0]
 
176
 
177
  <div class="showcase-item-full">
178
  <div class="showcase-description-full">
179
+ <h3>Superior Image Transformation</h3>
180
+ <p>One of its standout capabilities is high-fidelity image transformation across diverse styles and contexts. Qwen-Image Edit preserves the essential structure and content of the original image while applying sophisticated transformations, maintaining coherence and contextual harmony with stunning accuracy. The editing isn't just superficial—it's intelligently integrated into the visual fabric.</p>
181
  </div>
182
  <div class="showcase-image-full">
183
  <img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/s1.jpg" alt="Text Rendering Example" class="showcase-img-full">
 
186
 
187
  <div class="showcase-item-full">
188
  <div class="showcase-description-full">
189
+ <h3>Artistic Style Transfer</h3>
190
+ <p>Qwen-Image Edit excels at style transfer with support for a wide range of artistic transformations. From converting photos to impressionist paintings, applying anime aesthetics to real-world scenes, or transforming images to minimalist designs, the model adapts fluidly to creative editing requirements, making it a versatile tool for artists, designers, and storytellers.</p>
191
  </div>
192
  <div class="showcase-image-full">
193
  <img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/s2.jpg" alt="Artistic Styles Example" class="showcase-img-full">
 
196
 
197
  <div class="showcase-item-full">
198
  <div class="showcase-description-full">
199
+ <h3>Advanced Image Manipulation</h3>
200
+ <p>As a specialized image editing model, Qwen-Image Edit goes far beyond simple adjustments. It enables advanced operations such as comprehensive style transfer, object insertion or removal, detail enhancement, background replacement, and even human pose manipulation—all with intuitive input and coherent output. This level of control brings professional-grade image transformation within reach of everyday users.</p>
201
  </div>
202
  <div class="showcase-image-full">
203
  <img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/s3.jpg" alt="Image Editing Example" class="showcase-img-full">
 
206
 
207
  <div class="showcase-item-full">
208
  <div class="showcase-description-full">
209
+ <h3>Intelligent Image Analysis</h3>
210
+ <p>Qwen-Image Edit doesn't just transform—it understands. It analyzes the input image through a suite of understanding tasks, including object detection, semantic segmentation, depth and edge (Canny) estimation, and structural analysis. These capabilities ensure that transformations respect the original image's key elements and structure, resulting in edits that feel natural and coherent, powered by deep visual comprehension.</p>
211
  </div>
212
  <div class="showcase-image-full">
213
  <img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/s4.jpg" alt="Image Understanding Example" class="showcase-img-full">
 
215
  </div>
216
 
217
  <div class="showcase-conclusion">
218
+ <p>Together, these features make Qwen-Image Edit not just a tool for basic image editing, but a comprehensive foundation model for intelligent visual transformation—where existing images become the canvas for sophisticated artistic and creative manipulation.</p>
219
  </div>
220
  </section>
221
 
222
  <div class="resource-links-section">
223
  <h2>Resources</h2>
224
  <div class="resource-links">
225
+ <a href="https://huggingface.co/Qwen/Qwen-Image-Edit" target="_blank" rel="noopener noreferrer" class="resource-link">Qwen-Image Edit on Hugging Face</a>
226
  <a href="https://github.com/QwenLM/Qwen" target="_blank" rel="noopener noreferrer" class="resource-link">Qwen GitHub</a>
227
  <a href="https://www.alibabacloud.com/en/solutions/generative-ai/qwen" target="_blank" rel="noopener noreferrer" class="resource-link">Alibaba Cloud Qwen</a>
228
  <a href="https://modelscope.cn/models/qwen/Qwen-Image" target="_blank" rel="noopener noreferrer" class="resource-link">ModelScope</a>