File size: 877 Bytes
8923aba
 
9f261f3
031ae3b
f726406
 
 
 
 
9450330
 
f726406
 
 
 
8923aba
9f261f3
f726406
 
 
 
 
 
 
 
 
 
 
 
9f261f3
f726406
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import gradio as gr
import torch
from diffusers import AutoPipelineForText2Image

def generate_image(prompt):
    # Pipeline'ı başlat
    pipeline = AutoPipelineForText2Image.from_pretrained(
        'prithivMLmods/Canopus-LoRA-Flux-UltraRealism-2.0', 
        torch_dtype=torch.float16
    )
    
    # LoRA modelini yükle
    pipeline.load_lora_weights(
        'codermert/ezelll_flux', 
        weight_name='flux_train_replicate.safetensors'
    )
    
    # Görsel oluştur
    image = pipeline(prompt).images[0]
    return image

# Gradio arayüzü
iface = gr.Interface(
    fn=generate_image,
    inputs=gr.Textbox(label="Prompt'unuzu girin (zehra kelimesini kullanmayı unutmayın)"),
    outputs=gr.Image(label="Oluşturulan Görsel"),
    title="Ezel Flux Görsel Oluşturucu",
    description="Bu model 'zehra' kelimesi ile en iyi sonucu verir."
)

iface.launch()