OrlandoHugBot commited on
Commit
e04ab65
·
verified ·
1 Parent(s): 3638b57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -68,7 +68,7 @@ def load_model():
68
  MODEL_NAME,
69
  subfolder="text_encoder",
70
  torch_dtype=dtype,
71
- ).to(device)
72
 
73
  # Tokenizer / Processor
74
  tokenizer = AutoTokenizer.from_pretrained(
@@ -153,8 +153,8 @@ def process_images(
153
  result = pipe(
154
  images[0],
155
  prompt=prompt,
156
- height=1024,
157
- width=1024,
158
  negative_prompt=" ",
159
  num_inference_steps=num_steps,
160
  true_cfg_scale=true_cfg_scale,
@@ -164,8 +164,8 @@ def process_images(
164
  result = pipe(
165
  images=images,
166
  prompt=prompt,
167
- height=1024,
168
- width=1024,
169
  negative_prompt=" ",
170
  num_inference_steps=num_steps,
171
  true_cfg_scale=true_cfg_scale,
@@ -194,7 +194,6 @@ with gr.Blocks(
194
 
195
  - **Model**: UniPic-3 DMD
196
  - **Inference**: 8-step fast generation
197
- - **GPU-only Hugging Face Space**
198
  """
199
  )
200
 
@@ -240,7 +239,7 @@ with gr.Blocks(
240
  # -----------------------------------------------------------------------------
241
  @GPU
242
  def main():
243
- demo.launch()
244
 
245
 
246
  if __name__ == "__main__":
 
68
  MODEL_NAME,
69
  subfolder="text_encoder",
70
  torch_dtype=dtype,
71
+ ).to('cpu')
72
 
73
  # Tokenizer / Processor
74
  tokenizer = AutoTokenizer.from_pretrained(
 
153
  result = pipe(
154
  images[0],
155
  prompt=prompt,
156
+ height=512,
157
+ width=512,
158
  negative_prompt=" ",
159
  num_inference_steps=num_steps,
160
  true_cfg_scale=true_cfg_scale,
 
164
  result = pipe(
165
  images=images,
166
  prompt=prompt,
167
+ height=512,
168
+ width=512,
169
  negative_prompt=" ",
170
  num_inference_steps=num_steps,
171
  true_cfg_scale=true_cfg_scale,
 
194
 
195
  - **Model**: UniPic-3 DMD
196
  - **Inference**: 8-step fast generation
 
197
  """
198
  )
199
 
 
239
  # -----------------------------------------------------------------------------
240
  @GPU
241
  def main():
242
+ demo.launch(ssr_mode=False)
243
 
244
 
245
  if __name__ == "__main__":