hfai-aam commited on
Commit
5adfba3
·
verified ·
1 Parent(s): 058422e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -11
app.py CHANGED
@@ -5,7 +5,7 @@ from diffusers import AutoPipelineForText2Image, EulerDiscreteScheduler
5
  import torch
6
 
7
  if torch.cuda.is_available():
8
- pipe = AutoPipelineForText2Image.from_pretrained('RunDiffusion/Juggernaut-X-v10')
9
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config)
10
  pipe = pipe.to("cuda")
11
  pipe.safety_checker=None
@@ -48,7 +48,7 @@ with gr.Blocks(css=css) as demo:
48
 
49
  with gr.Column(elem_id="col-container"):
50
  gr.Markdown(f"""
51
- <div style="text-align: center; font-size: 2em; font-weight: bold;">Text to Image Generator</div>
52
  """)
53
 
54
  result = gr.Image(label="Image", show_label=False)
@@ -56,22 +56,19 @@ with gr.Blocks(css=css) as demo:
56
  prompt = gr.Text(
57
  label="Prompt",
58
  show_label=False,
59
- max_lines=1,
60
  placeholder="Enter a prompt",
61
- container=False,
 
 
 
 
 
62
  )
63
 
64
  run_button = gr.Button("Generate")
65
 
66
  with gr.Accordion("Advanced Settings", open=False):
67
 
68
- negative_prompt = gr.Text(
69
- label="Negative Prompt",
70
- max_lines=1,
71
- placeholder="Enter a negative prompt",
72
- visible=True,
73
- )
74
-
75
  seed = gr.Slider(
76
  label="Seed",
77
  minimum=-1,
 
5
  import torch
6
 
7
  if torch.cuda.is_available():
8
+ pipe = AutoPipelineForText2Image.from_pretrained('Lykon/dreamshaper-8', torch_dtype=torch.float16, variant="fp16")
9
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config)
10
  pipe = pipe.to("cuda")
11
  pipe.safety_checker=None
 
48
 
49
  with gr.Column(elem_id="col-container"):
50
  gr.Markdown(f"""
51
+ <div style="text-align: center; font-weight: bold;">Text to Image Generator</div>
52
  """)
53
 
54
  result = gr.Image(label="Image", show_label=False)
 
56
  prompt = gr.Text(
57
  label="Prompt",
58
  show_label=False,
 
59
  placeholder="Enter a prompt",
60
+ )
61
+
62
+ negative_prompt = gr.Text(
63
+ label="Negative Prompt",
64
+ show_label=False,
65
+ placeholder="Enter a negative prompt",
66
  )
67
 
68
  run_button = gr.Button("Generate")
69
 
70
  with gr.Accordion("Advanced Settings", open=False):
71
 
 
 
 
 
 
 
 
72
  seed = gr.Slider(
73
  label="Seed",
74
  minimum=-1,