| --- |
| license: apache-2.0 |
| language: |
| - en |
| base_model: |
| - Qwen/Qwen-Image-Edit |
| tags: |
| - image-generation |
| - lora |
| - Qwen-Image |
| pipeline_tag: image-to-image |
| library_name: diffusers |
| widget: |
| - text: >- |
| turn the image into the oil painting style. |
| output: |
| url: result/result1.png |
| - text: >- |
| turn the image into the oil painting style. |
| output: |
| url: result/result2.png |
| - text: >- |
| turn the image into the oil painting style. |
| output: |
| url: result/result3.png |
| --- |
| # valiantcat Qwen-Image-Edit LoRA |
|
|
| <Gallery /> |
|
|
| ## Model Card for Model ID |
|
|
| <!-- Provide a quick summary of what the model is/does. --> |
|
|
| This is a model for generation of oil painting style, trained on ```Qwen/Qwen-Image-Edit```, and the main purpose is to generate images in an oil painting style. Surprisingly, this oil painting style can bypass the real-person image review process of sora2.For use in ```ComfyUI```. |
|
|
| <div style="background-color: white; padding: 15px; border-radius: 8px; margin: 15px 0; box-shadow: 0 2px 4px rgba(0,0,0,0.1);"> |
| <h2 style="color: #24292e; margin-top: 0;">ComfyUI Workflow</h2> |
| <p>This LoRA works with a modified version of <a href="https://huggingface.co/valiantcat/Qwen-Image-Edit-Skip-Sora/blob/main/Qwen-Edit-LORA.json" style="color: #0366d6; text-decoration: none;">Comfy's Qwen-Image-Edit workflow</a>. The main modification is adding a Qwen-Image-Edit LoRA node connected to the base model.</p> |
| <p>See the Downloads section above for the modified workflow.</p> |
| </div> |
|
|
| ## Video Demos |
|
|
| <div align="center"> |
| <video width="80%" controls> |
| <source src="https://ai.static.ad2.cc/sora2.mp4" type="video/mp4"> |
| Your browser does not support the video tag. |
| </video> |
| </div> |
| |
| ### Direct Use |
|
|
| ``` |
| from diffusers import QwenImageEditPipeline |
| import torch |
| from PIL import Image |
| |
| # Load the pipeline |
| pipeline = QwenImageEditPipeline.from_pretrained("Qwen/Qwen-Image-Edit") |
| pipeline.to(torch.bfloat16) |
| pipeline.to("cuda") |
| |
| # Load trained LoRA weights for in-scene editing |
| pipeline.load_lora_weights("valiantcat/Qwen-Image-Edit-Skip-Sora",weight_name="qwen_edit_oil-paint.safetensors") |
| |
| # Load input image |
| image = Image.open("./result/test.jpg").convert("RGB") |
| |
| # Define in-scene editing prompt |
| prompt = "turn the image into the oil painting style. " |
| |
| # Generate edited image with enhanced scene understanding |
| inputs = { |
| "image": image, |
| "prompt": prompt, |
| "generator": torch.manual_seed(12345), |
| "true_cfg_scale": 4.0, |
| "negative_prompt": " ", |
| "num_inference_steps": 50, |
| } |
| |
| with torch.inference_mode(): |
| output = pipeline(**inputs) |
| output_image = output.images[0] |
| output_image.save("restlt.png") |
| |
| ``` |
|
|
| ## Trigger phrase |
|
|
| ```turn the image into the oil painting style. ``` |
|
|
|
|
| ## Download model |
|
|
| Weights for this model are available in Safetensors format. |
|
|
| [Download](https://huggingface.co/valiantcat/Qwen-Image-Edit-Skip-Sora) |
|
|
| ## Training at Chongqing Valiant Cat |
|
|
| This model was trained by the AI Laboratory of Chongqing Valiant Cat Technology Co., LTD(```https://vvicat.com/```).Business cooperation is welcome |