Spaces:
Running
on
Zero
Running
on
Zero
Update stable_diffusion_demo.py
Browse files- stable_diffusion_demo.py +1 -1
stable_diffusion_demo.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
|
|
| 1 |
from PIL import Image
|
| 2 |
from tqdm.auto import tqdm
|
| 3 |
import torch
|
| 4 |
from transformers import CLIPTextModel, CLIPTokenizer
|
| 5 |
from diffusers import AutoencoderKL, UNet2DConditionModel, PNDMScheduler, LMSDiscreteScheduler, StableDiffusionPipeline, UniPCMultistepScheduler
|
| 6 |
from torchvision import transforms
|
| 7 |
-
import spaces
|
| 8 |
|
| 9 |
torch_device = "cuda" if torch.cuda.is_available() else ("mps" if torch.mps.is_available() else "cpu")
|
| 10 |
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
from PIL import Image
|
| 3 |
from tqdm.auto import tqdm
|
| 4 |
import torch
|
| 5 |
from transformers import CLIPTextModel, CLIPTokenizer
|
| 6 |
from diffusers import AutoencoderKL, UNet2DConditionModel, PNDMScheduler, LMSDiscreteScheduler, StableDiffusionPipeline, UniPCMultistepScheduler
|
| 7 |
from torchvision import transforms
|
|
|
|
| 8 |
|
| 9 |
torch_device = "cuda" if torch.cuda.is_available() else ("mps" if torch.mps.is_available() else "cpu")
|
| 10 |
|