LEIDIA commited on
Commit
b49bb5e
Β·
verified Β·
1 Parent(s): e0cc78e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -18,7 +18,7 @@ pipe = DiffusionPipeline.from_pretrained(model_repo_id, torch_dtype=torch_dtype)
18
  pipe = pipe.to(device)
19
 
20
  MAX_SEED = np.iinfo(np.int32).max
21
- MAX_IMAGE_SIZE = 520
22
 
23
  from datasets import load_dataset, Dataset
24
 
@@ -91,7 +91,7 @@ css = """
91
 
92
  with gr.Blocks(css=css) as demo:
93
  with gr.Column(elem_id="col-container"):
94
- gr.Markdown(" # Text-to-Image Gradio Template")
95
 
96
  with gr.Row():
97
  prompt = gr.Text(
@@ -127,25 +127,25 @@ with gr.Blocks(css=css) as demo:
127
  with gr.Row():
128
  width = gr.Slider(
129
  label="Width",
130
- minimum=256,
131
  maximum=MAX_IMAGE_SIZE,
132
  step=32,
133
- value=520, # Replace with defaults that work for your model
134
  )
135
 
136
  height = gr.Slider(
137
  label="Height",
138
- minimum=256,
139
  maximum=MAX_IMAGE_SIZE,
140
  step=32,
141
- value=520, # Replace with defaults that work for your model
142
  )
143
 
144
  with gr.Row():
145
  guidance_scale = gr.Slider(
146
  label="Guidance scale",
147
  minimum=0.0,
148
- maximum=10.0,
149
  step=0.1,
150
  value=0.0, # Replace with defaults that work for your model
151
  )
 
18
  pipe = pipe.to(device)
19
 
20
  MAX_SEED = np.iinfo(np.int32).max
21
+ MAX_IMAGE_SIZE = 750
22
 
23
  from datasets import load_dataset, Dataset
24
 
 
91
 
92
  with gr.Blocks(css=css) as demo:
93
  with gr.Column(elem_id="col-container"):
94
+ gr.Markdown(" # Text-to-Image Wom_Test")
95
 
96
  with gr.Row():
97
  prompt = gr.Text(
 
127
  with gr.Row():
128
  width = gr.Slider(
129
  label="Width",
130
+ minimum=0,
131
  maximum=MAX_IMAGE_SIZE,
132
  step=32,
133
+ value=600, # Replace with defaults that work for your model
134
  )
135
 
136
  height = gr.Slider(
137
  label="Height",
138
+ minimum=0,
139
  maximum=MAX_IMAGE_SIZE,
140
  step=32,
141
+ value=750, # Replace with defaults that work for your model
142
  )
143
 
144
  with gr.Row():
145
  guidance_scale = gr.Slider(
146
  label="Guidance scale",
147
  minimum=0.0,
148
+ maximum=1.0,
149
  step=0.1,
150
  value=0.0, # Replace with defaults that work for your model
151
  )