afmck commited on
Commit
cfe9a59
1 Parent(s): 15e658a

Update app.py

Browse files
Files changed (2) hide show
  1. README.md +1 -10
  2. app.py +2 -1
README.md CHANGED
@@ -10,17 +10,8 @@ pinned: true
10
  license: creativeml-openrail-m
11
  ---
12
 
13
- > A work-in-progress – may be buggy and slow!
14
-
15
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
16
-
17
- ### Notes on Gradio changes
18
- - onclick events for canvas? we can draw, but can I get coordinates?
19
- - checkboxes seem a bit busted with indexes
20
- - set canvas default to segmentation output, make small edits rather than doing whole thing
21
-
22
  ### ToDos:
23
  - [ ] setting a random seed
24
  - [ ] click support for segmentation
25
  - [ ] draw on mask
26
- - [ ] batching support (blocked by inpainting issue involving tensors + batched inputs)
 
10
  license: creativeml-openrail-m
11
  ---
12
 
 
 
 
 
 
 
 
 
 
13
  ### ToDos:
14
  - [ ] setting a random seed
15
  - [ ] click support for segmentation
16
  - [ ] draw on mask
17
+ - [ ] batching support
app.py CHANGED
@@ -13,7 +13,7 @@ import gradio as gr
13
  from transformers import DetrFeatureExtractor, DetrForSegmentation, DetrConfig
14
  from transformers.models.detr.feature_extraction_detr import rgb_to_id
15
 
16
- from diffusers import StableDiffusionInpaintPipeline, EulerDiscreteScheduler
17
 
18
  parser = ArgumentParser()
19
  parser.add_argument('--disable-cuda', action='store_true')
@@ -68,6 +68,7 @@ def clean_mask(mask, max_kernel: int = 23, min_kernel: int = 5):
68
 
69
  feature_extractor, segmentation_model, segmentation_cfg = load_segmentation_models()
70
  pipe = load_diffusion_pipeline()
 
71
 
72
  segmentation_model = segmentation_model.to(device)
73
  pipe = pipe.to(device)
 
13
  from transformers import DetrFeatureExtractor, DetrForSegmentation, DetrConfig
14
  from transformers.models.detr.feature_extraction_detr import rgb_to_id
15
 
16
+ from diffusers import StableDiffusionInpaintPipeline, DPMSolverMultistepScheduler
17
 
18
  parser = ArgumentParser()
19
  parser.add_argument('--disable-cuda', action='store_true')
 
68
 
69
  feature_extractor, segmentation_model, segmentation_cfg = load_segmentation_models()
70
  pipe = load_diffusion_pipeline()
71
+ pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
72
 
73
  segmentation_model = segmentation_model.to(device)
74
  pipe = pipe.to(device)