Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,9 +26,9 @@ def display_example_image(url):
|
|
26 |
def generate_images_using_huggingface_diffusers(text):
|
27 |
# pipe = StableDiffusionPipeline.from_pretrained("sd-dreambooth-library/cat-toy", torch_dtype=torch.float16)
|
28 |
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", torch_dtype=torch.float32)
|
29 |
-
pipe = pipe.to("
|
30 |
prompt = text
|
31 |
-
image = pipe(prompt)
|
32 |
return image
|
33 |
|
34 |
# Placeholder function for generating images (replace this with your actual generative AI code)
|
|
|
26 |
def generate_images_using_huggingface_diffusers(text):
|
27 |
# pipe = StableDiffusionPipeline.from_pretrained("sd-dreambooth-library/cat-toy", torch_dtype=torch.float16)
|
28 |
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", torch_dtype=torch.float32)
|
29 |
+
pipe = pipe.to("cuda")
|
30 |
prompt = text
|
31 |
+
image = pipe(prompt,num_images_per_prompt=3)
|
32 |
return image
|
33 |
|
34 |
# Placeholder function for generating images (replace this with your actual generative AI code)
|