lnyan commited on
Commit
cefe0d3
1 Parent(s): 72b1355

Update app

Browse files
Files changed (2) hide show
  1. app.py +0 -1
  2. utils.py +3 -1
app.py CHANGED
@@ -863,7 +863,6 @@ with blocks as demo:
863
  "cv2_telea",
864
  "perlin",
865
  "gaussian",
866
- "g_diffuser",
867
  ],
868
  value="patchmatch",
869
  type="value",
 
863
  "cv2_telea",
864
  "perlin",
865
  "gaussian",
 
866
  ],
867
  value="patchmatch",
868
  type="value",
utils.py CHANGED
@@ -148,7 +148,7 @@ https://github.com/hafriedlander/stable-diffusion-grpcserver/blob/main/sdgrpcser
148
  https://github.com/parlance-zz/g-diffuser-bot/tree/g-diffuser-bot-beta2
149
  _handleImageAdjustment
150
  """
151
- if True:
152
  from sd_grpcserver.sdgrpcserver import images
153
  import torch
154
  from math import sqrt
@@ -185,6 +185,8 @@ if True:
185
  elif which == "crop":
186
  tensor = images.crop(tensor, adjustment.crop.top, adjustment.crop.left, adjustment.crop.height, adjustment.crop.width)
187
  return np.array(images.toPIL(tensor)[0])
 
 
188
 
189
  def g_diffuser(img,mask):
190
  adjustments=[["blur",32,"UP"],["level",0,0.05,0,1]]
 
148
  https://github.com/parlance-zz/g-diffuser-bot/tree/g-diffuser-bot-beta2
149
  _handleImageAdjustment
150
  """
151
+ try:
152
  from sd_grpcserver.sdgrpcserver import images
153
  import torch
154
  from math import sqrt
 
185
  elif which == "crop":
186
  tensor = images.crop(tensor, adjustment.crop.top, adjustment.crop.left, adjustment.crop.height, adjustment.crop.width)
187
  return np.array(images.toPIL(tensor)[0])
188
+ except:
189
+ pass
190
 
191
  def g_diffuser(img,mask):
192
  adjustments=[["blur",32,"UP"],["level",0,0.05,0,1]]