change model source
Browse filesfix the issue that `ruwnayml/stable-diffusion-v1-5` is deprecated.
app.py
CHANGED
|
@@ -9,11 +9,11 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
| 9 |
|
| 10 |
if torch.cuda.is_available():
|
| 11 |
torch.cuda.max_memory_allocated(device=device)
|
| 12 |
-
pipe = StableDiffusionPipeline.from_pretrained("
|
| 13 |
#pipe.enable_xformers_memory_efficient_attention()
|
| 14 |
pipe = pipe.to(device)
|
| 15 |
else:
|
| 16 |
-
pipe = StableDiffusionPipeline.from_pretrained("
|
| 17 |
pipe = pipe.to(device)
|
| 18 |
|
| 19 |
MAX_SEED = np.iinfo(np.int32).max
|
|
|
|
| 9 |
|
| 10 |
if torch.cuda.is_available():
|
| 11 |
torch.cuda.max_memory_allocated(device=device)
|
| 12 |
+
pipe = StableDiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5", torch_dtype=torch.float16)
|
| 13 |
#pipe.enable_xformers_memory_efficient_attention()
|
| 14 |
pipe = pipe.to(device)
|
| 15 |
else:
|
| 16 |
+
pipe = StableDiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5")
|
| 17 |
pipe = pipe.to(device)
|
| 18 |
|
| 19 |
MAX_SEED = np.iinfo(np.int32).max
|