Spaces:
Running
on
Zero
Running
on
Zero
Jordan Legg
commited on
Commit
•
3300755
1
Parent(s):
138e54a
added some print statements
Browse files
app.py
CHANGED
@@ -71,6 +71,7 @@ def infer(
|
|
71 |
) -> Tuple[Any, int]:
|
72 |
# Prepend style prompt to user input
|
73 |
FULL_PROMPT = f"{STYLE_PROMPT} {prompt}"
|
|
|
74 |
|
75 |
if randomize_seed:
|
76 |
seed = get_random_seed()
|
@@ -81,6 +82,9 @@ def infer(
|
|
81 |
|
82 |
generator = torch.Generator().manual_seed(seed)
|
83 |
height = HEIGHT_CACHE[aspect_ratio][width]
|
|
|
|
|
|
|
84 |
|
85 |
image = pipe(
|
86 |
prompt=FULL_PROMPT, # Use the combined prompt
|
|
|
71 |
) -> Tuple[Any, int]:
|
72 |
# Prepend style prompt to user input
|
73 |
FULL_PROMPT = f"{STYLE_PROMPT} {prompt}"
|
74 |
+
print(f"Generating image with prompt: {FULL_PROMPT}")
|
75 |
|
76 |
if randomize_seed:
|
77 |
seed = get_random_seed()
|
|
|
82 |
|
83 |
generator = torch.Generator().manual_seed(seed)
|
84 |
height = HEIGHT_CACHE[aspect_ratio][width]
|
85 |
+
# Calculate megapixel count
|
86 |
+
MEGAPIXEL_COUNT = (width * height) / 1000000
|
87 |
+
print(f"Generating {MEGAPIXEL_COUNT} megapixel image.")
|
88 |
|
89 |
image = pipe(
|
90 |
prompt=FULL_PROMPT, # Use the combined prompt
|