Spaces:
Running
Running
Update app.py (#2)
Browse files- Update app.py (790e413a3fa5d3f4f021603040a3f65f2fc9f1c8)
Co-authored-by: Jevon Edmund <[email protected]>
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)
|