Upload Anime in real life LoRA
Browse files- .gitattributes +4 -0
- README.md +155 -3
- assets/comfyui_workflow.png +3 -0
- assets/irl_lora1.jpg +3 -0
- assets/irl_lora2.jpg +3 -0
- assets/irl_lora3.jpg +3 -0
- flymy_anime_irl.safetensors +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
assets/comfyui_workflow.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
assets/irl_lora1.jpg filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
assets/irl_lora2.jpg filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
assets/irl_lora3.jpg filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,155 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
base_model:
|
| 6 |
+
- Qwen/Qwen-Image
|
| 7 |
+
pipeline_tag: text-to-image
|
| 8 |
+
tags:
|
| 9 |
+
- lora
|
| 10 |
+
- qwen
|
| 11 |
+
- qwen-image
|
| 12 |
+
- anime
|
| 13 |
+
- anime-to-real
|
| 14 |
+
- style-transfer
|
| 15 |
+
---
|
| 16 |
+
## Anime in Real Life LoRA for Qwen-Image
|
| 17 |
+
|
| 18 |
+
LoRA model that transforms anime-style prompts into photorealistic images for [Qwen-Image](https://huggingface.co/Qwen/Qwen-Image)
|
| 19 |
+
|
| 20 |
+
trigger word: **"Real life Anime"**
|
| 21 |
+
|
| 22 |
+
# π Updates
|
| 23 |
+
|
| 24 |
+
# π§ͺ Usage
|
| 25 |
+
|
| 26 |
+
## π§ Initialization
|
| 27 |
+
|
| 28 |
+
```python
|
| 29 |
+
from diffusers import DiffusionPipeline
|
| 30 |
+
import torch
|
| 31 |
+
|
| 32 |
+
model_name = "Qwen/Qwen-Image"
|
| 33 |
+
|
| 34 |
+
# Load the pipeline
|
| 35 |
+
if torch.cuda.is_available():
|
| 36 |
+
torch_dtype = torch.bfloat16
|
| 37 |
+
device = "cuda"
|
| 38 |
+
else:
|
| 39 |
+
torch_dtype = torch.float32
|
| 40 |
+
device = "cpu"
|
| 41 |
+
|
| 42 |
+
pipe = DiffusionPipeline.from_pretrained(model_name, torch_dtype=torch_dtype)
|
| 43 |
+
pipe = pipe.to(device)
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
### π Load LoRA Weights
|
| 47 |
+
|
| 48 |
+
```python
|
| 49 |
+
# Load LoRA weights
|
| 50 |
+
pipe.load_lora_weights('flymy_anime_irl.safetensors', adapter_name="lora")
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
### π¨ Generate Anime in Real Life Images
|
| 54 |
+
|
| 55 |
+
```python
|
| 56 |
+
prompt = '''Real life Anime in a cozy kitchen, eating noodles with chopsticks, while a curious cat looks out the window.'''
|
| 57 |
+
negative_prompt = " "
|
| 58 |
+
image = pipe(
|
| 59 |
+
prompt=prompt,
|
| 60 |
+
negative_prompt=negative_prompt,
|
| 61 |
+
width=1024,
|
| 62 |
+
height=1024,
|
| 63 |
+
num_inference_steps=50,
|
| 64 |
+
true_cfg_scale=4,
|
| 65 |
+
generator=torch.Generator(device="cuda").manual_seed(4633346 + 2)
|
| 66 |
+
).images[0]
|
| 67 |
+
|
| 68 |
+
# Display the image (in Jupyter or save to file)
|
| 69 |
+
image.show()
|
| 70 |
+
# or
|
| 71 |
+
image.save("output.png")
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
### πΌοΈ Sample Outputs
|
| 75 |
+
|
| 76 |
+
Examples of anime characters transformed into photorealistic images:
|
| 77 |
+
|
| 78 |
+
## ποΈ Using with ComfyUI
|
| 79 |
+
|
| 80 |
+
We provide a ready-to-use ComfyUI workflow that works with our trained LoRA models. Follow these steps to set up and use the workflow:
|
| 81 |
+
|
| 82 |
+
### Setup Instructions
|
| 83 |
+
|
| 84 |
+
1. **Download the latest ComfyUI**:
|
| 85 |
+
- Visit the [ComfyUI GitHub repository](https://github.com/comfyanonymous/ComfyUI)
|
| 86 |
+
- Clone or download the latest version
|
| 87 |
+
|
| 88 |
+
2. **Install ComfyUI**:
|
| 89 |
+
- Follow the installation instructions from the [ComfyUI repository](https://github.com/comfyanonymous/ComfyUI?tab=readme-ov-file#installing)
|
| 90 |
+
- Make sure all dependencies are properly installed
|
| 91 |
+
|
| 92 |
+
3. **Download Qwen-Image model weights**:
|
| 93 |
+
- Go to [Qwen-Image ComfyUI weights](https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/tree/main)
|
| 94 |
+
- Download all the model files
|
| 95 |
+
|
| 96 |
+
4. **Place Qwen-Image weights in ComfyUI**:
|
| 97 |
+
- Copy the downloaded Qwen-Image model files to the appropriate folders in `ComfyUI/models/`
|
| 98 |
+
- Follow the folder structure as specified in the model repository
|
| 99 |
+
|
| 100 |
+
5. **Download our pre-trained LoRA weights**:
|
| 101 |
+
- Visit [flymy-ai/qwen-image-lora](https://huggingface.co/flymy-ai/qwen-image-lora)
|
| 102 |
+
- Download the LoRA `.safetensors` files
|
| 103 |
+
|
| 104 |
+
6. **Place LoRA weights in ComfyUI**:
|
| 105 |
+
- Copy the LoRA file `flymy-ai/qwen-image-lora/pytorch_lora_weights.safetensors` to `ComfyUI/models/loras/`
|
| 106 |
+
|
| 107 |
+
7. **Load the workflow**:
|
| 108 |
+
- Open ComfyUI in your browser
|
| 109 |
+
- Load the workflow file `qwen_image_lora_example.json` located in this repository
|
| 110 |
+
- The workflow is pre-configured to work with our LoRA models
|
| 111 |
+
|
| 112 |
+
### Workflow Features
|
| 113 |
+
|
| 114 |
+
- β
Pre-configured for Qwen-Image + LoRA inference
|
| 115 |
+
- β
Optimized settings for best quality output
|
| 116 |
+
- β
Easy prompt and parameter adjustment
|
| 117 |
+
- β
Compatible with all our trained LoRA models
|
| 118 |
+
|
| 119 |
+
The ComfyUI workflow provides a user-friendly interface for generating images with our trained LoRA models without needing to write Python code.
|
| 120 |
+
|
| 121 |
+
### πΌοΈ Workflow Screenshot
|
| 122 |
+
|
| 123 |
+

|
| 124 |
+
|
| 125 |
+
## π Anime to Real Life Examples
|
| 126 |
+
|
| 127 |
+
Below are examples showing how our LoRA model transforms anime-style descriptions into photorealistic images:
|
| 128 |
+
|
| 129 |
+
### Example 1
|
| 130 |
+
|
| 131 |
+

|
| 132 |
+
|
| 133 |
+
### Example 2
|
| 134 |
+
|
| 135 |
+

|
| 136 |
+
|
| 137 |
+
### Example 3
|
| 138 |
+
|
| 139 |
+

|
| 140 |
+
|
| 141 |
+
## π€ Support
|
| 142 |
+
|
| 143 |
+
If you have questions or suggestions, join our community:
|
| 144 |
+
|
| 145 |
+
- π [FlyMy.AI](https://flymy.ai)
|
| 146 |
+
- π¬ [Discord Community](https://discord.com/invite/t6hPBpSebw)
|
| 147 |
+
- π¦ [Follow us on X](https://x.com/flymyai)
|
| 148 |
+
- πΌ [Connect on LinkedIn](https://linkedin.com/company/flymyai)
|
| 149 |
+
- π§ [Support](mailto:support@flymy.ai)
|
| 150 |
+
|
| 151 |
+
**β Don't forget to star the repository if you like it!**
|
| 152 |
+
|
| 153 |
+
---
|
| 154 |
+
license: apache-2.0
|
| 155 |
+
---
|
assets/comfyui_workflow.png
ADDED
|
Git LFS Details
|
assets/irl_lora1.jpg
ADDED
|
Git LFS Details
|
assets/irl_lora2.jpg
ADDED
|
Git LFS Details
|
assets/irl_lora3.jpg
ADDED
|
Git LFS Details
|
flymy_anime_irl.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:581868c2392519069ee8ee4866199b1edf454752c4aba873d536685a2ee6e965
|
| 3 |
+
size 47249496
|