Update README.md
Browse files
README.md
CHANGED
@@ -29,9 +29,23 @@ You should use `tugce` to trigger the image generation.
|
|
29 |
```py
|
30 |
from diffusers import AutoPipelineForText2Image
|
31 |
import torch
|
|
|
|
|
32 |
pipeline = AutoPipelineForText2Image.from_pretrained('black-forest-labs/FLUX.1-dev', torch_dtype=torch.float16).to('cuda')
|
|
|
|
|
33 |
pipeline.load_lora_weights('codermert/model_malika', weight_name='sarah-lora-000001.safetensors')
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
```
|
36 |
|
37 |
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)
|
|
|
29 |
```py
|
30 |
from diffusers import AutoPipelineForText2Image
|
31 |
import torch
|
32 |
+
|
33 |
+
# Modeli yükleyin
|
34 |
pipeline = AutoPipelineForText2Image.from_pretrained('black-forest-labs/FLUX.1-dev', torch_dtype=torch.float16).to('cuda')
|
35 |
+
|
36 |
+
# LoRA ağırlıklarını yükleyin
|
37 |
pipeline.load_lora_weights('codermert/model_malika', weight_name='sarah-lora-000001.safetensors')
|
38 |
+
|
39 |
+
# Prompt'unuzu ve istediğiniz boyutları belirleyin
|
40 |
+
prompt = "bikini girl, home"
|
41 |
+
height = 512 # İstediğiniz yükseklik
|
42 |
+
width = 768 # İstediğiniz genişlik
|
43 |
+
|
44 |
+
# Resmi oluşturun
|
45 |
+
image = pipeline(prompt, height=height, width=width).images[0]
|
46 |
+
|
47 |
+
# Resmi kaydedin
|
48 |
+
image.save("custom_size_image.png")
|
49 |
```
|
50 |
|
51 |
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)
|