jiuface commited on
Commit
672c364
·
1 Parent(s): f73a22c
__pycache__/cv_utils.cpython-310.pyc CHANGED
Binary files a/__pycache__/cv_utils.cpython-310.pyc and b/__pycache__/cv_utils.cpython-310.pyc differ
 
__pycache__/depth_estimator.cpython-310.pyc CHANGED
Binary files a/__pycache__/depth_estimator.cpython-310.pyc and b/__pycache__/depth_estimator.cpython-310.pyc differ
 
__pycache__/image_segmentor.cpython-310.pyc CHANGED
Binary files a/__pycache__/image_segmentor.cpython-310.pyc and b/__pycache__/image_segmentor.cpython-310.pyc differ
 
__pycache__/preprocessor.cpython-310.pyc CHANGED
Binary files a/__pycache__/preprocessor.cpython-310.pyc and b/__pycache__/preprocessor.cpython-310.pyc differ
 
app.py CHANGED
@@ -26,11 +26,12 @@ from diffusers.pipelines.flux.pipeline_flux_controlnet_inpaint import FluxContro
26
  from diffusers.models.controlnet_flux import FluxControlNetModel
27
 
28
  HF_TOKEN = os.environ.get("HF_TOKEN")
 
29
 
30
  login(token=HF_TOKEN)
31
 
32
  MAX_SEED = np.iinfo(np.int32).max
33
- IMAGE_SIZE = 1024
34
 
35
  # init
36
  device = "cuda" if torch.cuda.is_available() else "cpu"
@@ -213,6 +214,7 @@ def process(
213
  bucket:str,
214
  progress=gr.Progress(track_tqdm=True)
215
  ):
 
216
  result = {"status": "false", "message": ""}
217
  if not image_url:
218
  gr.Info("please enter image url for inpaiting")
 
26
  from diffusers.models.controlnet_flux import FluxControlNetModel
27
 
28
  HF_TOKEN = os.environ.get("HF_TOKEN")
29
+ os.environ['PYTORCH_CUDA_ALLOC_CONF'] = 'max_split_size_mb:30'
30
 
31
  login(token=HF_TOKEN)
32
 
33
  MAX_SEED = np.iinfo(np.int32).max
34
+ IMAGE_SIZE = 768
35
 
36
  # init
37
  device = "cuda" if torch.cuda.is_available() else "cpu"
 
214
  bucket:str,
215
  progress=gr.Progress(track_tqdm=True)
216
  ):
217
+ torch.cuda.empty_cache()
218
  result = {"status": "false", "message": ""}
219
  if not image_url:
220
  gr.Info("please enter image url for inpaiting")