JadenFK commited on
Commit
e0c992d
2 Parent(s): 01064e8 f231369

Merge branch 'main' of https://huggingface.co/spaces/baulab/Erasing-Concepts-In-Diffusion into main

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -3,6 +3,7 @@ import torch
3
  from finetuning import FineTunedModel
4
  from StableDiffuser import StableDiffuser
5
  from train import train
 
6
  import os
7
  model_map = {'Van Gogh' : 'models/vangogh.pt',
8
  'Pablo Picasso': 'models/pablopicasso.pt',
@@ -18,7 +19,7 @@ model_map = {'Van Gogh' : 'models/vangogh.pt',
18
  ORIGINAL_SPACE_ID = 'baulab/Erasing-Concepts-In-Diffusion'
19
  SPACE_ID = os.getenv('SPACE_ID')
20
 
21
- SHARED_UI_WARNING = f'''## Attention - Training using the ESD-u method does not work in this shard UI. You can either duplicate and use it with a gpu with at least 40GB, or clone this repository to run on your own machine.
22
  <center><a class="duplicate-button" style="display:inline-block" target="_blank" href="https://huggingface.co/spaces/{SPACE_ID}?duplicate=true"><img style="margin-top:0;margin-bottom:0" src="https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14" alt="Duplicate Space"></a></center>
23
  '''
24
 
@@ -230,6 +231,7 @@ class Demo:
230
  generator=generator
231
  )
232
 
 
233
  orig_image = images[0][0]
234
 
235
  torch.cuda.empty_cache()
 
3
  from finetuning import FineTunedModel
4
  from StableDiffuser import StableDiffuser
5
  from train import train
6
+
7
  import os
8
  model_map = {'Van Gogh' : 'models/vangogh.pt',
9
  'Pablo Picasso': 'models/pablopicasso.pt',
 
19
  ORIGINAL_SPACE_ID = 'baulab/Erasing-Concepts-In-Diffusion'
20
  SPACE_ID = os.getenv('SPACE_ID')
21
 
22
+ SHARED_UI_WARNING = f'''## Attention - Training using the ESD-u method does not work in this shared UI. You can either duplicate and use it with a gpu with at least 40GB, or clone this repository to run on your own machine.
23
  <center><a class="duplicate-button" style="display:inline-block" target="_blank" href="https://huggingface.co/spaces/{SPACE_ID}?duplicate=true"><img style="margin-top:0;margin-bottom:0" src="https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14" alt="Duplicate Space"></a></center>
24
  '''
25
 
 
231
  generator=generator
232
  )
233
 
234
+
235
  orig_image = images[0][0]
236
 
237
  torch.cuda.empty_cache()