Adapter commited on
Commit
ee11c4c
1 Parent(s): a056b0b
Files changed (2) hide show
  1. app.py +1 -1
  2. demo/model.py +1 -1
app.py CHANGED
@@ -44,7 +44,7 @@ for url in urls_mmpose:
44
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
45
  model = Model_all(device)
46
 
47
- DESCRIPTION = '''# T2I-Adapter (Sketch & Keypose)
48
  [Paper](https://arxiv.org/abs/2302.08453) [GitHub](https://github.com/TencentARC/T2I-Adapter)
49
 
50
  This gradio demo is for a simple experience of T2I-Adapter:
 
44
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
45
  model = Model_all(device)
46
 
47
+ DESCRIPTION = '''# T2I-Adapter (Sketch & Keypose & Segmentation)
48
  [Paper](https://arxiv.org/abs/2302.08453) [GitHub](https://github.com/TencentARC/T2I-Adapter)
49
 
50
  This gradio demo is for a simple experience of T2I-Adapter:
demo/model.py CHANGED
@@ -287,7 +287,7 @@ class Model_all:
287
  labelmap = np.transpose(labelmap, (1,2,0))
288
  labelmap = cv2.resize(labelmap, (512, 512))
289
  labelmap = img2tensor(labelmap, bgr2rgb=False, float32=True)/255.
290
- im_seg = tensor2img(labelmap)
291
  labelmap = labelmap.unsqueeze(0)
292
 
293
  # extract condition features
 
287
  labelmap = np.transpose(labelmap, (1,2,0))
288
  labelmap = cv2.resize(labelmap, (512, 512))
289
  labelmap = img2tensor(labelmap, bgr2rgb=False, float32=True)/255.
290
+ im_seg = tensor2img(labelmap)[:,:,::-1]
291
  labelmap = labelmap.unsqueeze(0)
292
 
293
  # extract condition features