read weights from own account
Browse files
README.md
CHANGED
|
@@ -10,9 +10,9 @@ app_file: app.py
|
|
| 10 |
pinned: true
|
| 11 |
short_description: Image Lab — internal tooling
|
| 12 |
preload_from_hub:
|
| 13 |
-
-
|
| 14 |
-
-
|
| 15 |
-
-
|
| 16 |
-
-
|
| 17 |
-
-
|
| 18 |
---
|
|
|
|
| 10 |
pinned: true
|
| 11 |
short_description: Image Lab — internal tooling
|
| 12 |
preload_from_hub:
|
| 13 |
+
- dremokk/qwen-image-edit-rapid-aio-v19 config.json,diffusion_pytorch_model-00001-of-00003.safetensors,diffusion_pytorch_model-00002-of-00003.safetensors,diffusion_pytorch_model-00003-of-00003.safetensors,diffusion_pytorch_model.safetensors.index.json e7beaa0a2cd21a2e6ee7601f75f4c3d1bd005216
|
| 14 |
+
- dremokk/qwen-image-edit-2511 model_index.json,processor/added_tokens.json,processor/chat_template.jinja,processor/merges.txt,processor/preprocessor_config.json,processor/special_tokens_map.json,processor/tokenizer.json,processor/tokenizer_config.json,processor/video_preprocessor_config.json,processor/vocab.json,scheduler/scheduler_config.json,text_encoder/config.json,text_encoder/generation_config.json,text_encoder/model-00001-of-00004.safetensors,text_encoder/model-00002-of-00004.safetensors,text_encoder/model-00003-of-00004.safetensors,text_encoder/model-00004-of-00004.safetensors,text_encoder/model.safetensors.index.json,tokenizer/added_tokens.json,tokenizer/chat_template.jinja,tokenizer/merges.txt,tokenizer/special_tokens_map.json,tokenizer/tokenizer_config.json,tokenizer/vocab.json,vae/config.json,vae/diffusion_pytorch_model.safetensors 2728c4c18321beffd375e74570ce07124555abe4
|
| 15 |
+
- dremokk/wan21-vae-upscale2x config.json,diffusion_pytorch_model.safetensors acff4c25bae598b6b44db9b1a5d5a983beac5ab6
|
| 16 |
+
- dremokk/qwen-image-edit-2509-photo-to-anime Qwen-Image-Edit-2509-Photo-to-Anime_000001000.safetensors b408b70da82746ce82e38e8ae8c1b46849db195c
|
| 17 |
+
- dremokk/qie-loras 3bdf5c5a.safetensors,42dc0cf4.safetensors,4c98877c.safetensors,anime-v2.safetensors,any-light.safetensors,anything2real.safetensors,b7862b96.safetensors,cinematic-flatlog.safetensors,fal-multiple-angles.safetensors,hyper-realistic-portrait.safetensors,light-migration.safetensors,lowres-fix.safetensors,manga-tone.safetensors,midnight-noir-eyes-spotlight.safetensors,multiple-angles.safetensors,noir-comic-book.safetensors,pixar-inspired-3d.safetensors,polaroid-photo.safetensors,studio-delight.safetensors,style-transfer.safetensors,ultra-realistic-portrait.safetensors,unblur-anything.safetensors,upscaler.safetensors 61cbb9afa92b9ec54a85050a86d01a95bb8ebfab
|
| 18 |
---
|
app.py
CHANGED
|
@@ -19,15 +19,15 @@ from diffusers.pipelines.qwenimage.pipeline_qwenimage_edit_plus import (
|
|
| 19 |
calculate_dimensions,
|
| 20 |
)
|
| 21 |
|
| 22 |
-
BASE_REPO = "
|
| 23 |
-
BASE_REV = "
|
| 24 |
-
TRANSFORMER_REPO = "
|
| 25 |
-
TRANSFORMER_REV = "
|
| 26 |
# Retrained Wan2.1 decoder that emits 12 channels and pixel-shuffles to 2x. Qwen froze Wan's
|
| 27 |
# encoder and fine-tuned only the image decoder, so the two share one latent space exactly —
|
| 28 |
# same z_dim and the same 16 latents_mean/latents_std values. That is what makes the swap legal.
|
| 29 |
-
UPSCALE_VAE_REPO = "
|
| 30 |
-
UPSCALE_VAE_REV = "
|
| 31 |
|
| 32 |
dtype = torch.bfloat16
|
| 33 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
@@ -59,7 +59,7 @@ upscale_vae = AutoencoderKLWan.from_pretrained(
|
|
| 59 |
|
| 60 |
MAX_SEED = np.iinfo(np.int32).max
|
| 61 |
|
| 62 |
-
# Edit-style LoRA adapters, self-hosted on
|
| 63 |
# the base + transformer. Loaded at import in the main process, where the network and HF cache are
|
| 64 |
# available; the @spaces.GPU task only toggles set_adapters (its sandbox can neither download nor
|
| 65 |
# write the cache). NO_ADAPTER = the baked pipeline, unchanged behaviour.
|
|
@@ -67,146 +67,146 @@ NO_ADAPTER = "None"
|
|
| 67 |
|
| 68 |
ADAPTER_SPECS = {
|
| 69 |
"Photo-to-Anime": {
|
| 70 |
-
"repo": "
|
| 71 |
-
"revision": "
|
| 72 |
"weights": "Qwen-Image-Edit-2509-Photo-to-Anime_000001000.safetensors",
|
| 73 |
"adapter_name": "photo-to-anime",
|
| 74 |
},
|
| 75 |
"Multiple-Angles": {
|
| 76 |
-
"repo": "
|
| 77 |
-
"revision": "
|
| 78 |
"weights": "multiple-angles.safetensors",
|
| 79 |
"adapter_name": "multiple-angles",
|
| 80 |
},
|
| 81 |
"Anime-V2": {
|
| 82 |
-
"repo": "
|
| 83 |
-
"revision": "
|
| 84 |
"weights": "anime-v2.safetensors",
|
| 85 |
"adapter_name": "anime-v2",
|
| 86 |
},
|
| 87 |
"Light-Migration": {
|
| 88 |
-
"repo": "
|
| 89 |
-
"revision": "
|
| 90 |
"weights": "light-migration.safetensors",
|
| 91 |
"adapter_name": "light-migration",
|
| 92 |
},
|
| 93 |
"Upscaler": {
|
| 94 |
-
"repo": "
|
| 95 |
-
"revision": "
|
| 96 |
"weights": "upscaler.safetensors",
|
| 97 |
"adapter_name": "upscaler",
|
| 98 |
},
|
| 99 |
"Style-Transfer": {
|
| 100 |
-
"repo": "
|
| 101 |
-
"revision": "
|
| 102 |
"weights": "style-transfer.safetensors",
|
| 103 |
"adapter_name": "style-transfer",
|
| 104 |
},
|
| 105 |
"Manga-Tone": {
|
| 106 |
-
"repo": "
|
| 107 |
-
"revision": "
|
| 108 |
"weights": "manga-tone.safetensors",
|
| 109 |
"adapter_name": "manga-tone",
|
| 110 |
},
|
| 111 |
"Anything2Real": {
|
| 112 |
-
"repo": "
|
| 113 |
-
"revision": "
|
| 114 |
"weights": "anything2real.safetensors",
|
| 115 |
"adapter_name": "anything2real",
|
| 116 |
},
|
| 117 |
"Polaroid-Photo": {
|
| 118 |
-
"repo": "
|
| 119 |
-
"revision": "
|
| 120 |
"weights": "polaroid-photo.safetensors",
|
| 121 |
"adapter_name": "polaroid-photo",
|
| 122 |
},
|
| 123 |
"Midnight-Noir-Eyes-Spotlight": {
|
| 124 |
-
"repo": "
|
| 125 |
-
"revision": "
|
| 126 |
"weights": "midnight-noir-eyes-spotlight.safetensors",
|
| 127 |
"adapter_name": "midnight-noir-eyes-spotlight",
|
| 128 |
},
|
| 129 |
"Hyper-Realistic-Portrait": {
|
| 130 |
-
"repo": "
|
| 131 |
-
"revision": "
|
| 132 |
"weights": "hyper-realistic-portrait.safetensors",
|
| 133 |
"adapter_name": "hyper-realistic-portrait",
|
| 134 |
},
|
| 135 |
"Ultra-Realistic-Portrait": {
|
| 136 |
-
"repo": "
|
| 137 |
-
"revision": "
|
| 138 |
"weights": "ultra-realistic-portrait.safetensors",
|
| 139 |
"adapter_name": "ultra-realistic-portrait",
|
| 140 |
},
|
| 141 |
"Pixar-Inspired-3D": {
|
| 142 |
-
"repo": "
|
| 143 |
-
"revision": "
|
| 144 |
"weights": "pixar-inspired-3d.safetensors",
|
| 145 |
"adapter_name": "pixar-inspired-3d",
|
| 146 |
},
|
| 147 |
"Noir-Comic-Book": {
|
| 148 |
-
"repo": "
|
| 149 |
-
"revision": "
|
| 150 |
"weights": "noir-comic-book.safetensors",
|
| 151 |
"adapter_name": "noir-comic-book",
|
| 152 |
},
|
| 153 |
"Any-light": {
|
| 154 |
-
"repo": "
|
| 155 |
-
"revision": "
|
| 156 |
"weights": "any-light.safetensors",
|
| 157 |
"adapter_name": "any-light",
|
| 158 |
},
|
| 159 |
"Studio-DeLight": {
|
| 160 |
-
"repo": "
|
| 161 |
-
"revision": "
|
| 162 |
"weights": "studio-delight.safetensors",
|
| 163 |
"adapter_name": "studio-delight",
|
| 164 |
},
|
| 165 |
"4c98877c": {
|
| 166 |
-
"repo": "
|
| 167 |
-
"revision": "
|
| 168 |
"weights": "4c98877c.safetensors",
|
| 169 |
"adapter_name": "4c98877c",
|
| 170 |
},
|
| 171 |
"b7862b96": {
|
| 172 |
-
"repo": "
|
| 173 |
-
"revision": "
|
| 174 |
"weights": "b7862b96.safetensors",
|
| 175 |
"adapter_name": "b7862b96",
|
| 176 |
},
|
| 177 |
"42dc0cf4": {
|
| 178 |
-
"repo": "
|
| 179 |
-
"revision": "
|
| 180 |
"weights": "42dc0cf4.safetensors",
|
| 181 |
"adapter_name": "42dc0cf4",
|
| 182 |
},
|
| 183 |
"3bdf5c5a": {
|
| 184 |
-
"repo": "
|
| 185 |
-
"revision": "
|
| 186 |
"weights": "3bdf5c5a.safetensors",
|
| 187 |
"adapter_name": "3bdf5c5a",
|
| 188 |
},
|
| 189 |
"Lowres-Fix": {
|
| 190 |
-
"repo": "
|
| 191 |
-
"revision": "
|
| 192 |
"weights": "lowres-fix.safetensors",
|
| 193 |
"adapter_name": "lowres-fix",
|
| 194 |
},
|
| 195 |
"Fal-Multiple-Angles": {
|
| 196 |
-
"repo": "
|
| 197 |
-
"revision": "
|
| 198 |
"weights": "fal-multiple-angles.safetensors",
|
| 199 |
"adapter_name": "fal-multiple-angles",
|
| 200 |
},
|
| 201 |
"Unblur-Anything": {
|
| 202 |
-
"repo": "
|
| 203 |
-
"revision": "
|
| 204 |
"weights": "unblur-anything.safetensors",
|
| 205 |
"adapter_name": "unblur-anything",
|
| 206 |
},
|
| 207 |
"Cinematic-FlatLog": {
|
| 208 |
-
"repo": "
|
| 209 |
-
"revision": "
|
| 210 |
"weights": "cinematic-flatlog.safetensors",
|
| 211 |
"adapter_name": "cinematic-flatlog",
|
| 212 |
},
|
|
|
|
| 19 |
calculate_dimensions,
|
| 20 |
)
|
| 21 |
|
| 22 |
+
BASE_REPO = "dremokk/qwen-image-edit-2511"
|
| 23 |
+
BASE_REV = "2728c4c18321beffd375e74570ce07124555abe4"
|
| 24 |
+
TRANSFORMER_REPO = "dremokk/qwen-image-edit-rapid-aio-v19"
|
| 25 |
+
TRANSFORMER_REV = "e7beaa0a2cd21a2e6ee7601f75f4c3d1bd005216"
|
| 26 |
# Retrained Wan2.1 decoder that emits 12 channels and pixel-shuffles to 2x. Qwen froze Wan's
|
| 27 |
# encoder and fine-tuned only the image decoder, so the two share one latent space exactly —
|
| 28 |
# same z_dim and the same 16 latents_mean/latents_std values. That is what makes the swap legal.
|
| 29 |
+
UPSCALE_VAE_REPO = "dremokk/wan21-vae-upscale2x"
|
| 30 |
+
UPSCALE_VAE_REV = "acff4c25bae598b6b44db9b1a5d5a983beac5ab6"
|
| 31 |
|
| 32 |
dtype = torch.bfloat16
|
| 33 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
|
| 59 |
|
| 60 |
MAX_SEED = np.iinfo(np.int32).max
|
| 61 |
|
| 62 |
+
# Edit-style LoRA adapters, self-hosted on the owner account and preloaded at build (README) exactly like
|
| 63 |
# the base + transformer. Loaded at import in the main process, where the network and HF cache are
|
| 64 |
# available; the @spaces.GPU task only toggles set_adapters (its sandbox can neither download nor
|
| 65 |
# write the cache). NO_ADAPTER = the baked pipeline, unchanged behaviour.
|
|
|
|
| 67 |
|
| 68 |
ADAPTER_SPECS = {
|
| 69 |
"Photo-to-Anime": {
|
| 70 |
+
"repo": "dremokk/qwen-image-edit-2509-photo-to-anime",
|
| 71 |
+
"revision": "b408b70da82746ce82e38e8ae8c1b46849db195c",
|
| 72 |
"weights": "Qwen-Image-Edit-2509-Photo-to-Anime_000001000.safetensors",
|
| 73 |
"adapter_name": "photo-to-anime",
|
| 74 |
},
|
| 75 |
"Multiple-Angles": {
|
| 76 |
+
"repo": "dremokk/qie-loras",
|
| 77 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 78 |
"weights": "multiple-angles.safetensors",
|
| 79 |
"adapter_name": "multiple-angles",
|
| 80 |
},
|
| 81 |
"Anime-V2": {
|
| 82 |
+
"repo": "dremokk/qie-loras",
|
| 83 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 84 |
"weights": "anime-v2.safetensors",
|
| 85 |
"adapter_name": "anime-v2",
|
| 86 |
},
|
| 87 |
"Light-Migration": {
|
| 88 |
+
"repo": "dremokk/qie-loras",
|
| 89 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 90 |
"weights": "light-migration.safetensors",
|
| 91 |
"adapter_name": "light-migration",
|
| 92 |
},
|
| 93 |
"Upscaler": {
|
| 94 |
+
"repo": "dremokk/qie-loras",
|
| 95 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 96 |
"weights": "upscaler.safetensors",
|
| 97 |
"adapter_name": "upscaler",
|
| 98 |
},
|
| 99 |
"Style-Transfer": {
|
| 100 |
+
"repo": "dremokk/qie-loras",
|
| 101 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 102 |
"weights": "style-transfer.safetensors",
|
| 103 |
"adapter_name": "style-transfer",
|
| 104 |
},
|
| 105 |
"Manga-Tone": {
|
| 106 |
+
"repo": "dremokk/qie-loras",
|
| 107 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 108 |
"weights": "manga-tone.safetensors",
|
| 109 |
"adapter_name": "manga-tone",
|
| 110 |
},
|
| 111 |
"Anything2Real": {
|
| 112 |
+
"repo": "dremokk/qie-loras",
|
| 113 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 114 |
"weights": "anything2real.safetensors",
|
| 115 |
"adapter_name": "anything2real",
|
| 116 |
},
|
| 117 |
"Polaroid-Photo": {
|
| 118 |
+
"repo": "dremokk/qie-loras",
|
| 119 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 120 |
"weights": "polaroid-photo.safetensors",
|
| 121 |
"adapter_name": "polaroid-photo",
|
| 122 |
},
|
| 123 |
"Midnight-Noir-Eyes-Spotlight": {
|
| 124 |
+
"repo": "dremokk/qie-loras",
|
| 125 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 126 |
"weights": "midnight-noir-eyes-spotlight.safetensors",
|
| 127 |
"adapter_name": "midnight-noir-eyes-spotlight",
|
| 128 |
},
|
| 129 |
"Hyper-Realistic-Portrait": {
|
| 130 |
+
"repo": "dremokk/qie-loras",
|
| 131 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 132 |
"weights": "hyper-realistic-portrait.safetensors",
|
| 133 |
"adapter_name": "hyper-realistic-portrait",
|
| 134 |
},
|
| 135 |
"Ultra-Realistic-Portrait": {
|
| 136 |
+
"repo": "dremokk/qie-loras",
|
| 137 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 138 |
"weights": "ultra-realistic-portrait.safetensors",
|
| 139 |
"adapter_name": "ultra-realistic-portrait",
|
| 140 |
},
|
| 141 |
"Pixar-Inspired-3D": {
|
| 142 |
+
"repo": "dremokk/qie-loras",
|
| 143 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 144 |
"weights": "pixar-inspired-3d.safetensors",
|
| 145 |
"adapter_name": "pixar-inspired-3d",
|
| 146 |
},
|
| 147 |
"Noir-Comic-Book": {
|
| 148 |
+
"repo": "dremokk/qie-loras",
|
| 149 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 150 |
"weights": "noir-comic-book.safetensors",
|
| 151 |
"adapter_name": "noir-comic-book",
|
| 152 |
},
|
| 153 |
"Any-light": {
|
| 154 |
+
"repo": "dremokk/qie-loras",
|
| 155 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 156 |
"weights": "any-light.safetensors",
|
| 157 |
"adapter_name": "any-light",
|
| 158 |
},
|
| 159 |
"Studio-DeLight": {
|
| 160 |
+
"repo": "dremokk/qie-loras",
|
| 161 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 162 |
"weights": "studio-delight.safetensors",
|
| 163 |
"adapter_name": "studio-delight",
|
| 164 |
},
|
| 165 |
"4c98877c": {
|
| 166 |
+
"repo": "dremokk/qie-loras",
|
| 167 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 168 |
"weights": "4c98877c.safetensors",
|
| 169 |
"adapter_name": "4c98877c",
|
| 170 |
},
|
| 171 |
"b7862b96": {
|
| 172 |
+
"repo": "dremokk/qie-loras",
|
| 173 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 174 |
"weights": "b7862b96.safetensors",
|
| 175 |
"adapter_name": "b7862b96",
|
| 176 |
},
|
| 177 |
"42dc0cf4": {
|
| 178 |
+
"repo": "dremokk/qie-loras",
|
| 179 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 180 |
"weights": "42dc0cf4.safetensors",
|
| 181 |
"adapter_name": "42dc0cf4",
|
| 182 |
},
|
| 183 |
"3bdf5c5a": {
|
| 184 |
+
"repo": "dremokk/qie-loras",
|
| 185 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 186 |
"weights": "3bdf5c5a.safetensors",
|
| 187 |
"adapter_name": "3bdf5c5a",
|
| 188 |
},
|
| 189 |
"Lowres-Fix": {
|
| 190 |
+
"repo": "dremokk/qie-loras",
|
| 191 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 192 |
"weights": "lowres-fix.safetensors",
|
| 193 |
"adapter_name": "lowres-fix",
|
| 194 |
},
|
| 195 |
"Fal-Multiple-Angles": {
|
| 196 |
+
"repo": "dremokk/qie-loras",
|
| 197 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 198 |
"weights": "fal-multiple-angles.safetensors",
|
| 199 |
"adapter_name": "fal-multiple-angles",
|
| 200 |
},
|
| 201 |
"Unblur-Anything": {
|
| 202 |
+
"repo": "dremokk/qie-loras",
|
| 203 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 204 |
"weights": "unblur-anything.safetensors",
|
| 205 |
"adapter_name": "unblur-anything",
|
| 206 |
},
|
| 207 |
"Cinematic-FlatLog": {
|
| 208 |
+
"repo": "dremokk/qie-loras",
|
| 209 |
+
"revision": "61cbb9afa92b9ec54a85050a86d01a95bb8ebfab",
|
| 210 |
"weights": "cinematic-flatlog.safetensors",
|
| 211 |
"adapter_name": "cinematic-flatlog",
|
| 212 |
},
|