Ir para o conteúdo
ModelListadosExterno
Browse files

DDPM Uwall Morefields

This model is a diffusion model for unconditional image generation of uwall velocity field in a turbulent channel flow with Retau = 1000. This model is trained using just almost 1000 fields which are very few since...

TipoOtherVersãoRevision 94c7c27Cnota

Fonte do modelo

Tipo
Other
Tamanho do arquivo
70,7–70,8 MB
Versão
vRevision 94c7c27
Atualizado
27 de set. de 2026
Downloads
10
Fonte
Hugging Face

Descrição da fonte

This model is a diffusion model for unconditional image generation of uwall velocity field in a turbulent channel flow with Retau = 1000. This model is trained using just almost 1000 fields which are very few since in the most of case DDPM are trained with thousands of images.

Usage

from diffusers import DDPMPipeline
import torch
import torchvision
from torchvision import transforms
import numpy as np
from matplotlib import pyplot as plt
from huggingface_hub import hf_hub_download
import joblib


pipeline = DDPMPipeline.from_pretrained('RobbyDalmonts/DDPM_uwall_morefields')
image = pipeline().images[0]

to_tensor = transforms.ToTensor()
tensor_output_normalized = to_tensor(image)
tensor_output_normalized = tensor_output_normalized *2 -1
fig,ax = plt.subplots()
ax.imshow(tensor_output_normalized[0], cmap ='coolwarm')
ax.set_title('normalized sample')
plt.show()
plt.close()

scaler_path = hf_hub_download(repo_id='RobbyDalmonts/DDPM_uwall_morefields', filename="scaler.pkl", repo_type='model')
scaler = joblib.load(scaler_path)

tensor_output = scaler.inverse_transform(tensor_output_normalized.squeeze(0).numpy().reshape(-1,1)).reshape(128,64)
fig,ax = plt.subplots()
ax.imshow(tensor_output, cmap='coolwarm')
ax.set_title('sample')
plt.show()
plt.close()

Fontes

1 fonte
Hugging FacePrimárioVersão 94c7c27f508dad2dca4577b95ed158eb32d0996c
huggingface.co/RobbyDalmonts/DDPM_uwall_morefields/tree/94c7c27f508dad2dca4577b95ed158eb32d0996c

Verificado 7 de set.

Download files

Artefatos de modelo

2 artefatos

diffusion_pytorch_model.bin

bin · 70,8 MB · SHA-256 8fc5bff403ef…9bc2 · Hugging Face

Download file

diffusion_pytorch_model.safetensors

safetensors · 70,7 MB · SHA-256 c07728c903ed…800c · Hugging Face

Download file

Trechos de fonte

2 trechos

--- license: mit tags: - pytorch - diffusers - unconditional-image-generation - diffusion-models-class library_name: diffusers --- This model is a diffusion model for unconditional image generation of uwall velocity field in a turbulent channel flow with Retau = 1000. This model is trained using just almost 1000 fields which are very few since in the most of case DDPM are trained with thousands of images. ## Usage ```python from diffusers import DDPMPipeline import torch import torchvision from torchvision import transforms import numpy as np from matplotlib import pyplot as plt from huggingface_hub import hf_hub_download import joblib pipeline = DDPMPipeline.from_pretrained('RobbyDalmonts/DDPM_uwall_morefields') image = pipeline().images[0] to_tensor = transforms.ToTensor() tensor_output_normalized = to_tensor(image) tensor_output_normalized = tensor_output_normalized *2 -1 fig,ax = plt.subplots() ax.imshow(tensor_output_normalized[0], cmap ='coolwarm') ax.set_title('normalized sample') plt.show() plt.close() scaler_path = hf_hub_download(repo_id='RobbyDalmonts/DDPM_uwall_morefields', filename="scaler.pkl", repo_type='model') scaler = joblib.load(scaler_path) tensor_output = scaler.inverse_transform(tensor_output_normalized.squeeze(0).numpy().reshape(-1,1)).reshape(128,64) fig,ax = plt.subplots() ax.imshow(tensor_output, cmap='coolwarm') ax.set_title('sample') plt.show() plt.close() ```

Source context: 10 downloads · 0 likes · Pipeline unconditional-image-generation · Library diffusers · Repo RobbyDalmonts/DDPM_uwall_morefields