Update README.md
Browse files
README.md
CHANGED
@@ -30,9 +30,30 @@ You should use `tugce` to trigger the image generation.
|
|
30 |
from diffusers import AutoPipelineForText2Image
|
31 |
import torch
|
32 |
|
|
|
33 |
pipeline = AutoPipelineForText2Image.from_pretrained('black-forest-labs/FLUX.1-dev', torch_dtype=torch.float16).to('cuda')
|
34 |
pipeline.load_lora_weights('codermert/tugce2-lora', weight_name='flux_train_replicate.safetensors')
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
```
|
37 |
|
38 |
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)
|
|
|
30 |
from diffusers import AutoPipelineForText2Image
|
31 |
import torch
|
32 |
|
33 |
+
# Model ve LoRA'yı yükle
|
34 |
pipeline = AutoPipelineForText2Image.from_pretrained('black-forest-labs/FLUX.1-dev', torch_dtype=torch.float16).to('cuda')
|
35 |
pipeline.load_lora_weights('codermert/tugce2-lora', weight_name='flux_train_replicate.safetensors')
|
36 |
+
|
37 |
+
# Farklı en boy oranları
|
38 |
+
aspect_ratios = [
|
39 |
+
(512, 512), # 1:1
|
40 |
+
(768, 768), # 3:3 (aslında 1:1 ile aynı oran)
|
41 |
+
(640, 512), # 5:4
|
42 |
+
(768, 512), # 3:2
|
43 |
+
(896, 512), # 7:4
|
44 |
+
]
|
45 |
+
|
46 |
+
# Her bir oran için görüntü oluştur
|
47 |
+
for width, height in aspect_ratios:
|
48 |
+
image = pipeline(
|
49 |
+
'tugce in a beautiful garden',
|
50 |
+
width=width,
|
51 |
+
height=height
|
52 |
+
).images[0]
|
53 |
+
|
54 |
+
# Görüntüyü kaydet
|
55 |
+
image.save(f"tugce_{width}x{height}.png")
|
56 |
+
print(f"Oluşturuldu: tugce_{width}x{height}.png")
|
57 |
```
|
58 |
|
59 |
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)
|