Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -50,18 +50,14 @@ def infer(
|
|
50 |
|
51 |
generator = torch.Generator(device).manual_seed(seed)
|
52 |
|
53 |
-
# Ensure text inputs are
|
54 |
prompt = str(prompt) if prompt else ""
|
55 |
negative_prompt = str(negative_prompt) if negative_prompt else ""
|
56 |
|
57 |
-
# Convert text inputs to Long tensors if necessary
|
58 |
-
text_input_ids = torch.tensor([ord(c) for c in prompt], dtype=torch.long, device=device)
|
59 |
-
neg_text_input_ids = torch.tensor([ord(c) for c in negative_prompt], dtype=torch.long, device=device)
|
60 |
-
|
61 |
image = pipe(
|
62 |
-
prompt=
|
63 |
-
negative_prompt=
|
64 |
-
guidance_scale=
|
65 |
num_inference_steps=num_inference_steps,
|
66 |
width=width,
|
67 |
height=height,
|
|
|
50 |
|
51 |
generator = torch.Generator(device).manual_seed(seed)
|
52 |
|
53 |
+
# Ensure text inputs are strings
|
54 |
prompt = str(prompt) if prompt else ""
|
55 |
negative_prompt = str(negative_prompt) if negative_prompt else ""
|
56 |
|
|
|
|
|
|
|
|
|
57 |
image = pipe(
|
58 |
+
prompt=prompt,
|
59 |
+
negative_prompt=negative_prompt,
|
60 |
+
guidance_scale=guidance_scale,
|
61 |
num_inference_steps=num_inference_steps,
|
62 |
width=width,
|
63 |
height=height,
|