| import gradio as gr |
| import torch |
| from diffusers import AutoPipelineForText2Image |
|
|
| def generate_image(prompt): |
| |
| pipeline = AutoPipelineForText2Image.from_pretrained( |
| 'prithivMLmods/Canopus-LoRA-Flux-UltraRealism-2.0', |
| torch_dtype=torch.float16 |
| ) |
| |
| |
| pipeline.load_lora_weights( |
| 'codermert/ezelll_flux', |
| weight_name='flux_train_replicate.safetensors' |
| ) |
| |
| |
| image = pipeline(prompt).images[0] |
| return image |
|
|
| |
| 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() |