Views
No views yet

1import torch
2from core.tools.inference_pipe import init_pipe
3
4device = torch.device('cuda:0')
5dtype = torch.bfloat16
6repo_name = "amd/Nitro-E"
7
8resolution = 512
9ckpt_name = 'Nitro-E-512px.safetensors'
10
11# for 1024px model
12# resolution = 1024
13# ckpt_name = 'Nitro-E-1024px.safetensors'
14
15use_grpo = True
16
17if use_grpo:
18 pipe = init_pipe(device, dtype, resolution, repo_name=repo_name, ckpt_name=ckpt_name, ckpt_path_grpo='ckpt_grpo_512px')
19else:
20 pipe = init_pipe(device, dtype, resolution, repo_name=repo_name, ckpt_name=ckpt_name)
21prompt = 'A hot air balloon in the shape of a heart grand canyon'
22images = pipe(prompt=prompt, width=resolution, height=resolution, num_inference_steps=20, guidance_scale=4.5).images1import torch
2from core.tools.inference_pipe import init_pipe
3
4device = torch.device('cuda:0')
5dtype = torch.bfloat16
6resolution = 512
7repo_name = "amd/Nitro-E"
8ckpt_name = 'Nitro-E-512px-dist.safetensors'
9
10pipe = init_pipe(device, dtype, resolution, repo_name=repo_name, ckpt_name=ckpt_name)
11prompt = 'A hot air balloon in the shape of a heart grand canyon'
12
13images = pipe(prompt=prompt, width=resolution, height=resolution, num_inference_steps=4, guidance_scale=0).images