lakshyana commited on
Commit ·
94a7eb1
1
Parent(s): ecf2488
updates
Browse files
app.py
CHANGED
|
@@ -15,9 +15,10 @@ if not os.environ.get('NO_DOWNLOAD_SPACY'):
|
|
| 15 |
spacy.cli.download('en_core_web_sm')
|
| 16 |
|
| 17 |
model_id = "CompVis/stable-diffusion-v1-4"
|
| 18 |
-
|
|
|
|
| 19 |
|
| 20 |
-
gen = torch.Generator(device='cuda'
|
| 21 |
gen.manual_seed(12758672)
|
| 22 |
orig_state = gen.get_state()
|
| 23 |
use_auth_token= "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"
|
|
|
|
| 15 |
spacy.cli.download('en_core_web_sm')
|
| 16 |
|
| 17 |
model_id = "CompVis/stable-diffusion-v1-4"
|
| 18 |
+
# Changed
|
| 19 |
+
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
| 20 |
|
| 21 |
+
gen = torch.Generator(device=device) #changed device = 'cuda'
|
| 22 |
gen.manual_seed(12758672)
|
| 23 |
orig_state = gen.get_state()
|
| 24 |
use_auth_token= "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"
|