Comprehensive AI image manipulation agent supporting Qwen models with advanced features for fashion e-commerce, character creation, and image enhancement.
qwen_image_agent.py)qwen_text_encode_advanced.py)virtual_tryon_body_shaper.py)# Clone the repository
git clone https://github.com/tabrezahmed51/qwen-image-edit-agent.git
cd qwen-image-edit-agent
# Install dependencies
pip install -r requirements.txt
httpx==0.24.1
aiofiles==23.2.1
pydantic==2.5.0
python-dotenv==1.0.0
pillow==10.1.0
numpy==1.26.2
aiohttp==3.9.1
tqdm==4.67.0
loguru==0.7.2
import asyncio
from qwen_image_agent import QwenImageAgent, ImageEditRequest, EditType
async def main():
agent = QwenImageAgent(comfyui_endpoint="http://localhost:8188")
request = ImageEditRequest(
image_url="./input.png",
edit_type=EditType.OUTFIT_CHANGE,
prompt="Change to blue summer dress",
steps=20,
guidance_scale=7.5
)
result = await agent.process_edit_request(request)
print(f"Result: {result}")
asyncio.run(main())
from virtual_tryon_body_shaper import VirtualTryOnEngine, TryOnRequest, BodyShape, ClothingType, CameraAngle
engine = VirtualTryOnEngine()
request = TryOnRequest(
model_image_url="./model.png",
clothing_image_url="./dress.png",
body_shape=BodyShape.CURVY,
clothing_type=ClothingType.DRESS,
camera_angle=CameraAngle.STRAIGHT_ON,
adjust_fit=0.2,
custom_prompt="elegant evening wear"
)
result = await engine.process_try_on(request)
from virtual_tryon_body_shaper import BodyShapeRequest
request = BodyShapeRequest(
image_url="./person.png",
target_body_shape=BodyShape.ATHLETIC,
adjustment_strength=0.8,
preserve_face=True
)
result = await engine.process_body_shape_transformation(request)
POST /api/edit - Process image editing requestPOST /api/tryon - Virtual try-on requestPOST /api/reshape - Body shape transformationPOST /api/character - Character creationPOST /api/batch - Batch processingqwen-image-edit-agent/
├── qwen_image_agent.py # Main async agent
├── qwen_text_encode_advanced.py # Advanced text encoding with VL
├── virtual_tryon_body_shaper.py # Try-on and body shaping
├── requirements.txt # Dependencies
└── README.md # This file
8 professional photography angles optimized for fashion e-commerce:
Contributions welcome! Please:
MIT License - See LICENSE file
tabrezahmed51 - Full-stack developer specializing in AI/ML and ComfyUI workflows
For issues, questions, or feature requests:
Python
100.0%
Comprehensive AI image manipulation agent supporting Qwen models with advanced features for fashion e-commerce, character creation, and image enhancement.
qwen_image_agent.py)qwen_text_encode_advanced.py)virtual_tryon_body_shaper.py)# Clone the repository
git clone https://github.com/tabrezahmed51/qwen-image-edit-agent.git
cd qwen-image-edit-agent
# Install dependencies
pip install -r requirements.txt
httpx==0.24.1
aiofiles==23.2.1
pydantic==2.5.0
python-dotenv==1.0.0
pillow==10.1.0
numpy==1.26.2
aiohttp==3.9.1
tqdm==4.67.0
loguru==0.7.2
import asyncio
from qwen_image_agent import QwenImageAgent, ImageEditRequest, EditType
async def main():
agent = QwenImageAgent(comfyui_endpoint="http://localhost:8188")
request = ImageEditRequest(
image_url="./input.png",
edit_type=EditType.OUTFIT_CHANGE,
prompt="Change to blue summer dress",
steps=20,
guidance_scale=7.5
)
result = await agent.process_edit_request(request)
print(f"Result: {result}")
asyncio.run(main())
from virtual_tryon_body_shaper import VirtualTryOnEngine, TryOnRequest, BodyShape, ClothingType, CameraAngle
engine = VirtualTryOnEngine()
request = TryOnRequest(
model_image_url="./model.png",
clothing_image_url="./dress.png",
body_shape=BodyShape.CURVY,
clothing_type=ClothingType.DRESS,
camera_angle=CameraAngle.STRAIGHT_ON,
adjust_fit=0.2,
custom_prompt="elegant evening wear"
)
result = await engine.process_try_on(request)
from virtual_tryon_body_shaper import BodyShapeRequest
request = BodyShapeRequest(
image_url="./person.png",
target_body_shape=BodyShape.ATHLETIC,
adjustment_strength=0.8,
preserve_face=True
)
result = await engine.process_body_shape_transformation(request)
POST /api/edit - Process image editing requestPOST /api/tryon - Virtual try-on requestPOST /api/reshape - Body shape transformationPOST /api/character - Character creationPOST /api/batch - Batch processingqwen-image-edit-agent/
├── qwen_image_agent.py # Main async agent
├── qwen_text_encode_advanced.py # Advanced text encoding with VL
├── virtual_tryon_body_shaper.py # Try-on and body shaping
├── requirements.txt # Dependencies
└── README.md # This file
8 professional photography angles optimized for fashion e-commerce:
Contributions welcome! Please:
MIT License - See LICENSE file
tabrezahmed51 - Full-stack developer specializing in AI/ML and ComfyUI workflows
For issues, questions, or feature requests:
Python
100.0%