Muhammad Anas Akhtar
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,6 +7,7 @@ def image_generation(prompt):
|
|
| 7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 8 |
pipeline = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3-medium-diffusers",
|
| 9 |
torch_dtype=torch.float16 if device == "cuda" else torch.float32,
|
|
|
|
| 10 |
text_encoder_3 =None,
|
| 11 |
tokenizer_3 =None)
|
| 12 |
pipeline.enable_model_cpu_offload()
|
|
|
|
| 7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 8 |
pipeline = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3-medium-diffusers",
|
| 9 |
torch_dtype=torch.float16 if device == "cuda" else torch.float32,
|
| 10 |
+
use_auth_token=True,
|
| 11 |
text_encoder_3 =None,
|
| 12 |
tokenizer_3 =None)
|
| 13 |
pipeline.enable_model_cpu_offload()
|