Spaces:
Runtime error
Runtime error
Update app_temp.py
Browse files- app_temp.py +1 -9
app_temp.py
CHANGED
|
@@ -227,7 +227,7 @@ def infer(
|
|
| 227 |
Generates an image using the local Qwen-Image diffusers pipeline.
|
| 228 |
"""
|
| 229 |
# Hardcode the negative prompt as requested
|
| 230 |
-
negative_prompt = " "
|
| 231 |
rewrite_prompt=False
|
| 232 |
if randomize_seed:
|
| 233 |
seed = random.randint(0, MAX_SEED)
|
|
@@ -242,7 +242,6 @@ def infer(
|
|
| 242 |
print("❌ Invalid key.")
|
| 243 |
return None
|
| 244 |
prompt = prompt.replace(expected_key, "")
|
| 245 |
-
config = LORA_CONFIG[lora_name]
|
| 246 |
|
| 247 |
default_path = os.path.join(os.path.dirname(__file__), "1.jpg")
|
| 248 |
if os.path.exists(default_path):
|
|
@@ -252,13 +251,6 @@ def infer(
|
|
| 252 |
|
| 253 |
if height==256 and width==256:
|
| 254 |
height, width = None, None
|
| 255 |
-
print(f"Calling pipeline with prompt: '{prompt}'")
|
| 256 |
-
print(f"Negative Prompt: '{negative_prompt}'")
|
| 257 |
-
print(f"Seed: {seed}, Steps: {num_inference_steps}, Guidance: {true_guidance_scale}, Size: {width}x{height}")
|
| 258 |
-
if rewrite_prompt and len(pil_images) > 0:
|
| 259 |
-
prompt = polish_prompt_hf(prompt, pil_images)
|
| 260 |
-
print(f"Rewritten Prompt: {prompt}")
|
| 261 |
-
|
| 262 |
|
| 263 |
# Generate the image
|
| 264 |
image = pipe(
|
|
|
|
| 227 |
Generates an image using the local Qwen-Image diffusers pipeline.
|
| 228 |
"""
|
| 229 |
# Hardcode the negative prompt as requested
|
| 230 |
+
negative_prompt = "Vibrant colors, overexposed, static, blurry details, subtitles, style, artwork, painting, image, still, overall grayish, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, deformed limbs, fingers fused together, static image, cluttered background, three legs, many people in the background, walking backwards. "
|
| 231 |
rewrite_prompt=False
|
| 232 |
if randomize_seed:
|
| 233 |
seed = random.randint(0, MAX_SEED)
|
|
|
|
| 242 |
print("❌ Invalid key.")
|
| 243 |
return None
|
| 244 |
prompt = prompt.replace(expected_key, "")
|
|
|
|
| 245 |
|
| 246 |
default_path = os.path.join(os.path.dirname(__file__), "1.jpg")
|
| 247 |
if os.path.exists(default_path):
|
|
|
|
| 251 |
|
| 252 |
if height==256 and width==256:
|
| 253 |
height, width = None, None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 254 |
|
| 255 |
# Generate the image
|
| 256 |
image = pipe(
|