Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,17 +5,17 @@ import numpy as np
|
|
| 5 |
import spaces
|
| 6 |
import random
|
| 7 |
import string
|
| 8 |
-
from diffusers import
|
| 9 |
import torch
|
| 10 |
from pathos.multiprocessing import ProcessingPool as ProcessPoolExecutor
|
| 11 |
import requests
|
| 12 |
from lxml.html import fromstring
|
| 13 |
|
| 14 |
-
pool = ProcessPoolExecutor(
|
| 15 |
pool.__enter__()
|
| 16 |
|
| 17 |
#model_id = "runwayml/stable-diffusion-v1-5"
|
| 18 |
-
model_id = "stabilityai/stable-diffusion-3-medium
|
| 19 |
|
| 20 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 21 |
if torch.cuda.is_available():
|
|
|
|
| 5 |
import spaces
|
| 6 |
import random
|
| 7 |
import string
|
| 8 |
+
from diffusers import DiffusionPipeline
|
| 9 |
import torch
|
| 10 |
from pathos.multiprocessing import ProcessingPool as ProcessPoolExecutor
|
| 11 |
import requests
|
| 12 |
from lxml.html import fromstring
|
| 13 |
|
| 14 |
+
pool = ProcessPoolExecutor(16)
|
| 15 |
pool.__enter__()
|
| 16 |
|
| 17 |
#model_id = "runwayml/stable-diffusion-v1-5"
|
| 18 |
+
model_id = "stabilityai/stable-diffusion-3-medium"
|
| 19 |
|
| 20 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 21 |
if torch.cuda.is_available():
|