--- license: apache-2.0 --- # FLUX 艺术增强 LoRA ## 简介 这是一个为 FLUX.1-dev 训练的 LoRA 模型,能够使模型生成的图像更符合人类的审美,包括但不限于:丰富的细节、唯美的光影、美学的构图、清晰的画面。本模型不需要任何触发词。 * 论文:coming soon * 开源代码:https://github.com/modelscope/DiffSynth-Studio * 模型: * ModelScope: https://www.modelscope.cn/models/DiffSynth-Studio/ArtAug-lora-FLUX.1dev-v1 * HuggingFace: coming soon * 在线体验:点击右上角“一键生成” ## 使用方式 本模型使用 DiffSynth-Studio 训练而来,我们推荐使用 DiffSynth-Studio 进行生成。 ```shell git clone https://github.com/modelscope/DiffSynth-Studio.git cd DiffSynth-Studio pip install -e . ``` ```python import torch from diffsynth import ModelManager, FluxImagePipeline, download_customized_models lora_path = download_customized_models( model_id="DiffSynth-Studio/ArtAug-lora-FLUX.1dev-v1", origin_file_path="merged_lora.safetensors", local_dir="models/lora" )[0] model_manager = ModelManager(torch_dtype=torch.bfloat16, device="cuda", model_id_list=["FLUX.1-dev"]) model_manager.load_lora(lora_path, lora_alpha=1.0) pipe = FluxImagePipeline.from_model_manager(model_manager) image = pipe(prompt="a house", seed=0) image.save("image_artaug.jpg") ``` 由于本模型使用了通用的 FLUX LoRA 格式封装,可以被大多数 LoRA 加载器加载,你可以将这个 LoRA 模型接入到你的工作流中。 ## 图像样例 |FLUX.1-dev|FLUX.1-dev + ArtAug LoRA| |-|-| |![](gallary/image_1_base.jpg)|![](gallary/image_1_enhance.jpg)| |![](gallary/image_2_base.jpg)|![](gallary/image_2_enhance.jpg)| |![](gallary/image_3_base.jpg)|![](gallary/image_3_enhance.jpg)| |![](gallary/image_4_base.jpg)|![](gallary/image_4_enhance.jpg)| |![](gallary/image_5_base.jpg)|![](gallary/image_5_enhance.jpg)| |![](gallary/image_6_base.jpg)|![](gallary/image_6_enhance.jpg)|