Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -180,7 +180,7 @@ def text_to_image(prompt, show_thinking=False, cfg_text_scale=4.0, cfg_interval=
|
|
180 |
for i in inferencer(text=prompt, think=show_thinking, **inference_hyper):
|
181 |
if type(i) == str:
|
182 |
result["text"] += i
|
183 |
-
|
184 |
result["image"] = i
|
185 |
|
186 |
yield result["image"], result.get("text", None)
|
@@ -211,7 +211,7 @@ def image_understanding(image: Image.Image, prompt: str, show_thinking=False,
|
|
211 |
understanding_output=True, **inference_hyper):
|
212 |
if type(i) == str:
|
213 |
result["text"] += i
|
214 |
-
|
215 |
result["image"] = i
|
216 |
yield result["text"]
|
217 |
|
@@ -253,7 +253,7 @@ def edit_image(image: Image.Image, prompt: str, show_thinking=False, cfg_text_sc
|
|
253 |
for i in inferencer(image=image, text=prompt, think=show_thinking, **inference_hyper):
|
254 |
if type(i) == str:
|
255 |
result["text"] += i
|
256 |
-
|
257 |
result["image"] = i
|
258 |
|
259 |
yield result["image"], result.get("text", "")
|
|
|
180 |
for i in inferencer(text=prompt, think=show_thinking, **inference_hyper):
|
181 |
if type(i) == str:
|
182 |
result["text"] += i
|
183 |
+
else:
|
184 |
result["image"] = i
|
185 |
|
186 |
yield result["image"], result.get("text", None)
|
|
|
211 |
understanding_output=True, **inference_hyper):
|
212 |
if type(i) == str:
|
213 |
result["text"] += i
|
214 |
+
else:
|
215 |
result["image"] = i
|
216 |
yield result["text"]
|
217 |
|
|
|
253 |
for i in inferencer(image=image, text=prompt, think=show_thinking, **inference_hyper):
|
254 |
if type(i) == str:
|
255 |
result["text"] += i
|
256 |
+
else:
|
257 |
result["image"] = i
|
258 |
|
259 |
yield result["image"], result.get("text", "")
|