LPX55 commited on
Commit
bf9eb4e
·
verified ·
1 Parent(s): 2e0296a

Update app_v4.py

Browse files
Files changed (1) hide show
  1. app_v4.py +11 -2
app_v4.py CHANGED
@@ -17,6 +17,13 @@ from debug import log_params, scheduler, save_image
17
  logging.set_verbosity_debug()
18
  from model_loader import safe_model_load
19
 
 
 
 
 
 
 
 
20
  # Ensure device is set
21
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
22
  MAX_SEED = 1000000
@@ -210,7 +217,9 @@ with gr.Blocks(title="FLUX Turbo Upscaler", fill_height=True) as demo:
210
  log_prompt = gr.Checkbox(value=True, label="Log", visible=False) # Changed to visible
211
 
212
  gr.Markdown("**Tips:** 8 steps is all you need! Incredibly powerful tool, usage instructions coming soon.")
213
-
 
 
214
  caption_state = gr.State()
215
  focus_state = gr.State()
216
  log_state = gr.State()
@@ -250,5 +259,5 @@ with gr.Blocks(title="FLUX Turbo Upscaler", fill_height=True) as demo:
250
  inputs=[caption_state, focus_state],
251
  outputs=[prompt]
252
  )
253
-
254
  demo.queue().launch(show_error=True)
 
17
  logging.set_verbosity_debug()
18
  from model_loader import safe_model_load
19
 
20
+ def hello(profile: gr.OAuthProfile | None) -> str:
21
+ if profile is None:
22
+ return "Hello guest! There is a bug with HF ZeroGPUs that are afffecting some usage on certain spaces. Testing out some possible solutions."
23
+ return f"You are logged in as {profile.name}. If you run into incorrect messages about ZeroGPU runtime credits being out, PLEASE give me a heads up so I can investigate further."
24
+
25
+
26
+
27
  # Ensure device is set
28
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
29
  MAX_SEED = 1000000
 
217
  log_prompt = gr.Checkbox(value=True, label="Log", visible=False) # Changed to visible
218
 
219
  gr.Markdown("**Tips:** 8 steps is all you need! Incredibly powerful tool, usage instructions coming soon.")
220
+ with gr.Accordion("Help,I keep getting ZeroGPU errors.", open=False, elem_id="zgpu"):
221
+ msg1 = gr.Markdown()
222
+ try_btn = gr.LoginButton()
223
  caption_state = gr.State()
224
  focus_state = gr.State()
225
  log_state = gr.State()
 
259
  inputs=[caption_state, focus_state],
260
  outputs=[prompt]
261
  )
262
+ demo.load(hello, inputs=None, outputs=msg1)
263
  demo.queue().launch(show_error=True)