Update README.md
Browse files
README.md
CHANGED
|
@@ -35,37 +35,28 @@ You should use `TOK` to trigger the image generation.
|
|
| 35 |
## Use it with the [🧨 diffusers library](https://github.com/huggingface/diffusers)
|
| 36 |
|
| 37 |
```py
|
| 38 |
-
from diffusers import AutoPipelineForText2Image
|
| 39 |
import torch
|
| 40 |
|
| 41 |
-
# 1.
|
| 42 |
pipeline = AutoPipelineForText2Image.from_pretrained(
|
| 43 |
"SG161222/Realistic_Vision_V6.0_B1_noVAE",
|
| 44 |
-
torch_dtype=torch.float16,
|
| 45 |
-
variant="fp16"
|
| 46 |
-
).to("cuda")
|
| 47 |
-
|
| 48 |
-
# 2. VAE ekle (opsiyonel)
|
| 49 |
-
pipeline.vae = AutoencoderKL.from_pretrained(
|
| 50 |
-
"stabilityai/sd-vae-ft-mse",
|
| 51 |
torch_dtype=torch.float16
|
| 52 |
).to("cuda")
|
| 53 |
|
| 54 |
-
#
|
| 55 |
pipeline.load_lora_weights(
|
| 56 |
"codermert/gamzekocc_fluxx",
|
| 57 |
weight_name="lora.safetensors",
|
| 58 |
-
adapter_name="
|
|
|
|
| 59 |
)
|
| 60 |
|
| 61 |
-
#
|
| 62 |
image = pipeline(
|
| 63 |
-
prompt="portrait of
|
| 64 |
-
negative_prompt="blurry,
|
| 65 |
-
num_inference_steps=30
|
| 66 |
).images[0]
|
| 67 |
-
|
| 68 |
-
image.save("cyber_ninja.png")
|
| 69 |
```
|
| 70 |
|
| 71 |
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)
|
|
|
|
| 35 |
## Use it with the [🧨 diffusers library](https://github.com/huggingface/diffusers)
|
| 36 |
|
| 37 |
```py
|
| 38 |
+
from diffusers import AutoPipelineForText2Image
|
| 39 |
import torch
|
| 40 |
|
| 41 |
+
# 1. Realistic Vision modelini yükle
|
| 42 |
pipeline = AutoPipelineForText2Image.from_pretrained(
|
| 43 |
"SG161222/Realistic_Vision_V6.0_B1_noVAE",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
torch_dtype=torch.float16
|
| 45 |
).to("cuda")
|
| 46 |
|
| 47 |
+
# 2. LoRA'yı zorla yükle (alpha=0.5 ile gücünü azaltın)
|
| 48 |
pipeline.load_lora_weights(
|
| 49 |
"codermert/gamzekocc_fluxx",
|
| 50 |
weight_name="lora.safetensors",
|
| 51 |
+
adapter_name="fluxx",
|
| 52 |
+
cross_attention_scale=0.5 # LoRA etkisini hafiflet
|
| 53 |
)
|
| 54 |
|
| 55 |
+
# 3. Promptta hem trigger hem stil vurgusu yapın
|
| 56 |
image = pipeline(
|
| 57 |
+
prompt="portrait of TOK, <fluxx>, photorealistic, 8K", # TOK + adapter_name
|
| 58 |
+
negative_prompt="blurry, deformed"
|
|
|
|
| 59 |
).images[0]
|
|
|
|
|
|
|
| 60 |
```
|
| 61 |
|
| 62 |
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)
|