Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -272,6 +272,12 @@ def change_prompt(state, prompt):
|
|
272 |
if opt.verbose:
|
273 |
log_state(state)
|
274 |
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
return state
|
276 |
|
277 |
|
@@ -280,6 +286,12 @@ def change_neg_prompt(state, neg_prompt):
|
|
280 |
if opt.verbose:
|
281 |
log_state(state)
|
282 |
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
return state
|
284 |
|
285 |
|
@@ -440,9 +452,9 @@ def show_element():
|
|
440 |
|
441 |
|
442 |
def draw(state, drawpad):
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
|
447 |
# ZeroGPU hack.
|
448 |
# conn = Client(opt.address, authkey=opt.authkey)
|
|
|
272 |
if opt.verbose:
|
273 |
log_state(state)
|
274 |
|
275 |
+
if state.is_running:
|
276 |
+
model.update_single_layer(
|
277 |
+
idx=state.current_palette,
|
278 |
+
prompt=prompt,
|
279 |
+
)
|
280 |
+
|
281 |
return state
|
282 |
|
283 |
|
|
|
286 |
if opt.verbose:
|
287 |
log_state(state)
|
288 |
|
289 |
+
if state.is_running:
|
290 |
+
model.update_single_layer(
|
291 |
+
idx=state.current_palette,
|
292 |
+
neg_prompt=neg_prompt,
|
293 |
+
)
|
294 |
+
|
295 |
return state
|
296 |
|
297 |
|
|
|
452 |
|
453 |
|
454 |
def draw(state, drawpad):
|
455 |
+
if not state.is_running:
|
456 |
+
print('[WARNING] Streaming is currently off, update ignored.')
|
457 |
+
return
|
458 |
|
459 |
# ZeroGPU hack.
|
460 |
# conn = Client(opt.address, authkey=opt.authkey)
|