Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ print("F1 Score:", f1_score(test_labels, distilbert_predictions, average='weight
|
|
52 |
# Function to generate an image from a prompt using Stable Diffusion
|
53 |
def generate_image(prompt):
|
54 |
try:
|
55 |
-
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", variant="
|
56 |
output = pipe(prompt=prompt)
|
57 |
image = output.images[0]
|
58 |
image.save("output_image.png")
|
|
|
52 |
# Function to generate an image from a prompt using Stable Diffusion
|
53 |
def generate_image(prompt):
|
54 |
try:
|
55 |
+
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", variant="fp16", torch_dtype=torch.float32)#.to("cuda")
|
56 |
output = pipe(prompt=prompt)
|
57 |
image = output.images[0]
|
58 |
image.save("output_image.png")
|