Spaces:
Running
Running
Update
Browse files
app.py
CHANGED
|
@@ -54,13 +54,12 @@ ALLOW_CHANGING_BASE_MODEL = SPACE_ID != 'hysts/ControlNet'
|
|
| 54 |
|
| 55 |
if SPACE_ID is not None:
|
| 56 |
DESCRIPTION += f'\n<p>For faster inference without waiting in queue, you may duplicate the space and upgrade to GPU in settings. <a href="https://huggingface.co/spaces/{SPACE_ID}?duplicate=true"><img style="display: inline; margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space" /></a></p>'
|
|
|
|
|
|
|
| 57 |
|
| 58 |
if torch.cuda.is_available():
|
| 59 |
-
DESCRIPTION += '\n<p>Running on GPU 🔥</p>'
|
| 60 |
if os.getenv('SYSTEM') == 'spaces':
|
| 61 |
download_all_controlnet_weights()
|
| 62 |
-
else:
|
| 63 |
-
DESCRIPTION += '\n<p>Running on CPU 🥶 This demo does not work on CPU.'
|
| 64 |
|
| 65 |
MAX_IMAGES = int(os.getenv('MAX_IMAGES', '3'))
|
| 66 |
DEFAULT_NUM_IMAGES = min(MAX_IMAGES, int(os.getenv('DEFAULT_NUM_IMAGES', '1')))
|
|
|
|
| 54 |
|
| 55 |
if SPACE_ID is not None:
|
| 56 |
DESCRIPTION += f'\n<p>For faster inference without waiting in queue, you may duplicate the space and upgrade to GPU in settings. <a href="https://huggingface.co/spaces/{SPACE_ID}?duplicate=true"><img style="display: inline; margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space" /></a></p>'
|
| 57 |
+
if not torch.cuda.is_available():
|
| 58 |
+
DESCRIPTION += '\n<p>Running on CPU 🥶 This demo does not work on CPU.</p>'
|
| 59 |
|
| 60 |
if torch.cuda.is_available():
|
|
|
|
| 61 |
if os.getenv('SYSTEM') == 'spaces':
|
| 62 |
download_all_controlnet_weights()
|
|
|
|
|
|
|
| 63 |
|
| 64 |
MAX_IMAGES = int(os.getenv('MAX_IMAGES', '3'))
|
| 65 |
DEFAULT_NUM_IMAGES = min(MAX_IMAGES, int(os.getenv('DEFAULT_NUM_IMAGES', '1')))
|