Upload folder using huggingface_hub
Browse files- .gitattributes +19 -0
- .msc +0 -0
- .mv +1 -0
- README.md +67 -0
- assets/car/image_0_0.jpg +3 -0
- assets/car/image_0_1.jpg +3 -0
- assets/car/image_0_2.jpg +3 -0
- assets/car/image_0_3.jpg +3 -0
- assets/car/image_1_1.jpg +3 -0
- assets/car/image_1_2.jpg +3 -0
- assets/car/image_1_3.jpg +3 -0
- assets/car/image_2_2.jpg +3 -0
- assets/car/image_2_3.jpg +3 -0
- assets/car/image_3_3.jpg +3 -0
- assets/cat/image_0_0.jpg +0 -0
- assets/cat/image_0_1.jpg +3 -0
- assets/cat/image_0_2.jpg +3 -0
- assets/cat/image_0_3.jpg +3 -0
- assets/cat/image_1_1.jpg +3 -0
- assets/cat/image_1_2.jpg +3 -0
- assets/cat/image_1_3.jpg +3 -0
- assets/cat/image_2_2.jpg +3 -0
- assets/cat/image_2_3.jpg +3 -0
- assets/cat/image_3_3.jpg +3 -0
- configuration.json +1 -0
- model.safetensors +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,22 @@ 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/car/image_0_0.jpg filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
assets/car/image_0_1.jpg filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
assets/car/image_0_2.jpg filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
assets/car/image_0_3.jpg filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
assets/car/image_1_1.jpg filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
assets/car/image_1_2.jpg filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
assets/car/image_1_3.jpg filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
assets/car/image_2_2.jpg filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
assets/car/image_2_3.jpg filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
assets/car/image_3_3.jpg filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
assets/cat/image_0_1.jpg filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
assets/cat/image_0_2.jpg filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
assets/cat/image_0_3.jpg filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
assets/cat/image_1_1.jpg filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
assets/cat/image_1_2.jpg filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
assets/cat/image_1_3.jpg filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
assets/cat/image_2_2.jpg filter=lfs diff=lfs merge=lfs -text
|
| 53 |
+
assets/cat/image_2_3.jpg filter=lfs diff=lfs merge=lfs -text
|
| 54 |
+
assets/cat/image_3_3.jpg filter=lfs diff=lfs merge=lfs -text
|
.msc
ADDED
|
Binary file (1.8 kB). View file
|
|
|
.mv
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Revision:master,CreatedAt:1754391615
|
README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LoRA 融合器(FLUX.1-dev)
|
| 2 |
+
|
| 3 |
+
本模型用于调和多 LoRA 模型同时加载时的互斥关系,防止出现画面崩坏。
|
| 4 |
+
|
| 5 |
+
细节请参考我们的论文:[AutoLoRA: Automatic LoRA Retrieval and Fine-Grained Gated Fusion for Text-to-Image Generation](https://arxiv.org/abs/2508.02107)
|
| 6 |
+
|
| 7 |
+
**我们仍在优化这一模型,此版本模型在部分 LoRA 上的效果仍不稳定,敬请期待我们后续的更新。**
|
| 8 |
+
|
| 9 |
+
## 效果展示
|
| 10 |
+
|
| 11 |
+
提示词:`a cat`
|
| 12 |
+
|
| 13 |
+
||[LoRA 1](https://modelscope.cn/models/cancel13/cxsk)|[LoRA 2](https://modelscope.cn/models/wy413928499/xuancai2)|[LoRA 3](https://modelscope.cn/models/DiffSynth-Studio/ArtAug-lora-FLUX.1dev-v1)|[LoRA 4](https://modelscope.cn/models/hongyanbujian/JPL)|
|
| 14 |
+
|-|-|-|-|-|
|
| 15 |
+
|[LoRA 1](https://modelscope.cn/models/cancel13/cxsk)|||||
|
| 16 |
+
|[LoRA 2](https://modelscope.cn/models/wy413928499/xuancai2)|||||
|
| 17 |
+
|[LoRA 3](https://modelscope.cn/models/DiffSynth-Studio/ArtAug-lora-FLUX.1dev-v1)|||||
|
| 18 |
+
|[LoRA 4](https://modelscope.cn/models/hongyanbujian/JPL)|||||
|
| 19 |
+
|
| 20 |
+
提示词:`a car`
|
| 21 |
+
|
| 22 |
+
||[LoRA 1](https://modelscope.cn/models/cancel13/cxsk)|[LoRA 2](https://modelscope.cn/models/wy413928499/xuancai2)|[LoRA 3](https://modelscope.cn/models/DiffSynth-Studio/ArtAug-lora-FLUX.1dev-v1)|[LoRA 4](https://modelscope.cn/models/hongyanbujian/JPL)|
|
| 23 |
+
|-|-|-|-|-|
|
| 24 |
+
|[LoRA 1](https://modelscope.cn/models/cancel13/cxsk)|||||
|
| 25 |
+
|[LoRA 2](https://modelscope.cn/models/wy413928499/xuancai2)|||||
|
| 26 |
+
|[LoRA 3](https://modelscope.cn/models/DiffSynth-Studio/ArtAug-lora-FLUX.1dev-v1)|||||
|
| 27 |
+
|[LoRA 4](https://modelscope.cn/models/hongyanbujian/JPL)|||||
|
| 28 |
+
|
| 29 |
+
## 推理代码
|
| 30 |
+
|
| 31 |
+
```shell
|
| 32 |
+
git clone https://github.com/modelscope/DiffSynth-Studio.git
|
| 33 |
+
cd DiffSynth-Studio
|
| 34 |
+
pip install -e .
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
```python
|
| 38 |
+
import torch
|
| 39 |
+
from diffsynth.pipelines.flux_image_new import FluxImagePipeline, ModelConfig
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
pipe = FluxImagePipeline.from_pretrained(
|
| 43 |
+
torch_dtype=torch.bfloat16,
|
| 44 |
+
device="cuda",
|
| 45 |
+
model_configs=[
|
| 46 |
+
ModelConfig(model_id="black-forest-labs/FLUX.1-dev", origin_file_pattern="flux1-dev.safetensors"),
|
| 47 |
+
ModelConfig(model_id="black-forest-labs/FLUX.1-dev", origin_file_pattern="text_encoder/model.safetensors"),
|
| 48 |
+
ModelConfig(model_id="black-forest-labs/FLUX.1-dev", origin_file_pattern="text_encoder_2/"),
|
| 49 |
+
ModelConfig(model_id="black-forest-labs/FLUX.1-dev", origin_file_pattern="ae.safetensors"),
|
| 50 |
+
ModelConfig(model_id="DiffSynth-Studio/LoRAFusion-preview-FLUX.1-dev", origin_file_pattern="model.safetensors"),
|
| 51 |
+
],
|
| 52 |
+
)
|
| 53 |
+
pipe.enable_lora_magic()
|
| 54 |
+
|
| 55 |
+
pipe.load_lora(
|
| 56 |
+
pipe.dit,
|
| 57 |
+
ModelConfig(model_id="cancel13/cxsk", origin_file_pattern="30.safetensors"),
|
| 58 |
+
hotload=True,
|
| 59 |
+
)
|
| 60 |
+
pipe.load_lora(
|
| 61 |
+
pipe.dit,
|
| 62 |
+
ModelConfig(model_id="DiffSynth-Studio/ArtAug-lora-FLUX.1dev-v1", origin_file_pattern="merged_lora.safetensors"),
|
| 63 |
+
hotload=True,
|
| 64 |
+
)
|
| 65 |
+
image = pipe(prompt="a cat", seed=0)
|
| 66 |
+
image.save("image_fused.jpg")
|
| 67 |
+
```
|
assets/car/image_0_0.jpg
ADDED
|
Git LFS Details
|
assets/car/image_0_1.jpg
ADDED
|
Git LFS Details
|
assets/car/image_0_2.jpg
ADDED
|
Git LFS Details
|
assets/car/image_0_3.jpg
ADDED
|
Git LFS Details
|
assets/car/image_1_1.jpg
ADDED
|
Git LFS Details
|
assets/car/image_1_2.jpg
ADDED
|
Git LFS Details
|
assets/car/image_1_3.jpg
ADDED
|
Git LFS Details
|
assets/car/image_2_2.jpg
ADDED
|
Git LFS Details
|
assets/car/image_2_3.jpg
ADDED
|
Git LFS Details
|
assets/car/image_3_3.jpg
ADDED
|
Git LFS Details
|
assets/cat/image_0_0.jpg
ADDED
|
assets/cat/image_0_1.jpg
ADDED
|
Git LFS Details
|
assets/cat/image_0_2.jpg
ADDED
|
Git LFS Details
|
assets/cat/image_0_3.jpg
ADDED
|
Git LFS Details
|
assets/cat/image_1_1.jpg
ADDED
|
Git LFS Details
|
assets/cat/image_1_2.jpg
ADDED
|
Git LFS Details
|
assets/cat/image_1_3.jpg
ADDED
|
Git LFS Details
|
assets/cat/image_2_2.jpg
ADDED
|
Git LFS Details
|
assets/cat/image_2_3.jpg
ADDED
|
Git LFS Details
|
assets/cat/image_3_3.jpg
ADDED
|
Git LFS Details
|
configuration.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"framework":"Pytorch","task":"text-to-image-synthesis"}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9266a522aa452bdde120dc76173f6cc474080a6c7c4d6354efc18131c0d16170
|
| 3 |
+
size 109596256
|