codermert commited on
Commit
86c4da5
·
verified ·
1 Parent(s): 981167e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -16
README.md CHANGED
@@ -12,47 +12,50 @@ base_model: "black-forest-labs/FLUX.1-dev"
12
  pipeline_tag: text-to-image
13
  instance_prompt: DHANUSH
14
  ---
 
15
  # Tugce_Flux
 
16
  Trained on Replicate using:
 
17
  https://replicate.com/ostris/flux-dev-lora-trainer/train
18
 
 
19
  ## Trigger words
20
  You should use `tugce` to trigger the image generation.
21
 
 
22
  ## Use it with the [🧨 diffusers library](https://github.com/huggingface/diffusers)
23
 
24
- ```python
25
  from diffusers import AutoPipelineForText2Image
26
  import torch
27
 
28
- # Load the model and LoRA weights
29
  pipeline = AutoPipelineForText2Image.from_pretrained('black-forest-labs/FLUX.1-dev', torch_dtype=torch.float16).to('cuda')
30
  pipeline.load_lora_weights('codermert/tugce2-lora', weight_name='flux_train_replicate.safetensors')
31
 
32
- # Define different aspect ratios
33
- aspect_ratios = [
34
  (512, 512), # 1:1
35
- (768, 768), # 3:3 (same as 1:1 but larger)
36
- (640, 512), # 5:4
37
  (768, 512), # 3:2
38
- (896, 512), # 7:4
 
39
  ]
40
 
41
- # Generate images for each aspect ratio
42
- for width, height in aspect_ratios:
 
 
 
43
  image = pipeline(
44
- 'tugce in a beautiful garden',
45
  width=width,
46
  height=height
47
  ).images[0]
48
 
49
- # Save the image
50
  image.save(f"tugce_{width}x{height}.png")
51
- print(f"Generated: tugce_{width}x{height}.png")
52
  ```
53
 
54
- This code will generate images in various aspect ratios. You can modify the `aspect_ratios` list to include any desired dimensions.
55
-
56
- Remember to use the trigger word `tugce` in your prompts to activate the LoRA model.
57
-
58
  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)
 
12
  pipeline_tag: text-to-image
13
  instance_prompt: DHANUSH
14
  ---
15
+
16
  # Tugce_Flux
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 `tugce` to trigger the image generation.
25
 
26
+
27
  ## Use it with the [🧨 diffusers library](https://github.com/huggingface/diffusers)
28
 
29
+ ```py
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ı boyutlar
38
+ sizes = [
39
  (512, 512), # 1:1
 
 
40
  (768, 512), # 3:2
41
+ (640, 480), # 4:3
42
+ (896, 504), # 16:9
43
  ]
44
 
45
+ # Prompt
46
+ prompt = "tugce in a beautiful garden"
47
+
48
+ # Her boyut için görüntü oluştur
49
+ for width, height in sizes:
50
  image = pipeline(
51
+ prompt,
52
  width=width,
53
  height=height
54
  ).images[0]
55
 
56
+ # Görüntüyü kaydet
57
  image.save(f"tugce_{width}x{height}.png")
58
+ print(f"Oluşturuldu: tugce_{width}x{height}.png")
59
  ```
60
 
 
 
 
 
61
  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)