Spaces:
Running
on
Zero
Running
on
Zero
arthur-qiu
commited on
Commit
•
fa93a9b
1
Parent(s):
61d7fe2
init
Browse files- app.py +2 -3
- pipeline_freescale.py +2 -0
app.py
CHANGED
@@ -19,7 +19,7 @@ def infer_gpu_part(pipe, seed, prompt, negative_prompt, ddim_steps, guidance_sca
|
|
19 |
result = pipe(prompt, negative_prompt=negative_prompt, generator=generator,
|
20 |
num_inference_steps=ddim_steps, guidance_scale=guidance_scale,
|
21 |
resolutions_list=resolutions_list, fast_mode=fast_mode, cosine_scale=cosine_scale,
|
22 |
-
)
|
23 |
return result
|
24 |
|
25 |
def infer(prompt, output_size, ddim_steps, guidance_scale, cosine_scale, seed, options, negative_prompt):
|
@@ -43,9 +43,8 @@ def infer(prompt, output_size, ddim_steps, guidance_scale, cosine_scale, seed, o
|
|
43 |
result = infer_gpu_part(pipe, seed, prompt, negative_prompt, ddim_steps, guidance_scale, resolutions_list, fast_mode, cosine_scale, disable_freeu)
|
44 |
print('GPU ends')
|
45 |
|
46 |
-
image = result.images[0]
|
47 |
save_path = 'output.png'
|
48 |
-
|
49 |
|
50 |
return save_path
|
51 |
|
|
|
19 |
result = pipe(prompt, negative_prompt=negative_prompt, generator=generator,
|
20 |
num_inference_steps=ddim_steps, guidance_scale=guidance_scale,
|
21 |
resolutions_list=resolutions_list, fast_mode=fast_mode, cosine_scale=cosine_scale,
|
22 |
+
).images[0]
|
23 |
return result
|
24 |
|
25 |
def infer(prompt, output_size, ddim_steps, guidance_scale, cosine_scale, seed, options, negative_prompt):
|
|
|
43 |
result = infer_gpu_part(pipe, seed, prompt, negative_prompt, ddim_steps, guidance_scale, resolutions_list, fast_mode, cosine_scale, disable_freeu)
|
44 |
print('GPU ends')
|
45 |
|
|
|
46 |
save_path = 'output.png'
|
47 |
+
result.save(save_path)
|
48 |
|
49 |
return save_path
|
50 |
|
pipeline_freescale.py
CHANGED
@@ -1131,6 +1131,8 @@ class StableDiffusionXLPipeline(DiffusionPipeline, FromSingleFileMixin, LoraLoad
|
|
1131 |
if not return_dict:
|
1132 |
return (image,)
|
1133 |
|
|
|
|
|
1134 |
return StableDiffusionXLPipelineOutput(images=image)
|
1135 |
|
1136 |
# Overrride to properly handle the loading and unloading of the additional text encoder.
|
|
|
1131 |
if not return_dict:
|
1132 |
return (image,)
|
1133 |
|
1134 |
+
print(image.shape)
|
1135 |
+
|
1136 |
return StableDiffusionXLPipelineOutput(images=image)
|
1137 |
|
1138 |
# Overrride to properly handle the loading and unloading of the additional text encoder.
|