Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -100,12 +100,12 @@ def king(type ,
|
|
100 |
print(f"AFTER: {instruction} ")
|
101 |
guidance_scale2=(guidance_scale/2)
|
102 |
if fast:
|
103 |
-
|
104 |
guidance_scale = guidance_scale2,
|
105 |
num_inference_steps = int(steps/2.5),
|
106 |
width = width, height = height,
|
107 |
-
generator = generator,
|
108 |
-
).images
|
109 |
else:
|
110 |
image = pipe_fast( prompt = instruction,
|
111 |
negative_prompt=negative_prompt,
|
@@ -115,12 +115,12 @@ def king(type ,
|
|
115 |
generator = generator, output_type="latent",
|
116 |
).images
|
117 |
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
return seed, refine
|
125 |
|
126 |
client = InferenceClient()
|
|
|
100 |
print(f"AFTER: {instruction} ")
|
101 |
guidance_scale2=(guidance_scale/2)
|
102 |
if fast:
|
103 |
+
refine = 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,
|
108 |
+
).images[0]
|
109 |
else:
|
110 |
image = pipe_fast( prompt = instruction,
|
111 |
negative_prompt=negative_prompt,
|
|
|
115 |
generator = generator, output_type="latent",
|
116 |
).images
|
117 |
|
118 |
+
refine = refiner( prompt=instruction,
|
119 |
+
negative_prompt = negative_prompt,
|
120 |
+
guidance_scale = guidance_scale,
|
121 |
+
num_inference_steps= steps,
|
122 |
+
image=image, generator=generator,
|
123 |
+
).images[0]
|
124 |
return seed, refine
|
125 |
|
126 |
client = InferenceClient()
|