Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,25 +36,25 @@ pipe.to("cuda")
|
|
| 36 |
# ------------------------
|
| 37 |
# ATTENTION + PIPE INFO
|
| 38 |
# ------------------------
|
| 39 |
-
def pipeline_debug_info():
|
| 40 |
info = []
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
info.append(f"Transformer attention backend: {pipe.transformer.config.attn_implementation}")
|
| 44 |
-
|
| 45 |
-
# Processor classes
|
| 46 |
try:
|
| 47 |
-
info.append(f"
|
| 48 |
except:
|
| 49 |
-
info.append("
|
| 50 |
|
|
|
|
| 51 |
try:
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
|
|
|
| 55 |
|
| 56 |
return "\n".join(info)
|
| 57 |
|
|
|
|
| 58 |
# ------------------------
|
| 59 |
# IMAGE GENERATOR
|
| 60 |
# ------------------------
|
|
|
|
| 36 |
# ------------------------
|
| 37 |
# ATTENTION + PIPE INFO
|
| 38 |
# ------------------------
|
| 39 |
+
def pipeline_debug_info(pipe):
|
| 40 |
info = []
|
| 41 |
+
|
| 42 |
+
# Transformer config
|
|
|
|
|
|
|
|
|
|
| 43 |
try:
|
| 44 |
+
info.append(f"Transformer attention backend: {pipe.transformer.config.attn_implementation}")
|
| 45 |
except:
|
| 46 |
+
info.append("No transformer.attn_implementation")
|
| 47 |
|
| 48 |
+
# Processor class
|
| 49 |
try:
|
| 50 |
+
proc = pipe.transformer.blocks[0].attn.processor
|
| 51 |
+
info.append(f"Processor type: {type(proc)}")
|
| 52 |
+
except Exception as e:
|
| 53 |
+
info.append(f"Processor error: {e}")
|
| 54 |
|
| 55 |
return "\n".join(info)
|
| 56 |
|
| 57 |
+
|
| 58 |
# ------------------------
|
| 59 |
# IMAGE GENERATOR
|
| 60 |
# ------------------------
|