Vignesh455 commited on
Commit
a89c4c6
·
verified ·
1 Parent(s): 9bbfc0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -16,8 +16,10 @@ def read_content(file_path: str) -> str:
16
 
17
 
18
  def predict(prompt, negative_prompt, guidance_scale, num_inference_steps,model, scheduler, lora, lora_weight):
19
- pipeline = diffusers.DiffusionPipeline.from_pretrained("SG161222/Realistic_Vision_V6.0_B1_noVAE", vae=vae).to("cuda")
20
- pipeline.safety_checker = lambda images, **kwargs: (images, [False] * len(images))
 
 
21
  if model == "Realistic_V5.1":
22
  pipeline = diffusers.DiffusionPipeline.from_pretrained("SG161222/Realistic_Vision_V5.1_noVAE", vae=vae).to("cuda")
23
  if model == "Realistic_V5.0":
@@ -124,8 +126,8 @@ with image_blocks as demo:
124
  negative_prompt = gr.Textbox(label="negative_prompt", placeholder="Your negative prompt",
125
  info="what you don't want to see in the image")
126
  with gr.Row(equal_height=True):
127
- models = ['Realistic_V6.0','Realistic_V5.1','Realistic_V5.0','EpicRealism']
128
- model = gr.Dropdown(label="Models",choices=models,value="Realistic_V6.0")
129
  with gr.Row(equal_height=True):
130
  schedulers = ["DEISMultistepScheduler", "HeunDiscreteScheduler", "EulerDiscreteScheduler",
131
  "DPMSolverMultistepScheduler", "DPMSolverMultistepScheduler-Karras",
@@ -135,7 +137,7 @@ with image_blocks as demo:
135
  with gr.Row(equal_height=True):
136
  loras = ['None','add_detail','nayanthara','shobita','surya','vijay','saipallavi']
137
  lora = gr.Dropdown(label='Lora', choices=loras, value="None")
138
- lora_weight = gr.Number(value=0.5, minimum=0, maximum=1, step=0.01, label="Lora Weights")
139
  with gr.Row(equal_height=True):
140
  btn = gr.Button("Generate", elem_id="run_button")
141
 
 
16
 
17
 
18
  def predict(prompt, negative_prompt, guidance_scale, num_inference_steps,model, scheduler, lora, lora_weight):
19
+ pipeline = diffusers.DiffusionPipeline.from_pretrained("SG161222/RealVisXL_V4.0", vae=vae).to("cuda")
20
+ if model = 'Realistic_V6.0':
21
+ pipeline = diffusers.DiffusionPipeline.from_pretrained("SG161222/Realistic_Vision_V6.0_B1_noVAE", vae=vae).to("cuda")
22
+ pipeline.safety_checker = lambda images, **kwargs: (images, [False] * len(images))
23
  if model == "Realistic_V5.1":
24
  pipeline = diffusers.DiffusionPipeline.from_pretrained("SG161222/Realistic_Vision_V5.1_noVAE", vae=vae).to("cuda")
25
  if model == "Realistic_V5.0":
 
126
  negative_prompt = gr.Textbox(label="negative_prompt", placeholder="Your negative prompt",
127
  info="what you don't want to see in the image")
128
  with gr.Row(equal_height=True):
129
+ models = ['RealVisXL_V4.0','Realistic_V6.0','Realistic_V5.1','Realistic_V5.0','EpicRealism']
130
+ model = gr.Dropdown(label="Models",choices=models,value="RealVisXL_V4.0")
131
  with gr.Row(equal_height=True):
132
  schedulers = ["DEISMultistepScheduler", "HeunDiscreteScheduler", "EulerDiscreteScheduler",
133
  "DPMSolverMultistepScheduler", "DPMSolverMultistepScheduler-Karras",
 
137
  with gr.Row(equal_height=True):
138
  loras = ['None','add_detail','nayanthara','shobita','surya','vijay','saipallavi']
139
  lora = gr.Dropdown(label='Lora', choices=loras, value="None")
140
+ lora_weight = gr.Number(value=0, minimum=0, maximum=1, step=0.01, label="Lora Weights")
141
  with gr.Row(equal_height=True):
142
  btn = gr.Button("Generate", elem_id="run_button")
143