jepz commited on
Commit
9631348
1 Parent(s): 5ad8015

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -10
app.py CHANGED
@@ -40,6 +40,7 @@ def generate_image(uploaded_image):
40
  def infer(init_img, prompt, negative_prompt, seed, width, height, guidance_scale, strength):
41
 
42
  generator = torch.Generator().manual_seed(seed)
 
43
 
44
  image = pipe(
45
  image = init_img,
@@ -99,13 +100,14 @@ with gr.Blocks(css=css) as demo:
99
  result = gr.Image(label="Result", show_label=False)
100
 
101
  with gr.Accordion("Advanced Settings", open=False):
102
-
103
- negative_prompt = gr.Text(
104
- label="Negative prompt",
105
- max_lines=1,
106
- placeholder="Enter a negative prompt",
107
- visible=False,
108
- )
 
109
 
110
  with gr.Row():
111
  seed = gr.Slider(
@@ -123,7 +125,7 @@ with gr.Blocks(css=css) as demo:
123
  minimum=256,
124
  maximum=MAX_IMAGE_SIZE,
125
  step=32,
126
- value=512,
127
  )
128
 
129
  height = gr.Slider(
@@ -131,7 +133,7 @@ with gr.Blocks(css=css) as demo:
131
  minimum=256,
132
  maximum=MAX_IMAGE_SIZE,
133
  step=32,
134
- value=512,
135
  )
136
 
137
  with gr.Row():
@@ -141,7 +143,7 @@ with gr.Blocks(css=css) as demo:
141
  minimum=0.0,
142
  maximum=10.0,
143
  step=0.1,
144
- value=5.0,
145
  )
146
 
147
  strength = gr.Slider(
 
40
  def infer(init_img, prompt, negative_prompt, seed, width, height, guidance_scale, strength):
41
 
42
  generator = torch.Generator().manual_seed(seed)
43
+ prompt = "nvinkpunk " + prompt
44
 
45
  image = pipe(
46
  image = init_img,
 
100
  result = gr.Image(label="Result", show_label=False)
101
 
102
  with gr.Accordion("Advanced Settings", open=False):
103
+
104
+ with gr.Row():
105
+ negative_prompt = gr.Text(
106
+ label="Negative prompt",
107
+ max_lines=1,
108
+ placeholder="Enter a negative prompt",
109
+ visible=False,
110
+ )
111
 
112
  with gr.Row():
113
  seed = gr.Slider(
 
125
  minimum=256,
126
  maximum=MAX_IMAGE_SIZE,
127
  step=32,
128
+ value=1024,
129
  )
130
 
131
  height = gr.Slider(
 
133
  minimum=256,
134
  maximum=MAX_IMAGE_SIZE,
135
  step=32,
136
+ value=1024,
137
  )
138
 
139
  with gr.Row():
 
143
  minimum=0.0,
144
  maximum=10.0,
145
  step=0.1,
146
+ value=7.5,
147
  )
148
 
149
  strength = gr.Slider(