cleanup runner.py
This commit is contained in:
parent
b77113c9d2
commit
ba5da461e1
1 changed files with 7 additions and 30 deletions
|
|
@ -69,17 +69,14 @@ try:
|
|||
image = Image.new('RGB', size, color='white')
|
||||
"""
|
||||
|
||||
"""
|
||||
# Current working...
|
||||
pipe = DiffusionPipeline.from_pretrained("stablediffusionapi/juggernaut-xl-v8")
|
||||
pipe.to("cpu")
|
||||
# Resulution Widescreen: 1344 x 768
|
||||
# Portrait: 915 x 1144
|
||||
# Square: 1024 x 1024
|
||||
# Photo (4x3): 1182 x 886
|
||||
|
||||
image = pipe(
|
||||
prompt=prompt,
|
||||
# generator=torch.Generator(device="cpu").manual_seed(31),
|
||||
negative_prompt=neg_prompt,
|
||||
).images[0]
|
||||
"""
|
||||
# Prompt weighting
|
||||
# prompt = "a red cat playing with a ball++"
|
||||
# prompt = "a red------- cat playing with a ball"
|
||||
|
||||
base = DiffusionPipeline.from_pretrained(
|
||||
"stablediffusionapi/juggernaut-xl-v8"
|
||||
|
|
@ -108,26 +105,6 @@ try:
|
|||
).images[0]
|
||||
image
|
||||
|
||||
# Resulution Widescreen: 1344 x 768
|
||||
# Portrait: 915 x 1144
|
||||
# Square: 1024 x 1024
|
||||
# Photo (4x3): 1182 x 886
|
||||
|
||||
"""
|
||||
pipe = StableDiffusionXLPipeline.from_pretrained(
|
||||
"stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16
|
||||
)
|
||||
|
||||
pipe = pipe.to("cpu")
|
||||
|
||||
prompt = "a photo of an astronaut riding a horse on mars"
|
||||
|
||||
image = pipe(prompt).images[0]
|
||||
# prompt = "A cinematic shot of a baby racoon wearing an intricate italian priest robe."
|
||||
|
||||
# image = pipe(prompt=row['initial_prompt'], num_inference_steps=1, guidance_scale=0.0).images[0]
|
||||
"""
|
||||
|
||||
img_uuid = str(uuid.uuid4())
|
||||
file_name = '/app/images/' + img_uuid + '.png'
|
||||
# logging.debug(file_name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue