Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,11 +10,9 @@ if hf_api_key is None:
|
|
10 |
|
11 |
# Load model with authentication token
|
12 |
model_id = "stabilityai/stable-diffusion-3.5-medium"
|
13 |
-
pipe = StableDiffusion3Pipeline.from_pretrained(
|
14 |
|
15 |
-
#
|
16 |
-
device = "cuda" if torch.cuda.is_available() else "cpu"
|
17 |
-
pipe.to(device)
|
18 |
|
19 |
# Define Gradio interface function
|
20 |
def generate_image(prompt):
|
|
|
10 |
|
11 |
# Load model with authentication token
|
12 |
model_id = "stabilityai/stable-diffusion-3.5-medium"
|
13 |
+
pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-medium")
|
14 |
|
15 |
+
pipe.to("cuda")# If you have GPU access; otherwise, use "cpu"
|
|
|
|
|
16 |
|
17 |
# Define Gradio interface function
|
18 |
def generate_image(prompt):
|