Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ num_inference_steps = 24
|
|
26 |
if st.button("Generate Image"):
|
27 |
with st.spinner("Generating..."):
|
28 |
# Generate image with the given parameters
|
29 |
-
generator = torch.Generator(
|
30 |
image = pipe(prompt, negative_prompt=negative_prompt, num_inference_steps=num_inference_steps,
|
31 |
guidance_scale=cfg_scale, width=width, height=height, generator=generator).images[0]
|
32 |
|
|
|
26 |
if st.button("Generate Image"):
|
27 |
with st.spinner("Generating..."):
|
28 |
# Generate image with the given parameters
|
29 |
+
generator = torch.Generator(device)
|
30 |
image = pipe(prompt, negative_prompt=negative_prompt, num_inference_steps=num_inference_steps,
|
31 |
guidance_scale=cfg_scale, width=width, height=height, generator=generator).images[0]
|
32 |
|