profaker commited on
Commit
be76db5
·
verified ·
1 Parent(s): ef85702

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -10
app.py CHANGED
@@ -36,20 +36,24 @@ def predict(prompt, negative_prompt, guidance_scale, num_inference_steps,model,
36
 
37
  pipeline.scheduler = scheduler.from_pretrained("emilianJR/epiCRealism", subfolder="scheduler", **add_kwargs)
38
 
39
- if lora == "add_detail":
40
- lora = "profaker/add_detail_lora"
41
- if lora == "nursing_job":
42
- lora = "profaker/Nursing_job_lora"
43
- if lora == "nsfw_POV":
44
- lora = "profaker/NSFW_POV_lora"
45
  if lora == "nayanthara":
46
  lora = "profaker/Naya_lora"
 
 
 
 
 
 
 
 
47
  if lora == "None":
48
  images = pipeline(
49
  prompt=prompt,
50
  negative_prompt=negative_prompt,
51
  num_inference_steps=int(num_inference_steps),
52
- guidance_scale=guidance_scale
 
53
  ).images[0]
54
  print("Prompt", prompt)
55
  print("Negative", negative_prompt)
@@ -129,10 +133,9 @@ with image_blocks as demo:
129
  scheduler = gr.Dropdown(label="Schedulers", choices=schedulers,
130
  value="DPMSolverMultistepScheduler-Karras")
131
  with gr.Row(equal_height=True):
132
- loras = ['None','add_detail', 'nursing_job', 'nsfw_POV','nayanthara']
133
  lora = gr.Dropdown(label='Lora', choices=loras, value="None")
134
- lora_weights = [-1, -0.5, 0, 0.5, 1]
135
- lora_weight = gr.Dropdown(label="Lora Weights", choices=lora_weights, value=0.5)
136
  with gr.Row(equal_height=True):
137
  btn = gr.Button("Generate", elem_id="run_button")
138
 
 
36
 
37
  pipeline.scheduler = scheduler.from_pretrained("emilianJR/epiCRealism", subfolder="scheduler", **add_kwargs)
38
 
39
+
 
 
 
 
 
40
  if lora == "nayanthara":
41
  lora = "profaker/Naya_lora"
42
+ if lora == "saipallavi":
43
+ lora = "profaker/saipallavi_lora"
44
+ if lora == "shobita":
45
+ lora = "profaker/Shobita_lora"
46
+ if lora == "surya":
47
+ lora = "profaker/Surya_lora"
48
+ if lora == "vijay":
49
+ lora = "profaker/Vijay_lora"
50
  if lora == "None":
51
  images = pipeline(
52
  prompt=prompt,
53
  negative_prompt=negative_prompt,
54
  num_inference_steps=int(num_inference_steps),
55
+ guidance_scale=guidance_scale,
56
+ clip_skip=1
57
  ).images[0]
58
  print("Prompt", prompt)
59
  print("Negative", negative_prompt)
 
133
  scheduler = gr.Dropdown(label="Schedulers", choices=schedulers,
134
  value="DPMSolverMultistepScheduler-Karras")
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