Skip to content

Commit

Permalink
Fix height-width
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudotensor committed Sep 20, 2024
1 parent 73fd35f commit c823024
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "4dc90dad603445139085c7da6bd79a14652aaa70"
__version__ = "73fd35fc5773c2b1dcf36ea25262c6c61bbc1fa8"
4 changes: 2 additions & 2 deletions src/vision/flux.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def make_image(prompt, filename=None, gpu_id='auto', pipe=None,
makedirs(os.path.dirname(lock_file)) # ensure made
with filelock.FileLock(lock_file):
image = pipe(prompt=prompt,
height=image_size.lower().split('x')[0],
width=image_size.lower().split('x')[1],
height=int(image_size.lower().split('x')[0]),
width=int(image_size.lower().split('x')[1]),
num_inference_steps=image_num_inference_steps,
max_sequence_length=max_sequence_length,
guidance_scale=image_guidance_scale).images[0]
Expand Down
4 changes: 2 additions & 2 deletions src/vision/playv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def make_image(prompt, filename=None, gpu_id='auto', pipe=None,
makedirs(os.path.dirname(lock_file)) # ensure made
with filelock.FileLock(lock_file):
image = pipe(prompt=prompt,
height=image_size.lower().split('x')[0],
width=image_size.lower().split('x')[1],
height=int(image_size.lower().split('x')[0]),
width=int(image_size.lower().split('x')[1]),
num_inference_steps=image_num_inference_steps,
max_sequence_length=max_sequence_length,
guidance_scale=image_guidance_scale,
Expand Down
4 changes: 2 additions & 2 deletions src/vision/sdxl_turbo.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def make_image(prompt, filename=None, gpu_id='auto', pipe=None,
makedirs(os.path.dirname(lock_file)) # ensure made
with filelock.FileLock(lock_file):
image = pipe(prompt=prompt,
height=image_size.lower().split('x')[0],
width=image_size.lower().split('x')[1],
height=int(image_size.lower().split('x')[0]),
width=int(image_size.lower().split('x')[1]),
num_inference_steps=image_num_inference_steps, # more than 1 not really helpful
guidance_scale=0.0, # disabled: https://huggingface.co/stabilityai/sdxl-turbo#diffusers
).images[0]
Expand Down
8 changes: 4 additions & 4 deletions src/vision/stable_diffusion_xl.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,17 @@ def make_image(prompt,
# run both experts
image = base(
prompt=prompt,
height=image_size.lower().split('x')[0],
width=image_size.lower().split('x')[1],
height=int(image_size.lower().split('x')[0]),
width=int(image_size.lower().split('x')[1]),
num_inference_steps=image_num_inference_steps,
guidance_scale=image_guidance_scale,
**extra1,
).images
if refiner:
image = refiner(
prompt=prompt,
height=image_size.lower().split('x')[0],
width=image_size.lower().split('x')[1],
height=int(image_size.lower().split('x')[0]),
width=int(image_size.lower().split('x')[1]),
num_inference_steps=image_num_inference_steps,
guidance_scale=image_guidance_scale,
**extra2,
Expand Down

0 comments on commit c823024

Please sign in to comment.