KingNish commited on
Commit
a1bd179
1 Parent(s): f0983b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -16
app.py CHANGED
@@ -94,27 +94,19 @@ def king(type ,
94
  if randomize_seed:
95
  seed = random.randint(0, 999999)
96
  generator = torch.Generator().manual_seed(seed)
 
 
 
 
 
97
  if fast:
98
- if enhance_prompt:
99
- print(f"BEFORE: {instruction} ")
100
- instruction = promptifier(instruction)
101
- print(f"AFTER: {instruction} ")
102
- steps=int(steps/2.5)
103
- guidance_scale2=(guidance_scale/2)
104
-
105
- image = pipe_fast( prompt = instruction,
106
  guidance_scale = guidance_scale2,
107
- num_inference_steps = steps,
108
  width = width, height = height,
109
  generator = generator, output_type="latent",
110
  ).images
111
- else:
112
- if enhance_prompt:
113
- print(f"BEFORE: {instruction} ")
114
- instruction = promptifier(instruction)
115
- print(f"AFTER: {instruction} ")
116
- guidance_scale2=(guidance_scale/2)
117
-
118
  image = pipe_fast( prompt = instruction,
119
  negative_prompt=negative_prompt,
120
  guidance_scale = guidance_scale2,
 
94
  if randomize_seed:
95
  seed = random.randint(0, 999999)
96
  generator = torch.Generator().manual_seed(seed)
97
+ if enhance_prompt:
98
+ print(f"BEFORE: {instruction} ")
99
+ instruction = promptifier(instruction)
100
+ print(f"AFTER: {instruction} ")
101
+ guidance_scale2=(guidance_scale/2)
102
  if fast:
103
+ image = pipe_fast(prompt = instruction,
 
 
 
 
 
 
 
104
  guidance_scale = guidance_scale2,
105
+ num_inference_steps = int(steps/2.5),
106
  width = width, height = height,
107
  generator = generator, output_type="latent",
108
  ).images
109
+ else:
 
 
 
 
 
 
110
  image = pipe_fast( prompt = instruction,
111
  negative_prompt=negative_prompt,
112
  guidance_scale = guidance_scale2,