女明星Loopy来杭州了,逛了一圈啥也没买,只拿了张明信片
银泰逛着逛着看到了凑凑火锅,不由想起去年在里面吃火锅点的奶茶,火锅店的奶茶可以专门买
早上的西湖烟雨朦胧,吃了难吃的和府捞面,没有去杭州酒家(买了杭州酒家旁边的南方大包),西湖边还有livehouse
乐高店门口的shíshīzhī,sísīzī,shíshīzī
浪漫的公交车520,WE1314
银泰逛着逛着看到了凑凑火锅,不由想起去年在里面吃火锅点的奶茶,火锅店的奶茶可以专门买
早上的西湖烟雨朦胧,吃了难吃的和府捞面,没有去杭州酒家(买了杭州酒家旁边的南方大包),西湖边还有livehouse
乐高店门口的shíshīzhī,sísīzī,shíshīzī
浪漫的公交车520,WE1314
以下code 有沒有錯,或者,待優化之處?
#存储库克隆到你的 Google Colab Notebook
!git clone https://t.cn/A6NRWmuS
#进入 shap-e目录并安装依赖包:
%cd shap-e
!pip install -e .
#导入所有必需的库
import torch
from shap_e.diffusion.sample import sample_latents
from shap_e.diffusion.gaussian_diffusion import diffusion_from_config
from shap_e.models.download import load_model, load_config
from shap_e.util.notebooks import create_pan_cameras, decode_latent_images, gif_widget
#将设备设置为 cuda(如果可用),否则设置为 cpu。
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
#加载模型和权重。
xm = load_model('transmitter', device=device)
model = load_model('text300M', device=device)
diffusion = diffusion_from_config(load_config('diffusion'))
#在这里我们将生成 3D 模型。
batch_size = 1 # this is the size of the models, higher values take longer to generate.
guidance_scale = 15.0 # this is the scale of the guidance, higher values make the model look more like the prompt.
prompt = "A mystical sword with a slender, gleaming blade is adorned with intricate designs. It emits a soft glow illuminating the dark, starry cosmos that serves as its backdrop." # this is the prompt, you can change this to anything you want.
latents = sample_latents(
batch_size=batch_size,
model=model,
diffusion=diffusion,
guidance_scale=guidance_scale,
model_kwargs=dict(texts=[prompt] * batch_size),
progress=True,
clip_denoised=True,
use_fp16=True,
use_karras=True,
karras_steps=64,
sigma_min=1E-3,
sigma_max=160,
s_churn=0,
)
#渲染 3D 模型,使用 render_mode = 'nerf' 神经辐射场 (NeRF) 来渲染 3D 模型。 你可以将其更改为 render_mode = 'stf' 以使用风格传递函数 (STF) 渲染模式渲染 3D 模型。
render_mode = 'nerf' # you can change this to 'stf'
size = 64 # this is the size of the renders, higher values take longer to render.
cameras = create_pan_cameras(size, device)
for i, latent in enumerate(latents):
images = decode_latent_images(xm, latent, cameras, rendering_mode=render_mode)
display(gif_widget(images))
#将 3D 模型保存为 .ply 和 .obj 文件。注意: .obj,稍后我们将使用它在 Blender Studio 中进行自定义。
# Example of saving the latents as meshes.
from shap_e.util.notebooks import decode_latent_mesh
for i, latent in enumerate(latents):
t = decode_latent_mesh(xm, latent).tri_mesh()
with open(f'example_mesh_{i}.ply', 'wb') as f: # this is three-dimensional geometric data of model.
t.write_ply(f)
with open(f'example_mesh_{i}.obj', 'w') as f: # we will use this file to customize in Blender Studio later.
t.write_obj(f)
# Clone the repo.
!git clone https://t.cn/A6jX18IT
%cd /content/camp_zipnerf
# Make a conda environment.
!conda create --name camp_zipnerf python=3.11
!conda activate camp_zipnerf
# Prepare pip.
!conda install pip
!pip install --upgrade pip
# Install requirements.
!pip install -r requirements.txt
# Manually install rmbrualla's `pycolmap` (don't use pip's! It's different).
!git clone https://t.cn/A6jX18IH ./internal/pycolmap
# Confirm that all the unit tests pass.
!./scripts/run_all_unit_tests.sh
%cd /content
!git clone -b dev https://t.cn/A6jX0dU6
!git clone -b dev https://t.cn/A6jX0dUJ
%cd /content/threefiner
!pip install .
%cd /content/3DTopia
!apt -y install -qq aria2
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://t.cn/A6jX0dUS -d /content/3DTopia/checkpoints -o 3dtopia_diffusion_state_dict.ckpt
!pip install -q pymcubes trimesh pytorch_lightning omegaconf einops wandb git+https://t.cn/A6qBislP kornia open-clip-torch
!pip install -q https://t.cn/A6jX0dUK
!pip install -q https://t.cn/A6jX0dUi
!pip install -q threefiner
# stage 2 - step 1
!threefiner sd --mesh results/default/stage1/example_mesh_0.ply --prompt "A mystical sword with a slender, gleaming blade is adorned with intricate designs. It emits a soft glow illuminating the dark, starry cosmos that serves as its backdrop." --text_dir --front_dir='-y' --outdir results/default/stage2/ --save A_mystical_sword_1_0_sd.glb --force_cuda_rast
# stage 2 - step 2
!threefiner if2 --mesh results/default/stage2/A_mystical_sword_1_0_sd.glb --prompt "A mystical sword with a slender, gleaming blade is adorned with intricate designs. It emits a soft glow illuminating the dark, starry cosmos that serves as its backdrop." --outdir results/default/stage2/ --save A_mystical_sword_1_0_if2.glb --force_cuda_rast
#存储库克隆到你的 Google Colab Notebook
!git clone https://t.cn/A6NRWmuS
#进入 shap-e目录并安装依赖包:
%cd shap-e
!pip install -e .
#导入所有必需的库
import torch
from shap_e.diffusion.sample import sample_latents
from shap_e.diffusion.gaussian_diffusion import diffusion_from_config
from shap_e.models.download import load_model, load_config
from shap_e.util.notebooks import create_pan_cameras, decode_latent_images, gif_widget
#将设备设置为 cuda(如果可用),否则设置为 cpu。
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
#加载模型和权重。
xm = load_model('transmitter', device=device)
model = load_model('text300M', device=device)
diffusion = diffusion_from_config(load_config('diffusion'))
#在这里我们将生成 3D 模型。
batch_size = 1 # this is the size of the models, higher values take longer to generate.
guidance_scale = 15.0 # this is the scale of the guidance, higher values make the model look more like the prompt.
prompt = "A mystical sword with a slender, gleaming blade is adorned with intricate designs. It emits a soft glow illuminating the dark, starry cosmos that serves as its backdrop." # this is the prompt, you can change this to anything you want.
latents = sample_latents(
batch_size=batch_size,
model=model,
diffusion=diffusion,
guidance_scale=guidance_scale,
model_kwargs=dict(texts=[prompt] * batch_size),
progress=True,
clip_denoised=True,
use_fp16=True,
use_karras=True,
karras_steps=64,
sigma_min=1E-3,
sigma_max=160,
s_churn=0,
)
#渲染 3D 模型,使用 render_mode = 'nerf' 神经辐射场 (NeRF) 来渲染 3D 模型。 你可以将其更改为 render_mode = 'stf' 以使用风格传递函数 (STF) 渲染模式渲染 3D 模型。
render_mode = 'nerf' # you can change this to 'stf'
size = 64 # this is the size of the renders, higher values take longer to render.
cameras = create_pan_cameras(size, device)
for i, latent in enumerate(latents):
images = decode_latent_images(xm, latent, cameras, rendering_mode=render_mode)
display(gif_widget(images))
#将 3D 模型保存为 .ply 和 .obj 文件。注意: .obj,稍后我们将使用它在 Blender Studio 中进行自定义。
# Example of saving the latents as meshes.
from shap_e.util.notebooks import decode_latent_mesh
for i, latent in enumerate(latents):
t = decode_latent_mesh(xm, latent).tri_mesh()
with open(f'example_mesh_{i}.ply', 'wb') as f: # this is three-dimensional geometric data of model.
t.write_ply(f)
with open(f'example_mesh_{i}.obj', 'w') as f: # we will use this file to customize in Blender Studio later.
t.write_obj(f)
# Clone the repo.
!git clone https://t.cn/A6jX18IT
%cd /content/camp_zipnerf
# Make a conda environment.
!conda create --name camp_zipnerf python=3.11
!conda activate camp_zipnerf
# Prepare pip.
!conda install pip
!pip install --upgrade pip
# Install requirements.
!pip install -r requirements.txt
# Manually install rmbrualla's `pycolmap` (don't use pip's! It's different).
!git clone https://t.cn/A6jX18IH ./internal/pycolmap
# Confirm that all the unit tests pass.
!./scripts/run_all_unit_tests.sh
%cd /content
!git clone -b dev https://t.cn/A6jX0dU6
!git clone -b dev https://t.cn/A6jX0dUJ
%cd /content/threefiner
!pip install .
%cd /content/3DTopia
!apt -y install -qq aria2
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://t.cn/A6jX0dUS -d /content/3DTopia/checkpoints -o 3dtopia_diffusion_state_dict.ckpt
!pip install -q pymcubes trimesh pytorch_lightning omegaconf einops wandb git+https://t.cn/A6qBislP kornia open-clip-torch
!pip install -q https://t.cn/A6jX0dUK
!pip install -q https://t.cn/A6jX0dUi
!pip install -q threefiner
# stage 2 - step 1
!threefiner sd --mesh results/default/stage1/example_mesh_0.ply --prompt "A mystical sword with a slender, gleaming blade is adorned with intricate designs. It emits a soft glow illuminating the dark, starry cosmos that serves as its backdrop." --text_dir --front_dir='-y' --outdir results/default/stage2/ --save A_mystical_sword_1_0_sd.glb --force_cuda_rast
# stage 2 - step 2
!threefiner if2 --mesh results/default/stage2/A_mystical_sword_1_0_sd.glb --prompt "A mystical sword with a slender, gleaming blade is adorned with intricate designs. It emits a soft glow illuminating the dark, starry cosmos that serves as its backdrop." --outdir results/default/stage2/ --save A_mystical_sword_1_0_if2.glb --force_cuda_rast
地藏菩萨本愿经仪轨
【香赞】
炉香乍热。法界蒙熏。诸佛海会悉遥闻。随处结祥云。诚意方殷。诸佛现全身。
南无香云盖菩萨摩诃萨 (三遍三拜)
【净口业真言】(三遍)
唵。修利修利。摩诃修利。修修利。萨婆诃。
ōng,xiū lì xiū lì,mó hē xiū lì,xiū xiū lì,sà pó hē。
【净身业真言】(三遍)
唵。修多利。修多利。修摩利。修摩利。娑婆诃。
ōng,xiū duō lì,xiū duō lì,xiū mó lì,xiū mó lì,suō pó hē。
【净意业真言】(三遍)
唵。嚩日啰怛诃贺斛。
ōng,wá rì là dá hē hè hōng。
【净三业真言】(三遍)
唵。娑嚩。婆嚩秫驮。娑嚩达摩娑嚩。婆嚩秫度憾。
ōng,suō wá,pó wá shú tuó,suō li wá ,dá li mó suō wá,pó wá shú duó a hàn。
【安土地真言】(七遍)
南无三满多。母驮喃。唵度噜度噜。地尾萨婆诃。
ná mó sān mān duō。 mú tuó nán。 ōng dù lu dù lu。 dì weǐ suō pó hē
【普供养真言】(三遍)
唵。誐誐曩。三婆嚩。伐日啰斛。
ōng, é é nǎng, sān pó wá, fá zǐ là hōng
【觉林菩萨偈】
华严第四会.夜摩天宫.无量菩萨来集.说偈赞佛.
尔时觉林菩萨.承佛威力.
遍观十方.而说颂言:
譬如工画师.分布诸彩色.虚妄取异相.大种无差别.
大种中无色.色中无大种.亦不离大种.而有色可得.
心中无彩画.彩画中无心.然不离于心.有彩画可得.
彼心恒不住.无量难思议.示现一切色.各各不相知.
譬如工画师.不能知自心.而由心故画.诸法性如是.
心如工画师.能画诸世间.五蕴悉丛生.无法而不造.
如心佛亦尔.如佛众生然.应知佛与心.体性皆无尽.
若人知心行.普造诸世间.是人则见佛.了佛真实性.
心不住于身.身亦不住心.而能作佛事.自在未曾有.
若人欲了知.三世一切佛.应观法界性.一切唯心造.
【赞地藏菩萨偈】
稽首本然净心地,无尽佛藏大慈尊。
南方世界涌香云,香雨花云及花雨。
宝雨宝云无数种,为祥为瑞遍庄严。
天人问佛是何因,佛言地藏菩萨至。
三世如来同赞叹,十方菩萨共归依。
我今宿植善因缘,称扬地藏真功德。
慈因积善。誓救众生。
手中金锡。振开地狱之门。掌上明珠。光摄大千世界。
智慧音里。吉祥云中。
为阎浮提苦众生。作大证明功德主。
大悲大愿。大圣大慈。
本尊地藏菩萨摩诃萨。
南无本师释迦牟尼佛(三遍三拜)
【香赞】
炉香乍热。法界蒙熏。诸佛海会悉遥闻。随处结祥云。诚意方殷。诸佛现全身。
南无香云盖菩萨摩诃萨 (三遍三拜)
【净口业真言】(三遍)
唵。修利修利。摩诃修利。修修利。萨婆诃。
ōng,xiū lì xiū lì,mó hē xiū lì,xiū xiū lì,sà pó hē。
【净身业真言】(三遍)
唵。修多利。修多利。修摩利。修摩利。娑婆诃。
ōng,xiū duō lì,xiū duō lì,xiū mó lì,xiū mó lì,suō pó hē。
【净意业真言】(三遍)
唵。嚩日啰怛诃贺斛。
ōng,wá rì là dá hē hè hōng。
【净三业真言】(三遍)
唵。娑嚩。婆嚩秫驮。娑嚩达摩娑嚩。婆嚩秫度憾。
ōng,suō wá,pó wá shú tuó,suō li wá ,dá li mó suō wá,pó wá shú duó a hàn。
【安土地真言】(七遍)
南无三满多。母驮喃。唵度噜度噜。地尾萨婆诃。
ná mó sān mān duō。 mú tuó nán。 ōng dù lu dù lu。 dì weǐ suō pó hē
【普供养真言】(三遍)
唵。誐誐曩。三婆嚩。伐日啰斛。
ōng, é é nǎng, sān pó wá, fá zǐ là hōng
【觉林菩萨偈】
华严第四会.夜摩天宫.无量菩萨来集.说偈赞佛.
尔时觉林菩萨.承佛威力.
遍观十方.而说颂言:
譬如工画师.分布诸彩色.虚妄取异相.大种无差别.
大种中无色.色中无大种.亦不离大种.而有色可得.
心中无彩画.彩画中无心.然不离于心.有彩画可得.
彼心恒不住.无量难思议.示现一切色.各各不相知.
譬如工画师.不能知自心.而由心故画.诸法性如是.
心如工画师.能画诸世间.五蕴悉丛生.无法而不造.
如心佛亦尔.如佛众生然.应知佛与心.体性皆无尽.
若人知心行.普造诸世间.是人则见佛.了佛真实性.
心不住于身.身亦不住心.而能作佛事.自在未曾有.
若人欲了知.三世一切佛.应观法界性.一切唯心造.
【赞地藏菩萨偈】
稽首本然净心地,无尽佛藏大慈尊。
南方世界涌香云,香雨花云及花雨。
宝雨宝云无数种,为祥为瑞遍庄严。
天人问佛是何因,佛言地藏菩萨至。
三世如来同赞叹,十方菩萨共归依。
我今宿植善因缘,称扬地藏真功德。
慈因积善。誓救众生。
手中金锡。振开地狱之门。掌上明珠。光摄大千世界。
智慧音里。吉祥云中。
为阎浮提苦众生。作大证明功德主。
大悲大愿。大圣大慈。
本尊地藏菩萨摩诃萨。
南无本师释迦牟尼佛(三遍三拜)
✋热门推荐