codermert commited on
Commit
ceb7537
1 Parent(s): 8e011dd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +44 -1
README.md CHANGED
@@ -2,4 +2,47 @@
2
  license: other
3
  license_name: flux-1-dev-non-commercial-license
4
  license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md
5
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: other
3
  license_name: flux-1-dev-non-commercial-license
4
  license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md
5
+ language:
6
+ - en
7
+ tags:
8
+ - flux
9
+ - diffusers
10
+ - lora
11
+ base_model: "black-forest-labs/FLUX.1-dev"
12
+ pipeline_tag: text-to-image
13
+ instance_prompt: mert
14
+ ---
15
+
16
+ # mert LoRa Trainer (developing...)
17
+
18
+ Trained on Replicate using:
19
+
20
+ https://replicate.com/ostris/flux-dev-lora-trainer/train
21
+
22
+
23
+ ## Trigger words
24
+ You should use `mert` to trigger the image generation.
25
+
26
+
27
+ ## Use it with the [🧨 diffusers library](https://github.com/huggingface/diffusers)
28
+
29
+ ```py
30
+ import torch
31
+ from diffusers import FluxPipeline
32
+
33
+ pipe = FluxPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-0.9", torch_dtype=torch.bfloat16)
34
+ pipe.load_lora_weights('codermert/mert_flux', weight_name='flux_train_replicate.safetensors')
35
+ pipe.fuse_lora(lora_scale=0.9)
36
+ pipe.to("cuda")
37
+
38
+ prompt = "close up portrait, Amidst the interplay of light and shadows in a photography studio,a soft spotlight traces the contours of a face,highlighting a figure clad in a sleek black turtleneck. The garment,hugging the skin with subtle luxury,complements the Caucasian model's understated makeup,embodying minimalist elegance. Behind,a pale gray backdrop extends,its fine texture shimmering subtly in the dim light,artfully balancing the composition and focusing attention on the subject. In a palette of black,gray,and skin tones,simplicity intertwines with profundity,as every detail whispers untold stories."
39
+
40
+ image = pipe(prompt,
41
+ num_inference_steps=24,
42
+ guidance_scale=3.5,
43
+ width=768, height=1024,
44
+ ).images[0]
45
+ image.save(f"example.png")
46
+ ```
47
+
48
+ For more details, including weighting, merging and fusing LoRAs, check the [documentation on loading LoRAs in diffusers](https://huggingface.co/docs/diffusers/main/en/using-diffusers/loading_adapters)