Spaces:
Running
Running
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Qwen-Image Edit - Advanced Image-to-Image Generation by Alibaba Cloud</title> | |
<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." /> | |
<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" /> | |
<!-- Open Graph / Social Media Meta Tags --> | |
<meta property="og:title" content="Qwen-Image Edit - Advanced Image-to-Image Generation by Alibaba Cloud" /> | |
<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" /> | |
<meta property="og:type" content="website" /> | |
<meta property="og:url" content="https://huggingface.co/Qwen/Qwen-Image-Edit" /> | |
<!-- Additional Meta Information --> | |
<meta name="author" content="Alibaba Cloud Qwen Team" /> | |
<meta name="robots" content="index, follow" /> | |
<link rel="canonical" href="https://huggingface.co/Qwen/Qwen-Image-Edit" /> | |
<link rel="stylesheet" href="style.css" /> | |
</head> | |
<body> | |
<nav class="top-nav"> | |
<div class="nav-content"> | |
<div class="nav-logo">QWEN</div> | |
<div class="nav-links"> | |
<a href="https://wavespeed.ai/models/wavespeed-ai/qwen-image-edit/image-to-image" class="nav-link" target="_blank" rel="noopener noreferrer">Home</a> | |
<a href="https://wavespeed.ai/docs" class="nav-link" target="_blank" rel="noopener noreferrer">Documentation</a> | |
<a href="https://wavespeed.ai/blog" class="nav-link" target="_blank" rel="noopener noreferrer">Blog</a> | |
<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> | |
</div> | |
</div> | |
</nav> | |
<div class="container"> | |
<div class="content"> | |
<div class="logo-section"> | |
<h1>Qwen-Image Edit</h1> | |
<p class="subtitle">By Alibaba Cloud Qwen Team</p> | |
</div> | |
<div class="announcement-section"> | |
<p class="announcement">Qwen-Image Edit is now available!</p> | |
<div class="divider"></div> | |
<p class="description">Open-source Advanced Image-to-Image Generative Model</p> | |
</div> | |
<div class="hero-image"> | |
<img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/merge3.jpg" alt="Qwen-Image Examples" class="full-width-img"> | |
</div> | |
<section class="intro-section"> | |
<h2>Introduction</h2> | |
<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> | |
<div class="benchmark-image"> | |
<img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/bench.png" alt="Qwen-Image Benchmark" class="full-width-img"> | |
</div> | |
</section> | |
<div class="features-section"> | |
<div class="feature"> | |
<h3>🚀 Multimodal AI Capabilities</h3> | |
<p>Part of the Qwen (Tongyi Qianwen) model series, offering powerful image-to-image generation with exceptional understanding of complex editing requirements</p> | |
</div> | |
<div class="feature"> | |
<h3>🌟 Open Source Innovation</h3> | |
<p>Part of Alibaba's commitment to open-source AI development, allowing researchers and developers to build upon and extend its capabilities</p> | |
</div> | |
<div class="feature"> | |
<h3>🔍 Comprehensive Model Family</h3> | |
<p>Works alongside other Qwen models for text, vision, and multimodal applications, providing a complete ecosystem for AI development</p> | |
</div> | |
</div> | |
<section class="quickstart-section"> | |
<h2>Quick Start</h2> | |
<p>Choose your preferred Qwen image model:</p> | |
<h3>Option 1: Using the latest Qwen VLo model</h3> | |
<p>The new Qwen VLo model specializes in image-to-image generation with progressive editing features.</p> | |
<div class="code-block"> | |
<pre><code>pip install dashscope>=1.20.7</code></pre> | |
</div> | |
<div class="code-block"> | |
<pre><code>import dashscope | |
from dashscope import ImageSynthesis | |
# Set your API key | |
dashscope.api_key = "YOUR_API_KEY" | |
# Image-to-image generation | |
response = ImageSynthesis.call( | |
model='qwen-vlo', | |
prompt='Transform this coffee shop into a futuristic cyber cafe with neon lights', | |
negative_prompt='blurry, low quality', | |
n=1, # Number of images to generate | |
size='1024*1024', # Image size | |
steps=50, # Diffusion steps | |
image='path/to/input_image.jpg' # Input image for editing | |
) | |
# Save the generated image | |
if response.status_code == 200: | |
with open('qwen_vlo_result.png', 'wb') as f: | |
f.write(response.output.images[0].image) | |
print('Image saved successfully!') | |
else: | |
print(f'Failed to generate image: {response.message}')</code></pre> | |
</div> | |
<h3>Option 2: Using Qwen-Image Edit with diffusers</h3> | |
<p>Install the latest version of diffusers</p> | |
<div class="code-block"> | |
<pre><code>pip install git+https://github.com/huggingface/diffusers</code></pre> | |
</div> | |
<p>The following contains a code snippet illustrating how to use the model to generate images based on text prompts:</p> | |
<div class="code-block"> | |
<pre><code>from diffusers import DiffusionPipeline | |
import torch | |
model_name = "Qwen/Qwen-Image-Edit" | |
# Load the pipeline | |
if torch.cuda.is_available(): | |
torch_dtype = torch.bfloat16 | |
device = "cuda" | |
else: | |
torch_dtype = torch.float32 | |
device = "cpu" | |
pipe = DiffusionPipeline.from_pretrained(model_name, torch_dtype=torch_dtype) | |
pipe = pipe.to(device) | |
positive_magic = { | |
"en": "Ultra HD, 4K, cinematic composition.", # for english prompt | |
"zh": "超清,4K,电影级构图" # for chinese prompt | |
} | |
# Load input image | |
init_image = PIL.Image.open("input_image.jpg").convert("RGB") | |
# Define editing prompt | |
prompt = '''Transform this image into a watercolor painting with vibrant colors and artistic brush strokes. Ultra HD, 4K, cinematic composition''' | |
negative_prompt = " " | |
# Generate with different aspect ratios | |
aspect_ratios = { | |
"1:1": (1328, 1328), | |
"16:9": (1664, 928), | |
"9:16": (928, 1664), | |
"4:3": (1472, 1140), | |
"3:4": (1140, 1472) | |
} | |
width, height = aspect_ratios["16:9"] | |
image = pipe( | |
prompt=prompt + positive_magic["en"], | |
negative_prompt=negative_prompt, | |
image=init_image, # Input image for editing | |
num_inference_steps=50, | |
strength=0.75, # Control how much to transform the original image | |
true_cfg_scale=4.0, | |
generator=torch.Generator(device="cuda").manual_seed(42) | |
).images[0] | |
image.save("example.png")</code></pre> | |
</div> | |
</section> | |
<section class="showcase-section"> | |
<h2>Show Cases</h2> | |
<div class="showcase-item-full"> | |
<div class="showcase-description-full"> | |
<h3>Superior Image Transformation</h3> | |
<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> | |
</div> | |
<div class="showcase-image-full"> | |
<img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/s1.jpg" alt="Text Rendering Example" class="showcase-img-full"> | |
</div> | |
</div> | |
<div class="showcase-item-full"> | |
<div class="showcase-description-full"> | |
<h3>Artistic Style Transfer</h3> | |
<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> | |
</div> | |
<div class="showcase-image-full"> | |
<img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/s2.jpg" alt="Artistic Styles Example" class="showcase-img-full"> | |
</div> | |
</div> | |
<div class="showcase-item-full"> | |
<div class="showcase-description-full"> | |
<h3>Advanced Image Manipulation</h3> | |
<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> | |
</div> | |
<div class="showcase-image-full"> | |
<img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/s3.jpg" alt="Image Editing Example" class="showcase-img-full"> | |
</div> | |
</div> | |
<div class="showcase-item-full"> | |
<div class="showcase-description-full"> | |
<h3>Intelligent Image Analysis</h3> | |
<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> | |
</div> | |
<div class="showcase-image-full"> | |
<img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/s4.jpg" alt="Image Understanding Example" class="showcase-img-full"> | |
</div> | |
</div> | |
<div class="showcase-conclusion"> | |
<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> | |
</div> | |
</section> | |
<div class="resource-links-section"> | |
<h2>Resources</h2> | |
<div class="resource-links"> | |
<a href="https://huggingface.co/Qwen/Qwen-Image-Edit" target="_blank" rel="noopener noreferrer" class="resource-link">Qwen-Image Edit on Hugging Face</a> | |
<a href="https://github.com/QwenLM/Qwen" target="_blank" rel="noopener noreferrer" class="resource-link">Qwen GitHub</a> | |
<a href="https://www.alibabacloud.com/en/solutions/generative-ai/qwen" target="_blank" rel="noopener noreferrer" class="resource-link">Alibaba Cloud Qwen</a> | |
<a href="https://modelscope.cn/models/qwen/Qwen-Image" target="_blank" rel="noopener noreferrer" class="resource-link">ModelScope</a> | |
<a href="https://help.aliyun.com/zh/dashscope/developer-reference/qwen-vlo-quick-start" target="_blank" rel="noopener noreferrer" class="resource-link">Qwen VLo Documentation</a> | |
<a href="https://www.alibabacloud.com/help/en/model-studio/vision/" target="_blank" rel="noopener noreferrer" class="resource-link">Qwen-VL Documentation</a> | |
</div> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> | |