Spaces:
Running on Zero
Running on Zero
Choquinlabs commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -117,12 +117,17 @@ ADAPTER_SPECS = {
|
|
| 117 |
"adapter_name": "tosti-style",
|
| 118 |
"prompt": "change this picture to tosti style. Use symmetric simple geometric shapes"
|
| 119 |
},
|
| 120 |
-
|
| 121 |
"Multiple-Angles": {
|
| 122 |
"repo": "dx8152/Qwen-Edit-2509-Multiple-angles",
|
| 123 |
"weights": "镜头转换.safetensors",
|
| 124 |
"adapter_name": "multiple-angles"
|
| 125 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
"Photo-to-Anime": {
|
| 127 |
"repo": "autoweeb/Qwen-Image-Edit-2509-Photo-to-Anime",
|
| 128 |
"weights": "Qwen-Image-Edit-2509-Photo-to-Anime_000001000.safetensors",
|
|
@@ -138,10 +143,17 @@ ADAPTER_SPECS = {
|
|
| 138 |
"weights": "参考色调.safetensors",
|
| 139 |
"adapter_name": "light-migration"
|
| 140 |
},
|
| 141 |
-
"
|
| 142 |
"repo": "starsfriday/Qwen-Image-Edit-2511-Upscale2K",
|
| 143 |
"weights": "qwen_image_edit_2511_upscale.safetensors",
|
| 144 |
-
"adapter_name": "upscale-2k"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
},
|
| 146 |
"Style-Transfer": {
|
| 147 |
"repo": "zooeyy/Style-Transfer",
|
|
@@ -158,6 +170,11 @@ ADAPTER_SPECS = {
|
|
| 158 |
"weights": "anything2real_2601.safetensors",
|
| 159 |
"adapter_name": "anything2real"
|
| 160 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 161 |
"Fal-Multiple-Angles": {
|
| 162 |
"repo": "fal/Qwen-Image-Edit-2511-Multiple-Angles-LoRA",
|
| 163 |
"weights": "qwen-image-edit-2511-multiple-angles-lora.safetensors",
|
|
@@ -192,6 +209,14 @@ def update_dimensions_on_upload(image):
|
|
| 192 |
|
| 193 |
return new_width, new_height
|
| 194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
|
| 196 |
|
| 197 |
@spaces.GPU(duration=20)
|
|
@@ -393,5 +418,11 @@ with gr.Blocks() as demo:
|
|
| 393 |
outputs=[output_image, seed]
|
| 394 |
)
|
| 395 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 396 |
if __name__ == "__main__":
|
| 397 |
demo.queue(max_size=30).launch(css=css, theme=orange_red_theme, mcp_server=True, ssr_mode=False, show_error=True)
|
|
|
|
| 117 |
"adapter_name": "tosti-style",
|
| 118 |
"prompt": "change this picture to tosti style. Use symmetric simple geometric shapes"
|
| 119 |
},
|
|
|
|
| 120 |
"Multiple-Angles": {
|
| 121 |
"repo": "dx8152/Qwen-Edit-2509-Multiple-angles",
|
| 122 |
"weights": "镜头转换.safetensors",
|
| 123 |
"adapter_name": "multiple-angles"
|
| 124 |
},
|
| 125 |
+
"character-turnaround": {
|
| 126 |
+
"repo": "tarn59/character_turnaround_sheet_qwen_edit_2511",
|
| 127 |
+
"weights": "character_turnaround_sheet_v3_qwen_image_edit_2511_000000400.safetensors",
|
| 128 |
+
"adapter_name": "character-turnaround",
|
| 129 |
+
"prompt": "Character turnaround sheet"
|
| 130 |
+
},
|
| 131 |
"Photo-to-Anime": {
|
| 132 |
"repo": "autoweeb/Qwen-Image-Edit-2509-Photo-to-Anime",
|
| 133 |
"weights": "Qwen-Image-Edit-2509-Photo-to-Anime_000001000.safetensors",
|
|
|
|
| 143 |
"weights": "参考色调.safetensors",
|
| 144 |
"adapter_name": "light-migration"
|
| 145 |
},
|
| 146 |
+
"starsfriday-Upscale2K": {
|
| 147 |
"repo": "starsfriday/Qwen-Image-Edit-2511-Upscale2K",
|
| 148 |
"weights": "qwen_image_edit_2511_upscale.safetensors",
|
| 149 |
+
"adapter_name": "starsfriday-upscale-2k",
|
| 150 |
+
"prompt": "Upscale this picture to 4K resolution."
|
| 151 |
+
},
|
| 152 |
+
"prithivMLmods-Unblur-Upscale2K": {
|
| 153 |
+
"repo": "prithivMLmods/Qwen-Image-Edit-2511-Unblur-Upscale",
|
| 154 |
+
"weights": "Qwen-Image-Edit-Unblur-Upscale_20.safetensors",
|
| 155 |
+
"adapter_name": "prithivMLmods-Unblur-Upscale2K",
|
| 156 |
+
"prompt": "unblur and upscale"
|
| 157 |
},
|
| 158 |
"Style-Transfer": {
|
| 159 |
"repo": "zooeyy/Style-Transfer",
|
|
|
|
| 170 |
"weights": "anything2real_2601.safetensors",
|
| 171 |
"adapter_name": "anything2real"
|
| 172 |
},
|
| 173 |
+
"Anything2Real": {
|
| 174 |
+
"repo": "lrzjason/Anything2Real_2601",
|
| 175 |
+
"weights": "anything2real_2601.safetensors",
|
| 176 |
+
"adapter_name": "anything2real"
|
| 177 |
+
},
|
| 178 |
"Fal-Multiple-Angles": {
|
| 179 |
"repo": "fal/Qwen-Image-Edit-2511-Multiple-Angles-LoRA",
|
| 180 |
"weights": "qwen-image-edit-2511-multiple-angles-lora.safetensors",
|
|
|
|
| 209 |
|
| 210 |
return new_width, new_height
|
| 211 |
|
| 212 |
+
def update_lora(lora_adapter):
|
| 213 |
+
spec = ADAPTER_SPECS.get(lora_adapter)
|
| 214 |
+
if not spec:
|
| 215 |
+
raise gr.Error(f"Configuration not found for: {lora_adapter}")
|
| 216 |
+
|
| 217 |
+
adapter_name = spec["adapter_name"]
|
| 218 |
+
prompt = spec['prompt']
|
| 219 |
+
return prompt
|
| 220 |
|
| 221 |
|
| 222 |
@spaces.GPU(duration=20)
|
|
|
|
| 418 |
outputs=[output_image, seed]
|
| 419 |
)
|
| 420 |
|
| 421 |
+
lora_adapter.change(
|
| 422 |
+
fn=update_lora,
|
| 423 |
+
inputs=[lora_adapter],
|
| 424 |
+
outputs=[prompt]
|
| 425 |
+
)
|
| 426 |
+
|
| 427 |
if __name__ == "__main__":
|
| 428 |
demo.queue(max_size=30).launch(css=css, theme=orange_red_theme, mcp_server=True, ssr_mode=False, show_error=True)
|