Text-to-Image
Diffusers
diffusers-training
lora
FLUX.1-dev
science
materiomics
bio-inspired
materials science
generative AI for science
Instructions to use lamm-mit/leaf-L-FLUX.1-dev with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use lamm-mit/leaf-L-FLUX.1-dev with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("lamm-mit/leaf-L-FLUX.1-dev") prompt = "<leaf microstructure>" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Update README.md
Browse files
README.md
CHANGED
|
@@ -31,6 +31,8 @@ pip install -U diffusers
|
|
| 31 |
|
| 32 |
These are LoRA adaption weights for the FLUX.1 [dev] model (```black-forest-labs/FLUX.1-dev```). The base model is, and you must first get access to it before loading this LoRA adapter.
|
| 33 |
|
|
|
|
|
|
|
| 34 |
## Trigger keywords
|
| 35 |
|
| 36 |
The following images were used during fine-tuning using the keyword \<leaf microstructure\>:
|
|
@@ -109,10 +111,8 @@ adapter='leaf-flux.safetensors' #Step 4000, final step
|
|
| 109 |
#adapter='leaf-flux-step-3000.safetensors' #Step 3000
|
| 110 |
#adapter='leaf-flux-step-3500.safetensors' #Step 3500
|
| 111 |
|
| 112 |
-
pipeline.load_lora_weights(repo_id, weight_name=adapter)
|
| 113 |
|
| 114 |
-
pipeline=pipeline.to('cuda')
|
| 115 |
-
)
|
| 116 |
pipeline=pipeline.to('cuda')
|
| 117 |
```
|
| 118 |
|
|
|
|
| 31 |
|
| 32 |
These are LoRA adaption weights for the FLUX.1 [dev] model (```black-forest-labs/FLUX.1-dev```). The base model is, and you must first get access to it before loading this LoRA adapter.
|
| 33 |
|
| 34 |
+
This LoRA adapter has rank=64 and alpha=64, trained for 4,000 steps. Earlier checkpoints are available in this repository as well (you can load these via the ```adapter``` parameter, see example below).
|
| 35 |
+
|
| 36 |
## Trigger keywords
|
| 37 |
|
| 38 |
The following images were used during fine-tuning using the keyword \<leaf microstructure\>:
|
|
|
|
| 111 |
#adapter='leaf-flux-step-3000.safetensors' #Step 3000
|
| 112 |
#adapter='leaf-flux-step-3500.safetensors' #Step 3500
|
| 113 |
|
| 114 |
+
pipeline.load_lora_weights(repo_id, weight_name=adapter) #You need to use the weight_name parameter since the repo includes multiple checkpoints
|
| 115 |
|
|
|
|
|
|
|
| 116 |
pipeline=pipeline.to('cuda')
|
| 117 |
```
|
| 118 |
|