Update README.md
Browse files
README.md
CHANGED
|
@@ -8,47 +8,38 @@ tags:
|
|
| 8 |
- flux
|
| 9 |
- diffusers
|
| 10 |
- lora
|
| 11 |
-
-
|
|
|
|
| 12 |
base_model: "black-forest-labs/FLUX.1-dev"
|
| 13 |
pipeline_tag: text-to-image
|
| 14 |
-
#
|
| 15 |
-
# - text: >-
|
| 16 |
-
# prompt
|
| 17 |
-
# output:
|
| 18 |
-
# url: https://...
|
| 19 |
-
instance_prompt: TOK
|
| 20 |
---
|
| 21 |
|
| 22 |
# Malika
|
| 23 |
|
| 24 |
<Gallery />
|
| 25 |
|
|
|
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
```py
|
| 30 |
-
from diffusers import AutoPipelineForText2Image
|
| 31 |
import torch
|
| 32 |
|
| 33 |
-
#
|
| 34 |
-
pipeline =
|
| 35 |
-
"
|
| 36 |
torch_dtype=torch.float16
|
| 37 |
).to("cuda")
|
| 38 |
|
| 39 |
-
#
|
| 40 |
pipeline.load_lora_weights(
|
| 41 |
"codermert/malikafinal",
|
| 42 |
weight_name="lora.safetensors",
|
| 43 |
-
adapter_name="
|
| 44 |
-
cross_attention_scale=0.5 # LoRA etkisini hafiflet
|
| 45 |
)
|
| 46 |
|
| 47 |
-
#
|
| 48 |
image = pipeline(
|
| 49 |
-
prompt="portrait of TOK, <
|
| 50 |
negative_prompt="blurry, deformed"
|
| 51 |
-
).images[0]
|
| 52 |
-
```
|
| 53 |
-
|
| 54 |
-
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)
|
|
|
|
| 8 |
- flux
|
| 9 |
- diffusers
|
| 10 |
- lora
|
| 11 |
+
- stable-diffusion
|
| 12 |
+
- text-to-image
|
| 13 |
base_model: "black-forest-labs/FLUX.1-dev"
|
| 14 |
pipeline_tag: text-to-image
|
| 15 |
+
inference: true # Bu satırı ekleyin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
---
|
| 17 |
|
| 18 |
# Malika
|
| 19 |
|
| 20 |
<Gallery />
|
| 21 |
|
| 22 |
+
## Usage with 🧨 Diffusers
|
| 23 |
|
| 24 |
+
```python
|
| 25 |
+
from diffusers import DiffusionPipeline
|
|
|
|
|
|
|
| 26 |
import torch
|
| 27 |
|
| 28 |
+
# Load base model
|
| 29 |
+
pipeline = DiffusionPipeline.from_pretrained(
|
| 30 |
+
"black-forest-labs/FLUX.1-dev",
|
| 31 |
torch_dtype=torch.float16
|
| 32 |
).to("cuda")
|
| 33 |
|
| 34 |
+
# Load your LoRA
|
| 35 |
pipeline.load_lora_weights(
|
| 36 |
"codermert/malikafinal",
|
| 37 |
weight_name="lora.safetensors",
|
| 38 |
+
adapter_name="malika"
|
|
|
|
| 39 |
)
|
| 40 |
|
| 41 |
+
# Generate image
|
| 42 |
image = pipeline(
|
| 43 |
+
prompt="portrait of TOK, <malika>, photorealistic, 8K",
|
| 44 |
negative_prompt="blurry, deformed"
|
| 45 |
+
).images[0]
|
|
|
|
|
|
|
|
|