KvLove commited on
Commit
d0dc8e3
·
verified ·
1 Parent(s): f4e6ff5

Upload Anime in real life LoRA

Browse files
.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
+ ![ComfyUI Workflow](./assets/comfyui_workflow.png)
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
+ ![Anime to Real Life Example 1](./assets/irl_lora1.jpg)
132
+
133
+ ### Example 2
134
+
135
+ ![Anime to Real Life Example 2](./assets/irl_lora2.jpg)
136
+
137
+ ### Example 3
138
+
139
+ ![Anime to Real Life Example 3](./assets/irl_lora3.jpg)
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:[email protected])
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

  • SHA256: 1318b857772f508065a62119f26f38901d2336db22f5171de07d5297803f9cdc
  • Pointer size: 132 Bytes
  • Size of remote file: 1.85 MB
assets/irl_lora1.jpg ADDED

Git LFS Details

  • SHA256: ad2ec6085d7af9cae54d62bc03f259a3774c8a35e7224000f508c4f1eeeb8abe
  • Pointer size: 131 Bytes
  • Size of remote file: 120 kB
assets/irl_lora2.jpg ADDED

Git LFS Details

  • SHA256: c1d050fc39a723305b6c7e9fcac5d79b0c62d1ff1068efca4a592adce208391c
  • Pointer size: 131 Bytes
  • Size of remote file: 102 kB
assets/irl_lora3.jpg ADDED

Git LFS Details

  • SHA256: 740127f5448c59703710e4e82b8b3556f48bbfbbcb3ac9519d399a95d8369deb
  • Pointer size: 131 Bytes
  • Size of remote file: 165 kB
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