tombetthauser commited on
Commit
c8dc4cf
β€’
1 Parent(s): e078ee3

Try trimmed prompt

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -219,10 +219,13 @@ def image_prompt(prompt, guidance, steps, seed, height, width, negative_prompt="
219
  print(f"is_prompt_clean: {is_clean}")
220
  print("-------------------------------------------------------")
221
 
 
 
 
222
  if is_clean:
223
  return (
224
  pipe(prompt=prompt, guidance_scale=guidance, num_inference_steps=steps, generator=generator, height=height, width=width, negative_prompt=negative_prompt).images[0],
225
- f"prompt: '{prompt}', seed = {int(seed)},\nheight: {height}px, width: {width}px,\nguidance: {guidance}, steps: {steps}, negative prompt: {negative_prompt}"
226
  )
227
  else:
228
  return (
 
219
  print(f"is_prompt_clean: {is_clean}")
220
  print("-------------------------------------------------------")
221
 
222
+ trimmed_prompt = prompt.replace("<", "").replace(">", "").replace("ahx-beta-", "").replace("ahx-model-", "")
223
+ # trimmed_prompt_array = trimmed_prompt.split(" ")
224
+
225
  if is_clean:
226
  return (
227
  pipe(prompt=prompt, guidance_scale=guidance, num_inference_steps=steps, generator=generator, height=height, width=width, negative_prompt=negative_prompt).images[0],
228
+ f"prompt: '{prompt}', seed = {int(seed)},\nheight: {height}px, width: {width}px,\nguidance: {guidance}, steps: {steps}, negative prompt: {negative_prompt}\n\n\n\"{trimmed_prompt}\" | ahx-{seed}.png"
229
  )
230
  else:
231
  return (