Spaces:
Running
on
Zero
Running
on
Zero
Elea Zhong
commited on
Commit
·
833555d
1
Parent(s):
c3c1d47
modal training, add confs
Browse files- configs/compare/5k_steps.yaml +2 -0
- configs/optim/cosine.yaml +4 -0
- configs/regression/{base-reg.yaml → base.yaml} +3 -3
- configs/regression/lo_mse.yaml +2 -0
- configs/regression/modal-datadirs.yaml +2 -0
- configs/regression/mse-dm.yaml +11 -0
- configs/regression/{reg-mse-neg.yaml → mse-neg-mse.yaml} +4 -4
- configs/regression/mse-pixel-lpips.yaml +10 -0
- configs/regression/{reg-mse-pixel-mse.yaml → mse-pixel-mse.yaml} +0 -0
- configs/regression/{reg-mse-triplet.yaml → mse-triplet.yaml} +3 -1
- configs/regression/{reg-mse.yaml → mse.yaml} +0 -0
- configs/regression/val_metrics.yaml +9 -0
- qwenimage/foundation.py +6 -2
- qwenimage/models/attention_processors.py +12 -2
- requirements.txt +1 -1
- scripts/edit_datasets.ipynb +275 -10
- scripts/logit_normal_dist.ipynb +82 -14
- scripts/train.py +13 -10
- scripts/train_multi.sh +61 -0
- scripts/wand_requirements.txt +52 -0
configs/compare/5k_steps.yaml
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
num_train_epochs: 1
|
| 2 |
+
max_train_steps: 5000
|
configs/optim/cosine.yaml
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
|
| 3 |
+
lr_scheduler: cosine
|
| 4 |
+
lr_warmup_steps: 250
|
configs/regression/{base-reg.yaml → base.yaml}
RENAMED
|
@@ -7,11 +7,11 @@ max_train_steps: null
|
|
| 7 |
preprocessing_epoch_len: 0
|
| 8 |
preprocessing_epoch_repetitions: 1
|
| 9 |
num_validation_images: &val_num 32
|
| 10 |
-
num_sample_images:
|
| 11 |
train_range: [*val_num, null]
|
| 12 |
val_range: [0, *val_num]
|
| 13 |
-
test_range: [
|
| 14 |
-
regression_base_pipe_steps:
|
| 15 |
|
| 16 |
training_type: "regression"
|
| 17 |
|
|
|
|
| 7 |
preprocessing_epoch_len: 0
|
| 8 |
preprocessing_epoch_repetitions: 1
|
| 9 |
num_validation_images: &val_num 32
|
| 10 |
+
num_sample_images: 4
|
| 11 |
train_range: [*val_num, null]
|
| 12 |
val_range: [0, *val_num]
|
| 13 |
+
test_range: [0, 4]
|
| 14 |
+
regression_base_pipe_steps: 4
|
| 15 |
|
| 16 |
training_type: "regression"
|
| 17 |
|
configs/regression/lo_mse.yaml
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
train_loss_terms:
|
| 2 |
+
mse: 0.1
|
configs/regression/modal-datadirs.yaml
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
regression_data_dir: "/data/regression_data/regression_output"
|
| 2 |
+
editing_data_dir: "/data/edit_data/CrispEdit"
|
configs/regression/mse-dm.yaml
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
wandb_run_name: "reg-mse-dm"
|
| 2 |
+
output_dir: "/data/checkpoints/reg-mse-dm"
|
| 3 |
+
|
| 4 |
+
train_loss_terms:
|
| 5 |
+
mse: 1.0
|
| 6 |
+
distribution_matching: 1.0
|
| 7 |
+
|
| 8 |
+
validation_loss_terms:
|
| 9 |
+
mse: 1.0
|
| 10 |
+
distribution_matching: 1.0
|
| 11 |
+
|
configs/regression/{reg-mse-neg.yaml → mse-neg-mse.yaml}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
-
wandb_run_name: "reg-mse"
|
| 2 |
-
output_dir: "/data/checkpoints/reg-mse"
|
| 3 |
|
| 4 |
train_loss_terms:
|
| 5 |
mse: 1.0
|
| 6 |
-
negative_mse: 1
|
| 7 |
|
| 8 |
validation_loss_terms:
|
| 9 |
mse: 1.0
|
| 10 |
-
negative_mse: 1
|
| 11 |
|
|
|
|
| 1 |
+
wandb_run_name: "reg-mse-neg-mse"
|
| 2 |
+
output_dir: "/data/checkpoints/reg-mse-neg-mse"
|
| 3 |
|
| 4 |
train_loss_terms:
|
| 5 |
mse: 1.0
|
| 6 |
+
negative_mse: 0.1
|
| 7 |
|
| 8 |
validation_loss_terms:
|
| 9 |
mse: 1.0
|
| 10 |
+
negative_mse: 0.1
|
| 11 |
|
configs/regression/mse-pixel-lpips.yaml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
wandb_run_name: "reg-mse-pixel-lpips"
|
| 2 |
+
output_dir: "/data/checkpoints/reg-mse-pixel-lpips"
|
| 3 |
+
|
| 4 |
+
train_loss_terms:
|
| 5 |
+
mse: 1.0
|
| 6 |
+
pixel_lpips: 1.0
|
| 7 |
+
|
| 8 |
+
validation_loss_terms:
|
| 9 |
+
mse: 1.0
|
| 10 |
+
pixel_lpips: 1.0
|
configs/regression/{reg-mse-pixel-mse.yaml → mse-pixel-mse.yaml}
RENAMED
|
File without changes
|
configs/regression/{reg-mse-triplet.yaml → mse-triplet.yaml}
RENAMED
|
@@ -8,4 +8,6 @@ train_loss_terms:
|
|
| 8 |
validation_loss_terms:
|
| 9 |
mse: 1.0
|
| 10 |
triplet: 1.0
|
| 11 |
-
|
|
|
|
|
|
|
|
|
| 8 |
validation_loss_terms:
|
| 9 |
mse: 1.0
|
| 10 |
triplet: 1.0
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
triplet_margin: -500 # tune
|
configs/regression/{reg-mse.yaml → mse.yaml}
RENAMED
|
File without changes
|
configs/regression/val_metrics.yaml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
validation_loss_terms:
|
| 5 |
+
mse: 1.0
|
| 6 |
+
pixel_mse: 1.0
|
| 7 |
+
pixel_lpips: 1.0
|
| 8 |
+
|
| 9 |
+
|
qwenimage/foundation.py
CHANGED
|
@@ -460,6 +460,9 @@ class QwenImageRegressionFoundation(QwenImageFoundation):
|
|
| 460 |
|
| 461 |
if loss_accumulator.has("pixel_lpips"):
|
| 462 |
lpips_loss = self.lpips_fn(pixel_values_x0_gt, pixel_values_x0_pred)
|
|
|
|
|
|
|
|
|
|
| 463 |
loss_accumulator.accum("pixel_lpips", lpips_loss)
|
| 464 |
|
| 465 |
if loss_accumulator.has("pixel_mse"):
|
|
@@ -511,12 +514,13 @@ class QwenImageRegressionFoundation(QwenImageFoundation):
|
|
| 511 |
v_neg_1d,
|
| 512 |
v_pred_1d,
|
| 513 |
visualize_velocities=True,
|
| 514 |
-
):
|
|
|
|
| 515 |
x_0_pred = x_t_1d - t * v_pred_1d
|
| 516 |
x_0_neg = x_t_1d - t * v_neg_1d
|
| 517 |
x_0_recon = x_t_1d - t * v_gt_1d
|
| 518 |
log_pils = {
|
| 519 |
-
"
|
| 520 |
"x_0": self.latents_to_pil(x_0_1d, h=h_f16, w=w_f16),
|
| 521 |
"x_0_recon": self.latents_to_pil(x_0_recon, h=h_f16, w=w_f16),
|
| 522 |
"x_0_pred": self.latents_to_pil(x_0_pred, h=h_f16, w=w_f16),
|
|
|
|
| 460 |
|
| 461 |
if loss_accumulator.has("pixel_lpips"):
|
| 462 |
lpips_loss = self.lpips_fn(pixel_values_x0_gt, pixel_values_x0_pred)
|
| 463 |
+
texam(lpips_loss, "lpips_loss")
|
| 464 |
+
lpips_loss = lpips_loss.mean()
|
| 465 |
+
texam(lpips_loss, "lpips_loss")
|
| 466 |
loss_accumulator.accum("pixel_lpips", lpips_loss)
|
| 467 |
|
| 468 |
if loss_accumulator.has("pixel_mse"):
|
|
|
|
| 514 |
v_neg_1d,
|
| 515 |
v_pred_1d,
|
| 516 |
visualize_velocities=True,
|
| 517 |
+
):
|
| 518 |
+
t_float = t.float().cpu().item()
|
| 519 |
x_0_pred = x_t_1d - t * v_pred_1d
|
| 520 |
x_0_neg = x_t_1d - t * v_neg_1d
|
| 521 |
x_0_recon = x_t_1d - t * v_gt_1d
|
| 522 |
log_pils = {
|
| 523 |
+
f"x_{t_float}_1d": self.latents_to_pil(x_t_1d, h=h_f16, w=w_f16),
|
| 524 |
"x_0": self.latents_to_pil(x_0_1d, h=h_f16, w=w_f16),
|
| 525 |
"x_0_recon": self.latents_to_pil(x_0_recon, h=h_f16, w=w_f16),
|
| 526 |
"x_0_pred": self.latents_to_pil(x_0_pred, h=h_f16, w=w_f16),
|
qwenimage/models/attention_processors.py
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from diffusers.models.attention_processor import Attention
|
| 2 |
from diffusers.models.attention_dispatch import dispatch_attention_fn
|
| 3 |
import torch
|
| 4 |
import torch.nn.functional as F
|
| 5 |
-
from typing import Optional, Tuple
|
| 6 |
from diffusers.models.transformers.transformer_qwenimage import apply_rotary_emb_qwen
|
| 7 |
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
try:
|
| 11 |
from kernels import get_kernel
|
|
|
|
| 1 |
+
from typing import Optional, Tuple
|
| 2 |
+
import warnings
|
| 3 |
+
|
| 4 |
from diffusers.models.attention_processor import Attention
|
| 5 |
from diffusers.models.attention_dispatch import dispatch_attention_fn
|
| 6 |
import torch
|
| 7 |
import torch.nn.functional as F
|
|
|
|
| 8 |
from diffusers.models.transformers.transformer_qwenimage import apply_rotary_emb_qwen
|
| 9 |
|
| 10 |
+
try:
|
| 11 |
+
from sageattention import sageattn, sageattn_qk_int8_pv_fp16_cuda, sageattn_qk_int8_pv_fp16_triton, sageattn_qk_int8_pv_fp8_cuda, sageattn_qk_int8_pv_fp8_cuda_sm90
|
| 12 |
+
except ImportError:
|
| 13 |
+
sageattn = None
|
| 14 |
+
sageattn_qk_int8_pv_fp16_cuda = None
|
| 15 |
+
sageattn_qk_int8_pv_fp16_triton = None
|
| 16 |
+
sageattn_qk_int8_pv_fp8_cuda = None
|
| 17 |
+
sageattn_qk_int8_pv_fp8_cuda_sm90 = None
|
| 18 |
+
warnings.warn("Sageattention not imported")
|
| 19 |
|
| 20 |
try:
|
| 21 |
from kernels import get_kernel
|
requirements.txt
CHANGED
|
@@ -18,4 +18,4 @@ datasets
|
|
| 18 |
|
| 19 |
para-attn
|
| 20 |
lpips
|
| 21 |
-
https://huggingface.co/spaces/eleazhong/Qwen-Image-Edit-Angles/resolve/main/bin/sageattention-2.2.0-cp310-cp310-linux_x86_64.whl
|
|
|
|
| 18 |
|
| 19 |
para-attn
|
| 20 |
lpips
|
| 21 |
+
# https://huggingface.co/spaces/eleazhong/Qwen-Image-Edit-Angles/resolve/main/bin/sageattention-2.2.0-cp310-cp310-linux_x86_64.whl
|
scripts/edit_datasets.ipynb
CHANGED
|
@@ -2,20 +2,149 @@
|
|
| 2 |
"cells": [
|
| 3 |
{
|
| 4 |
"cell_type": "code",
|
| 5 |
-
"execution_count":
|
| 6 |
"id": "c9cc09d6",
|
| 7 |
"metadata": {},
|
| 8 |
-
"outputs": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
"source": [
|
| 10 |
"%cd /home/ubuntu/Qwen-Image-Edit-Angles"
|
| 11 |
]
|
| 12 |
},
|
| 13 |
{
|
| 14 |
"cell_type": "code",
|
| 15 |
-
"execution_count":
|
| 16 |
"id": "b65a5e8c",
|
| 17 |
"metadata": {},
|
| 18 |
-
"outputs": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
"source": [
|
| 20 |
"import huggingface_hub \n",
|
| 21 |
"from qwenimage.datamodels import QwenConfig\n",
|
|
@@ -53,12 +182,12 @@
|
|
| 53 |
},
|
| 54 |
{
|
| 55 |
"cell_type": "code",
|
| 56 |
-
"execution_count":
|
| 57 |
"id": "5505f47d",
|
| 58 |
"metadata": {},
|
| 59 |
"outputs": [],
|
| 60 |
"source": [
|
| 61 |
-
"total_per =
|
| 62 |
"\n",
|
| 63 |
"EDIT_TYPES = [\n",
|
| 64 |
" \"color\",\n",
|
|
@@ -73,7 +202,7 @@
|
|
| 73 |
},
|
| 74 |
{
|
| 75 |
"cell_type": "code",
|
| 76 |
-
"execution_count":
|
| 77 |
"id": "cdf51dbb",
|
| 78 |
"metadata": {},
|
| 79 |
"outputs": [],
|
|
@@ -95,11 +224,147 @@
|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| 5 |
+
"execution_count": 1,
|
| 6 |
"id": "c9cc09d6",
|
| 7 |
"metadata": {},
|
| 8 |
+
"outputs": [
|
| 9 |
+
{
|
| 10 |
+
"name": "stdout",
|
| 11 |
+
"output_type": "stream",
|
| 12 |
+
"text": [
|
| 13 |
+
"/home/ubuntu/Qwen-Image-Edit-Angles\n"
|
| 14 |
+
]
|
| 15 |
+
}
|
| 16 |
+
],
|
| 17 |
"source": [
|
| 18 |
"%cd /home/ubuntu/Qwen-Image-Edit-Angles"
|
| 19 |
]
|
| 20 |
},
|
| 21 |
{
|
| 22 |
"cell_type": "code",
|
| 23 |
+
"execution_count": 2,
|
| 24 |
"id": "b65a5e8c",
|
| 25 |
"metadata": {},
|
| 26 |
+
"outputs": [
|
| 27 |
+
{
|
| 28 |
+
"name": "stderr",
|
| 29 |
+
"output_type": "stream",
|
| 30 |
+
"text": [
|
| 31 |
+
"/usr/lib/python3/dist-packages/sklearn/utils/fixes.py:25: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n",
|
| 32 |
+
" from pkg_resources import parse_version # type: ignore\n",
|
| 33 |
+
"2025-11-24 16:55:55.657889: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n",
|
| 34 |
+
"2025-11-24 16:55:55.671869: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:467] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
|
| 35 |
+
"WARNING: All log messages before absl::InitializeLog() is called are written to STDERR\n",
|
| 36 |
+
"E0000 00:00:1764003355.688913 3244532 cuda_dnn.cc:8579] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
|
| 37 |
+
"E0000 00:00:1764003355.694358 3244532 cuda_blas.cc:1407] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
|
| 38 |
+
"W0000 00:00:1764003355.707749 3244532 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n",
|
| 39 |
+
"W0000 00:00:1764003355.707764 3244532 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n",
|
| 40 |
+
"W0000 00:00:1764003355.707767 3244532 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n",
|
| 41 |
+
"W0000 00:00:1764003355.707768 3244532 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n",
|
| 42 |
+
"2025-11-24 16:55:55.712504: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n",
|
| 43 |
+
"To enable the following instructions: AVX512F AVX512_VNNI AVX512_BF16 AVX512_FP16 AVX_VNNI, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n"
|
| 44 |
+
]
|
| 45 |
+
},
|
| 46 |
+
{
|
| 47 |
+
"ename": "AttributeError",
|
| 48 |
+
"evalue": "'MessageFactory' object has no attribute 'GetPrototype'",
|
| 49 |
+
"output_type": "error",
|
| 50 |
+
"traceback": [
|
| 51 |
+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 52 |
+
"\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
|
| 53 |
+
"\u001b[0;31mAttributeError\u001b[0m: 'MessageFactory' object has no attribute 'GetPrototype'"
|
| 54 |
+
]
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"ename": "AttributeError",
|
| 58 |
+
"evalue": "'MessageFactory' object has no attribute 'GetPrototype'",
|
| 59 |
+
"output_type": "error",
|
| 60 |
+
"traceback": [
|
| 61 |
+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 62 |
+
"\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
|
| 63 |
+
"\u001b[0;31mAttributeError\u001b[0m: 'MessageFactory' object has no attribute 'GetPrototype'"
|
| 64 |
+
]
|
| 65 |
+
},
|
| 66 |
+
{
|
| 67 |
+
"ename": "AttributeError",
|
| 68 |
+
"evalue": "'MessageFactory' object has no attribute 'GetPrototype'",
|
| 69 |
+
"output_type": "error",
|
| 70 |
+
"traceback": [
|
| 71 |
+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 72 |
+
"\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
|
| 73 |
+
"\u001b[0;31mAttributeError\u001b[0m: 'MessageFactory' object has no attribute 'GetPrototype'"
|
| 74 |
+
]
|
| 75 |
+
},
|
| 76 |
+
{
|
| 77 |
+
"name": "stderr",
|
| 78 |
+
"output_type": "stream",
|
| 79 |
+
"text": [
|
| 80 |
+
"/home/ubuntu/.local/lib/python3.10/site-packages/google/api_core/_python_version_support.py:266: FutureWarning: You are using a Python version (3.10.12) which Google will stop supporting in new releases of google.api_core once it reaches its end of life (2026-10-04). Please upgrade to the latest Python version, or at least Python 3.11, to continue receiving updates for google.api_core past that date.\n",
|
| 81 |
+
" warnings.warn(message, FutureWarning)\n"
|
| 82 |
+
]
|
| 83 |
+
},
|
| 84 |
+
{
|
| 85 |
+
"ename": "AttributeError",
|
| 86 |
+
"evalue": "'MessageFactory' object has no attribute 'GetPrototype'",
|
| 87 |
+
"output_type": "error",
|
| 88 |
+
"traceback": [
|
| 89 |
+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 90 |
+
"\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
|
| 91 |
+
"\u001b[0;31mAttributeError\u001b[0m: 'MessageFactory' object has no attribute 'GetPrototype'"
|
| 92 |
+
]
|
| 93 |
+
},
|
| 94 |
+
{
|
| 95 |
+
"ename": "AttributeError",
|
| 96 |
+
"evalue": "'MessageFactory' object has no attribute 'GetPrototype'",
|
| 97 |
+
"output_type": "error",
|
| 98 |
+
"traceback": [
|
| 99 |
+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 100 |
+
"\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
|
| 101 |
+
"\u001b[0;31mAttributeError\u001b[0m: 'MessageFactory' object has no attribute 'GetPrototype'"
|
| 102 |
+
]
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"name": "stderr",
|
| 106 |
+
"output_type": "stream",
|
| 107 |
+
"text": [
|
| 108 |
+
"Skipping import of cpp extensions due to incompatible torch version 2.9.1+cu128 for torchao version 0.14.1 Please see https://github.com/pytorch/ao/issues/2919 for more info\n",
|
| 109 |
+
"TMA benchmarks will be running without grid constant TMA descriptor.\n",
|
| 110 |
+
"WARNING:bitsandbytes.cextension:Could not find the bitsandbytes CUDA binary at PosixPath('/usr/local/lib/python3.10/dist-packages/bitsandbytes/libbitsandbytes_cuda128.so')\n",
|
| 111 |
+
"ERROR:bitsandbytes.cextension:Could not load bitsandbytes native library: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /usr/local/lib/python3.10/dist-packages/bitsandbytes/libbitsandbytes_cpu.so)\n",
|
| 112 |
+
"Traceback (most recent call last):\n",
|
| 113 |
+
" File \"/usr/local/lib/python3.10/dist-packages/bitsandbytes/cextension.py\", line 85, in <module>\n",
|
| 114 |
+
" lib = get_native_library()\n",
|
| 115 |
+
" File \"/usr/local/lib/python3.10/dist-packages/bitsandbytes/cextension.py\", line 72, in get_native_library\n",
|
| 116 |
+
" dll = ct.cdll.LoadLibrary(str(binary_path))\n",
|
| 117 |
+
" File \"/usr/lib/python3.10/ctypes/__init__.py\", line 452, in LoadLibrary\n",
|
| 118 |
+
" return self._dlltype(name)\n",
|
| 119 |
+
" File \"/usr/lib/python3.10/ctypes/__init__.py\", line 374, in __init__\n",
|
| 120 |
+
" self._handle = _dlopen(self._name, mode)\n",
|
| 121 |
+
"OSError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by /usr/local/lib/python3.10/dist-packages/bitsandbytes/libbitsandbytes_cpu.so)\n",
|
| 122 |
+
"WARNING:bitsandbytes.cextension:\n",
|
| 123 |
+
"CUDA Setup failed despite CUDA being available. Please run the following command to get more information:\n",
|
| 124 |
+
"\n",
|
| 125 |
+
"python -m bitsandbytes\n",
|
| 126 |
+
"\n",
|
| 127 |
+
"Inspect the output of the command and see if you can locate CUDA libraries. You might need to add them\n",
|
| 128 |
+
"to your LD_LIBRARY_PATH. If you suspect a bug, please take the information from python -m bitsandbytes\n",
|
| 129 |
+
"and open an issue at: https://github.com/bitsandbytes-foundation/bitsandbytes/issues\n",
|
| 130 |
+
"\n"
|
| 131 |
+
]
|
| 132 |
+
},
|
| 133 |
+
{
|
| 134 |
+
"data": {
|
| 135 |
+
"application/vnd.jupyter.widget-view+json": {
|
| 136 |
+
"model_id": "599e401d77bc49edaaacbfe6f55032cf",
|
| 137 |
+
"version_major": 2,
|
| 138 |
+
"version_minor": 0
|
| 139 |
+
},
|
| 140 |
+
"text/plain": [
|
| 141 |
+
"Fetching 7 files: 0%| | 0/7 [00:00<?, ?it/s]"
|
| 142 |
+
]
|
| 143 |
+
},
|
| 144 |
+
"metadata": {},
|
| 145 |
+
"output_type": "display_data"
|
| 146 |
+
}
|
| 147 |
+
],
|
| 148 |
"source": [
|
| 149 |
"import huggingface_hub \n",
|
| 150 |
"from qwenimage.datamodels import QwenConfig\n",
|
|
|
|
| 182 |
},
|
| 183 |
{
|
| 184 |
"cell_type": "code",
|
| 185 |
+
"execution_count": 3,
|
| 186 |
"id": "5505f47d",
|
| 187 |
"metadata": {},
|
| 188 |
"outputs": [],
|
| 189 |
"source": [
|
| 190 |
+
"total_per = 1\n",
|
| 191 |
"\n",
|
| 192 |
"EDIT_TYPES = [\n",
|
| 193 |
" \"color\",\n",
|
|
|
|
| 202 |
},
|
| 203 |
{
|
| 204 |
"cell_type": "code",
|
| 205 |
+
"execution_count": 4,
|
| 206 |
"id": "cdf51dbb",
|
| 207 |
"metadata": {},
|
| 208 |
"outputs": [],
|
|
|
|
| 224 |
},
|
| 225 |
{
|
| 226 |
"cell_type": "code",
|
| 227 |
+
"execution_count": 5,
|
| 228 |
"id": "0c59b9d4",
|
| 229 |
"metadata": {},
|
| 230 |
+
"outputs": [
|
| 231 |
+
{
|
| 232 |
+
"name": "stdout",
|
| 233 |
+
"output_type": "stream",
|
| 234 |
+
"text": [
|
| 235 |
+
"Turn dress positioned in the lower central area into red with floral patterns\n",
|
| 236 |
+
"Please recreate this in digital painting artistic style\n",
|
| 237 |
+
"replace the largemouth bass with a trout\n",
|
| 238 |
+
"remove the four grey extraterrestrials observing the scene\n",
|
| 239 |
+
"Add the lid back onto the jar of white cream\n",
|
| 240 |
+
"The character stops exhaling smoke and closes their mouth.\n",
|
| 241 |
+
"change the background to a mystical forest\n",
|
| 242 |
+
"Turn cap positioned in the upper-central area into red\n",
|
| 243 |
+
"Draw this image using fantasy art technique\n",
|
| 244 |
+
"replace the alien spaceship with a futuristic submarine\n",
|
| 245 |
+
"remove the morbidly obese Frankenstein monster from the school bus\n",
|
| 246 |
+
"add a halved lemon\n",
|
| 247 |
+
"No change in the subject's action, pose, or facial expression.\n",
|
| 248 |
+
"change the background to a serene starry night sky\n",
|
| 249 |
+
"Turn baby positioned in the central area into darker skin tone\n",
|
| 250 |
+
"Convert this image to graffiti artwork\n",
|
| 251 |
+
"replace the pregnant woman with an elderly woman holding a walking stick\n",
|
| 252 |
+
"remove the Wakandan technology elements from the townscape\n",
|
| 253 |
+
"add a large, serene pool area\n",
|
| 254 |
+
"The woman lowers her hand and straightens her posture.\n",
|
| 255 |
+
"change the background to a serene beach at sunset\n",
|
| 256 |
+
"Turn black tires positioned in the lower left area into white\n",
|
| 257 |
+
"Reimagine this image in low poly artistic style\n",
|
| 258 |
+
"replace the human skull with a flower crown\n",
|
| 259 |
+
"remove the pile of cheap broken cars from the white background\n",
|
| 260 |
+
"Add three plastic eggs in blue, green, and yellow.\n",
|
| 261 |
+
"The person holds a small piece of food in one hand while still holding the phone in the other.\n",
|
| 262 |
+
"change the background to a futuristic cityscape\n",
|
| 263 |
+
"Turn vehicles positioned in the lower-left area into polished\n",
|
| 264 |
+
"Turn this photo into oil painting artwork\n",
|
| 265 |
+
"replace the spike two-handed mace with a sword\n",
|
| 266 |
+
"remove the baby version of Batman from the image\n",
|
| 267 |
+
"add sparkling rhinestones to the bouquet of white roses\n",
|
| 268 |
+
"A person performs a pull-up with knees raised and holding a medicine ball.\n",
|
| 269 |
+
"change the background to a bustling city street at night\n",
|
| 270 |
+
"Turn grass positioned in the bottom area into dry\n",
|
| 271 |
+
"Transform this image using polaroid artistic approach\n",
|
| 272 |
+
"replace the plant factory with a castle\n",
|
| 273 |
+
"remove the palace on the moon\n",
|
| 274 |
+
"Add the classic blue muscle car back onto the paved road\n",
|
| 275 |
+
"The subject changes from having hands clasped behind their back to holding their arms out to the sides.\n",
|
| 276 |
+
"change the background to a serene meadow under a clear blue sky\n",
|
| 277 |
+
"Turn wheel positioned in the central area into black with red brake caliper\n",
|
| 278 |
+
"Render this image as vintage photography art\n",
|
| 279 |
+
"replace the horned frog with a deer\n",
|
| 280 |
+
"erase the abstract body featuring many limbs\n",
|
| 281 |
+
"add the golden fork to the white lace plate\n",
|
| 282 |
+
"The person turns their head to the side.\n",
|
| 283 |
+
"change the background to a starry night sky with glowing constellations\n",
|
| 284 |
+
"Turn flowers positioned in the lower-central area into pink\n",
|
| 285 |
+
"Can you render this image as art nouveau art?\n",
|
| 286 |
+
"replace the monoliths with ancient stone statues\n",
|
| 287 |
+
"remove the colorful fireworks in the sky\n",
|
| 288 |
+
"Add a green bottle near the cupcakes\n",
|
| 289 |
+
"The man's hand gesture changes from an open motion to a partially closed motion.\n",
|
| 290 |
+
"change the background to a futuristic cityscape\n",
|
| 291 |
+
"Turn chest pack positioned in the upper-central area into metallic silver\n",
|
| 292 |
+
"Transform this image using glitch art artistic approach\n",
|
| 293 |
+
"replace the fiery heart with a glowing moon\n",
|
| 294 |
+
"remove the purple rally stripes from the military aircraft\n",
|
| 295 |
+
"Add a hat to the man\n",
|
| 296 |
+
"The person lowers their right hand from a raised position to resting on their lap while keeping their left hand holding a phone.\n",
|
| 297 |
+
"change the background to a futuristic cityscape\n",
|
| 298 |
+
"Turn tables positioned in the lower central area into wooden\n",
|
| 299 |
+
"Illustrate this in woodcut format\n",
|
| 300 |
+
"replace the knight with a wizard\n",
|
| 301 |
+
"remove the meticulously designed object in the center\n",
|
| 302 |
+
"add a golden retriever lying beside the woman\n",
|
| 303 |
+
"A woman raises her left hand slightly higher and moves her right hand outward.\n",
|
| 304 |
+
"change the background to a city skyline at night\n",
|
| 305 |
+
"Turn frog positioned in the upper-central area into dark green\n",
|
| 306 |
+
"Reimagine this image in graffiti artistic style\n",
|
| 307 |
+
"replace the snowman with a sandcastle\n",
|
| 308 |
+
"remove the FABLER logo from the illustration\n",
|
| 309 |
+
"add the colorful flower mural behind the four friends\n",
|
| 310 |
+
"The man turns his head slightly to his left.\n",
|
| 311 |
+
"change the background to a starry night sky\n",
|
| 312 |
+
"Turn fence positioned in the lower central area into wooden\n",
|
| 313 |
+
"Could you convert this to pop art artwork?\n",
|
| 314 |
+
"replace the campfire with a small table\n",
|
| 315 |
+
"remove the fairies from the forest\n",
|
| 316 |
+
"add a hand stirring the glass pitcher\n",
|
| 317 |
+
"The person adjusts the object in their hands, moving from holding it with both hands to manipulating it with one hand.\n",
|
| 318 |
+
"change the background to a calm, serene ocean at sunset\n",
|
| 319 |
+
"Turn house positioned in the right-central area into wooden\n",
|
| 320 |
+
"Convert this image to low poly artwork\n",
|
| 321 |
+
"replace the bird with a butterfly\n",
|
| 322 |
+
"remove the engraved gem from the image\n",
|
| 323 |
+
"Add lounge chairs and umbrellas by the pool.\n",
|
| 324 |
+
"A woman reaches to remove the lid from a kitchen appliance.\n",
|
| 325 |
+
"change the background to a serene blue sky with fluffy white clouds\n",
|
| 326 |
+
"Turn piano positioned in the lower-left area into white\n",
|
| 327 |
+
"Please transform this image into isometric style\n",
|
| 328 |
+
"replace the glasses with a monocle\n",
|
| 329 |
+
"remove the circus carnival background\n",
|
| 330 |
+
"Add people relaxing on the grass\n",
|
| 331 |
+
"A man adjusts the virtual reality headset on his head.\n",
|
| 332 |
+
"change the background to a stormy sea with a pirate ship in the distance\n",
|
| 333 |
+
"Turn buildings positioned in the upper-right area into brightly colored structures\n",
|
| 334 |
+
"Please recreate this in street art artistic style\n",
|
| 335 |
+
"replace the father with a teacher\n",
|
| 336 |
+
"remove the black orb hovering in the galaxy scene\n",
|
| 337 |
+
"add back the figure who appears to be asleep\n",
|
| 338 |
+
"The person moves the camera from one hand to both hands, holding it more securely.\n"
|
| 339 |
+
]
|
| 340 |
+
},
|
| 341 |
+
{
|
| 342 |
+
"ename": "KeyboardInterrupt",
|
| 343 |
+
"evalue": "",
|
| 344 |
+
"output_type": "error",
|
| 345 |
+
"traceback": [
|
| 346 |
+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
| 347 |
+
"\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)",
|
| 348 |
+
"\u001b[0;32m/tmp/ipykernel_3244532/4022048012.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0md\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mjoin_ds\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0md\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"instruction\"\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 349 |
+
"\u001b[0;32m~/.local/lib/python3.10/site-packages/datasets/arrow_dataset.py\u001b[0m in \u001b[0;36m__iter__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 2491\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2492\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnum_rows\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2493\u001b[0;31m yield self._getitem(\n\u001b[0m\u001b[1;32m 2494\u001b[0m \u001b[0mi\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2495\u001b[0m )\n",
|
| 350 |
+
"\u001b[0;32m~/.local/lib/python3.10/site-packages/datasets/arrow_dataset.py\u001b[0m in \u001b[0;36m_getitem\u001b[0;34m(self, key, **kwargs)\u001b[0m\n\u001b[1;32m 2856\u001b[0m \u001b[0mformatter\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mget_formatter\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mformat_type\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfeatures\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_info\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfeatures\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mformat_kwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2857\u001b[0m \u001b[0mpa_subtable\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mquery_table\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_data\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mindices\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_indices\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2858\u001b[0;31m formatted_output = format_table(\n\u001b[0m\u001b[1;32m 2859\u001b[0m \u001b[0mpa_subtable\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mformatter\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mformatter\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mformat_columns\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mformat_columns\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0moutput_all_columns\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0moutput_all_columns\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2860\u001b[0m )\n",
|
| 351 |
+
"\u001b[0;32m~/.local/lib/python3.10/site-packages/datasets/formatting/formatting.py\u001b[0m in \u001b[0;36mformat_table\u001b[0;34m(table, key, formatter, format_columns, output_all_columns)\u001b[0m\n\u001b[1;32m 664\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 665\u001b[0m \u001b[0mpa_table_to_format\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpa_table\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdrop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcol\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mcol\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mpa_table\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumn_names\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mcol\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mformat_columns\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 666\u001b[0;31m \u001b[0mformatted_output\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mformatter\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpa_table_to_format\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mquery_type\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mquery_type\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 667\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0moutput_all_columns\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 668\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mformatted_output\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mMutableMapping\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 352 |
+
"\u001b[0;32m~/.local/lib/python3.10/site-packages/datasets/formatting/formatting.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(self, pa_table, query_type)\u001b[0m\n\u001b[1;32m 409\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__call__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpa_table\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mpa\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mTable\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mquery_type\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mUnion\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mRowFormat\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mColumnFormat\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mBatchFormat\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 410\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mquery_type\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;34m\"row\"\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 411\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformat_row\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpa_table\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 412\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0mquery_type\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;34m\"column\"\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 413\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformat_column\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpa_table\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 353 |
+
"\u001b[0;32m~/.local/lib/python3.10/site-packages/datasets/formatting/formatting.py\u001b[0m in \u001b[0;36mformat_row\u001b[0;34m(self, pa_table)\u001b[0m\n\u001b[1;32m 458\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mLazyRow\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpa_table\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 459\u001b[0m \u001b[0mrow\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython_arrow_extractor\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mextract_row\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpa_table\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 460\u001b[0;31m \u001b[0mrow\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpython_features_decoder\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdecode_row\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrow\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 461\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mrow\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 462\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 354 |
+
"\u001b[0;32m~/.local/lib/python3.10/site-packages/datasets/formatting/formatting.py\u001b[0m in \u001b[0;36mdecode_row\u001b[0;34m(self, row)\u001b[0m\n\u001b[1;32m 222\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 223\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mdecode_row\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrow\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mdict\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mdict\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 224\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfeatures\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdecode_example\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mrow\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtoken_per_repo_id\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtoken_per_repo_id\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfeatures\u001b[0m \u001b[0;32melse\u001b[0m \u001b[0mrow\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 225\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 226\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mdecode_column\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcolumn\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mlist\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcolumn_name\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mstr\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0mlist\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 355 |
+
"\u001b[0;32m~/.local/lib/python3.10/site-packages/datasets/features/features.py\u001b[0m in \u001b[0;36mdecode_example\u001b[0;34m(self, example, token_per_repo_id)\u001b[0m\n\u001b[1;32m 2103\u001b[0m \"\"\"\n\u001b[1;32m 2104\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2105\u001b[0;31m return {\n\u001b[0m\u001b[1;32m 2106\u001b[0m \u001b[0mcolumn_name\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mdecode_nested_example\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfeature\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mvalue\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtoken_per_repo_id\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mtoken_per_repo_id\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2107\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_column_requires_decoding\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mcolumn_name\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 356 |
+
"\u001b[0;32m~/.local/lib/python3.10/site-packages/datasets/features/features.py\u001b[0m in \u001b[0;36m<dictcomp>\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m 2104\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2105\u001b[0m return {\n\u001b[0;32m-> 2106\u001b[0;31m \u001b[0mcolumn_name\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mdecode_nested_example\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfeature\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mvalue\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtoken_per_repo_id\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mtoken_per_repo_id\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2107\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_column_requires_decoding\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mcolumn_name\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2108\u001b[0m \u001b[0;32melse\u001b[0m \u001b[0mvalue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 357 |
+
"\u001b[0;32m~/.local/lib/python3.10/site-packages/datasets/features/features.py\u001b[0m in \u001b[0;36mdecode_nested_example\u001b[0;34m(schema, obj, token_per_repo_id)\u001b[0m\n\u001b[1;32m 1412\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0mhasattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mschema\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"decode_example\"\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mgetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mschema\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"decode\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1413\u001b[0m \u001b[0;31m# we pass the token to read and decode files from private repositories in streaming mode\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1414\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mschema\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdecode_example\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mobj\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtoken_per_repo_id\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mtoken_per_repo_id\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mobj\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m \u001b[0;32melse\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1415\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mobj\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1416\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 358 |
+
"\u001b[0;32m~/.local/lib/python3.10/site-packages/datasets/features/image.py\u001b[0m in \u001b[0;36mdecode_example\u001b[0;34m(self, value, token_per_repo_id)\u001b[0m\n\u001b[1;32m 191\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 192\u001b[0m \u001b[0mimage\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mPIL\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mImage\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mopen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mBytesIO\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbytes_\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 193\u001b[0;31m \u001b[0mimage\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# to avoid \"Too many open files\" errors\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 194\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mimage\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgetexif\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mPIL\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mImage\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mExifTags\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mBase\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mOrientation\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 195\u001b[0m \u001b[0mimage\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mPIL\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mImageOps\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexif_transpose\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mimage\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 359 |
+
"\u001b[0;32m~/.local/lib/python3.10/site-packages/PIL/ImageFile.py\u001b[0m in \u001b[0;36mload\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 388\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 389\u001b[0m \u001b[0mb\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mb\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0ms\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 390\u001b[0;31m \u001b[0mn\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0merr_code\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdecoder\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdecode\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 391\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mn\u001b[0m \u001b[0;34m<\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 392\u001b[0m \u001b[0;32mbreak\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
|
| 360 |
+
"\u001b[0;31mKeyboardInterrupt\u001b[0m: "
|
| 361 |
+
]
|
| 362 |
+
}
|
| 363 |
+
],
|
| 364 |
+
"source": [
|
| 365 |
+
"for d in join_ds:\n",
|
| 366 |
+
" print(d[\"instruction\"])"
|
| 367 |
+
]
|
| 368 |
},
|
| 369 |
{
|
| 370 |
"cell_type": "code",
|
scripts/logit_normal_dist.ipynb
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
"cells": [
|
| 3 |
{
|
| 4 |
"cell_type": "code",
|
| 5 |
-
"execution_count":
|
| 6 |
"id": "86816b6d",
|
| 7 |
"metadata": {},
|
| 8 |
"outputs": [],
|
|
@@ -14,7 +14,7 @@
|
|
| 14 |
},
|
| 15 |
{
|
| 16 |
"cell_type": "code",
|
| 17 |
-
"execution_count":
|
| 18 |
"id": "01b07a3c",
|
| 19 |
"metadata": {},
|
| 20 |
"outputs": [
|
|
@@ -24,7 +24,7 @@
|
|
| 24 |
"tensor(3.0000)"
|
| 25 |
]
|
| 26 |
},
|
| 27 |
-
"execution_count":
|
| 28 |
"metadata": {},
|
| 29 |
"output_type": "execute_result"
|
| 30 |
}
|
|
@@ -35,7 +35,7 @@
|
|
| 35 |
},
|
| 36 |
{
|
| 37 |
"cell_type": "code",
|
| 38 |
-
"execution_count":
|
| 39 |
"id": "4f29d965",
|
| 40 |
"metadata": {},
|
| 41 |
"outputs": [],
|
|
@@ -45,7 +45,7 @@
|
|
| 45 |
},
|
| 46 |
{
|
| 47 |
"cell_type": "code",
|
| 48 |
-
"execution_count":
|
| 49 |
"id": "1b115c12",
|
| 50 |
"metadata": {},
|
| 51 |
"outputs": [],
|
|
@@ -55,33 +55,44 @@
|
|
| 55 |
},
|
| 56 |
{
|
| 57 |
"cell_type": "code",
|
| 58 |
-
"execution_count":
|
| 59 |
"id": "3c32dc7f",
|
| 60 |
"metadata": {},
|
| 61 |
-
"outputs": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
"source": [
|
| 63 |
"torch.exp(torch.tensor(0.9))"
|
| 64 |
]
|
| 65 |
},
|
| 66 |
{
|
| 67 |
"cell_type": "code",
|
| 68 |
-
"execution_count":
|
| 69 |
"id": "aec3ae8f",
|
| 70 |
"metadata": {},
|
| 71 |
"outputs": [
|
| 72 |
{
|
| 73 |
"data": {
|
| 74 |
"text/plain": [
|
| 75 |
-
"[<matplotlib.lines.Line2D at
|
| 76 |
]
|
| 77 |
},
|
| 78 |
-
"execution_count":
|
| 79 |
"metadata": {},
|
| 80 |
"output_type": "execute_result"
|
| 81 |
},
|
| 82 |
{
|
| 83 |
"data": {
|
| 84 |
-
"image/png": "iVBORw0KGgoAAA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/FnzOcAK4FJwEBggZl95JyraOVsXgl4f4VyoUfj5tR+jcfMRgLPAFOdc7uDlK21+DPmLGB2U5knAeeaWb1z7vWgJAw8f3+2y5xzlUClmS0CMoFwLXR/xnwt8EvXOMGcb2ZbgKHAkuBEDLqA91coT7lE4+bURxyzmaUBrwJXhfHVWnNHHLNzrr9zLt05lw68DNwSxmUO/v1svwGcZmaxZtYBGAfkBjlnIPkz5gIa/0WCmfUEhgCbg5oyuALeXyF7he6icHNqP8d8P5AIPNl0xVrvwvhJdX6OOaL4M2bnXK6Z/RNYDfiAZ5xzh1z+Fg78/D4/CDxrZmtonI64xzkXto/VNbMXgIlAkpkVAg8AcdB6/aVb/0VEIkQoT7mIiMhRUKGLiEQIFbqISIRQoYuIRAgVuohIhFChi4hECBW6iEiE+H/dYtclSuI1vQAAAABJRU5ErkJggg==",
|
| 85 |
"text/plain": [
|
| 86 |
"<Figure size 432x288 with 1 Axes>"
|
| 87 |
]
|
|
@@ -93,17 +104,74 @@
|
|
| 93 |
}
|
| 94 |
],
|
| 95 |
"source": [
|
| 96 |
-
"from qwenimage.sampling import
|
| 97 |
"\n",
|
| 98 |
"t = torch.linspace(0,1,100)\n",
|
| 99 |
-
"t_i =
|
| 100 |
-
" mu=torch.tensor(
|
| 101 |
" sigma=1.0,\n",
|
| 102 |
" t=t\n",
|
| 103 |
")\n",
|
| 104 |
"plt.plot(t, t_i)"
|
| 105 |
]
|
| 106 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
{
|
| 108 |
"cell_type": "code",
|
| 109 |
"execution_count": null,
|
|
|
|
| 2 |
"cells": [
|
| 3 |
{
|
| 4 |
"cell_type": "code",
|
| 5 |
+
"execution_count": 1,
|
| 6 |
"id": "86816b6d",
|
| 7 |
"metadata": {},
|
| 8 |
"outputs": [],
|
|
|
|
| 14 |
},
|
| 15 |
{
|
| 16 |
"cell_type": "code",
|
| 17 |
+
"execution_count": 2,
|
| 18 |
"id": "01b07a3c",
|
| 19 |
"metadata": {},
|
| 20 |
"outputs": [
|
|
|
|
| 24 |
"tensor(3.0000)"
|
| 25 |
]
|
| 26 |
},
|
| 27 |
+
"execution_count": 2,
|
| 28 |
"metadata": {},
|
| 29 |
"output_type": "execute_result"
|
| 30 |
}
|
|
|
|
| 35 |
},
|
| 36 |
{
|
| 37 |
"cell_type": "code",
|
| 38 |
+
"execution_count": 3,
|
| 39 |
"id": "4f29d965",
|
| 40 |
"metadata": {},
|
| 41 |
"outputs": [],
|
|
|
|
| 45 |
},
|
| 46 |
{
|
| 47 |
"cell_type": "code",
|
| 48 |
+
"execution_count": 4,
|
| 49 |
"id": "1b115c12",
|
| 50 |
"metadata": {},
|
| 51 |
"outputs": [],
|
|
|
|
| 55 |
},
|
| 56 |
{
|
| 57 |
"cell_type": "code",
|
| 58 |
+
"execution_count": 5,
|
| 59 |
"id": "3c32dc7f",
|
| 60 |
"metadata": {},
|
| 61 |
+
"outputs": [
|
| 62 |
+
{
|
| 63 |
+
"data": {
|
| 64 |
+
"text/plain": [
|
| 65 |
+
"tensor(2.4596)"
|
| 66 |
+
]
|
| 67 |
+
},
|
| 68 |
+
"execution_count": 5,
|
| 69 |
+
"metadata": {},
|
| 70 |
+
"output_type": "execute_result"
|
| 71 |
+
}
|
| 72 |
+
],
|
| 73 |
"source": [
|
| 74 |
"torch.exp(torch.tensor(0.9))"
|
| 75 |
]
|
| 76 |
},
|
| 77 |
{
|
| 78 |
"cell_type": "code",
|
| 79 |
+
"execution_count": 9,
|
| 80 |
"id": "aec3ae8f",
|
| 81 |
"metadata": {},
|
| 82 |
"outputs": [
|
| 83 |
{
|
| 84 |
"data": {
|
| 85 |
"text/plain": [
|
| 86 |
+
"[<matplotlib.lines.Line2D at 0x74338838e380>]"
|
| 87 |
]
|
| 88 |
},
|
| 89 |
+
"execution_count": 9,
|
| 90 |
"metadata": {},
|
| 91 |
"output_type": "execute_result"
|
| 92 |
},
|
| 93 |
{
|
| 94 |
"data": {
|
| 95 |
+
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAfLUlEQVR4nO3de3RddZ338fc3SXNr7tc2adL0fqMtLaGtRe4CpYIoowwgOjBoQSnP88ywlqCzUNfgzIPj6FJHtHYhIggyKDxYbLk5YItApaX3lDZN07RJkzS35n5Pfs8fiTWE0Jy2J9nn8nmtdVZyzt5JPj8SPmx+Z+/9M+ccIiIS/CK8DiAiIv6hQhcRCREqdBGREKFCFxEJESp0EZEQEeXVD87IyHAFBQVe/XgRkaD03nvv1TnnMkfa5lmhFxQUsH37dq9+vIhIUDKzox+1TVMuIiIhQoUuIhIiVOgiIiFChS4iEiJU6CIiIWLUQjezx8ysxsz2fcR2M7Mfm1mJme0xs6X+jykiIqPx5Qj9cWDVabZfC8wafKwBfnbusURE5EyNeh66c26LmRWcZpcbgCfcwH14t5pZiplNds5V+SukiEgwau/upa6lm9rWLupbu6hr7aautYsl+SlcPGvEa4POiT8uLMoFyoc8rxh87UOFbmZrGDiKJz8/3w8/WkRkfPX09VPX2kVty8CjpuVvn9e2dA1sa+2irqWLtu6+Eb/HVy6bEbCFbiO8NuKqGc659cB6gMLCQ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7WhRh2zc26ac67AOVcA/A74ahCXOfj2t/174GIzizKzeGA58P445/QnX8Z8jIH/I8HMsoE5QOm4phxffu+vgD1Cd2G4OLWPY/4mkA78dPCItdcF8Z3qfBxzSPFlzM65983sZWAP0A886pwb8fS3YODj7/kh4HEz28vAdMT9zrmgva2umf0GuAzIMLMK4FvABBi7/tKl/yIiISKQp1xEROQMqNBFREKECl1EJESo0EVEQoQKXUQkRKjQRURChApdRCRE/H/MH40ExkIIOgAAAABJRU5ErkJggg==",
|
| 96 |
"text/plain": [
|
| 97 |
"<Figure size 432x288 with 1 Axes>"
|
| 98 |
]
|
|
|
|
| 104 |
}
|
| 105 |
],
|
| 106 |
"source": [
|
| 107 |
+
"from qwenimage.sampling import TimestepDistUtils\n",
|
| 108 |
"\n",
|
| 109 |
"t = torch.linspace(0,1,100)\n",
|
| 110 |
+
"t_i = TimestepDistUtils.t_shift(\n",
|
| 111 |
+
" mu=torch.tensor(2.0),\n",
|
| 112 |
" sigma=1.0,\n",
|
| 113 |
" t=t\n",
|
| 114 |
")\n",
|
| 115 |
"plt.plot(t, t_i)"
|
| 116 |
]
|
| 117 |
},
|
| 118 |
+
{
|
| 119 |
+
"cell_type": "code",
|
| 120 |
+
"execution_count": 16,
|
| 121 |
+
"id": "3bc68e7c",
|
| 122 |
+
"metadata": {},
|
| 123 |
+
"outputs": [
|
| 124 |
+
{
|
| 125 |
+
"data": {
|
| 126 |
+
"text/plain": [
|
| 127 |
+
"1.0986122886681098"
|
| 128 |
+
]
|
| 129 |
+
},
|
| 130 |
+
"execution_count": 16,
|
| 131 |
+
"metadata": {},
|
| 132 |
+
"output_type": "execute_result"
|
| 133 |
+
}
|
| 134 |
+
],
|
| 135 |
+
"source": [
|
| 136 |
+
"import math\n",
|
| 137 |
+
"math.log(3)"
|
| 138 |
+
]
|
| 139 |
+
},
|
| 140 |
+
{
|
| 141 |
+
"cell_type": "code",
|
| 142 |
+
"execution_count": 17,
|
| 143 |
+
"id": "facb782e",
|
| 144 |
+
"metadata": {},
|
| 145 |
+
"outputs": [
|
| 146 |
+
{
|
| 147 |
+
"data": {
|
| 148 |
+
"text/plain": [
|
| 149 |
+
"tensor([1.0000, 0.8808, 0.0000])"
|
| 150 |
+
]
|
| 151 |
+
},
|
| 152 |
+
"execution_count": 17,
|
| 153 |
+
"metadata": {},
|
| 154 |
+
"output_type": "execute_result"
|
| 155 |
+
}
|
| 156 |
+
],
|
| 157 |
+
"source": [
|
| 158 |
+
"t = torch.tensor([1, 0.5, 0])\n",
|
| 159 |
+
"t_i = TimestepDistUtils.t_shift(\n",
|
| 160 |
+
" mu=torch.tensor(2.0),\n",
|
| 161 |
+
" sigma=1.0,\n",
|
| 162 |
+
" t=t\n",
|
| 163 |
+
")\n",
|
| 164 |
+
"t_i"
|
| 165 |
+
]
|
| 166 |
+
},
|
| 167 |
+
{
|
| 168 |
+
"cell_type": "code",
|
| 169 |
+
"execution_count": null,
|
| 170 |
+
"id": "f006f2fa",
|
| 171 |
+
"metadata": {},
|
| 172 |
+
"outputs": [],
|
| 173 |
+
"source": []
|
| 174 |
+
},
|
| 175 |
{
|
| 176 |
"cell_type": "code",
|
| 177 |
"execution_count": null,
|
scripts/train.py
CHANGED
|
@@ -16,13 +16,14 @@ from wandml import WandAuth
|
|
| 16 |
|
| 17 |
from qwenimage.training import run_training
|
| 18 |
REQUIREMENTS_PATH = os.path.abspath("requirements.txt")
|
|
|
|
| 19 |
|
| 20 |
local_modules = ["qwenimage","wandml","scripts"]
|
| 21 |
|
| 22 |
## Fal zone
|
| 23 |
@fal.function(
|
| 24 |
machine_type="GPU-H100",
|
| 25 |
-
requirements=get_requirements(REQUIREMENTS_PATH),
|
| 26 |
local_python_modules = local_modules,
|
| 27 |
max_concurrency=16,
|
| 28 |
request_timeout=6*60*60,
|
|
@@ -54,22 +55,24 @@ modalapp.image = (
|
|
| 54 |
modal.Image.debian_slim(python_version="3.10")
|
| 55 |
.apt_install("git", "ffmpeg", "libsm6", "libxext6")
|
| 56 |
.pip_install_from_requirements(REQUIREMENTS_PATH)
|
|
|
|
|
|
|
| 57 |
)
|
| 58 |
|
| 59 |
-
for module in local_modules:
|
| 60 |
-
modalapp.image.add_local_python_source(module)
|
| 61 |
-
|
| 62 |
|
| 63 |
@modalapp.function(
|
| 64 |
-
gpu="
|
| 65 |
-
max_containers=
|
| 66 |
-
timeout=
|
| 67 |
volumes={
|
| 68 |
"/data/wand_cache": modal.Volume.from_name("FLUX_MODELS"),
|
| 69 |
-
# "/data/Datasets": modal.Volume.from_name("Datasets", create_if_missing=True),
|
| 70 |
-
# "/data/wand-1": modal.Volume.from_name("wand-1-train-data", create_if_missing=True),
|
| 71 |
"/data/checkpoints": modal.Volume.from_name("training_checkpoints", create_if_missing=True),
|
| 72 |
"/root/.cache/torch/hub/checkpoints": modal.Volume.from_name("torch_hub_checkpoints", create_if_missing=True),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
},
|
| 74 |
secrets=[
|
| 75 |
modal.Secret.from_name("wand-modal-gcloud-keyfile"),
|
|
@@ -156,7 +159,7 @@ def parse_args():
|
|
| 156 |
return args
|
| 157 |
|
| 158 |
if __name__ == "__main__":
|
| 159 |
-
WandAuth(
|
| 160 |
|
| 161 |
args = parse_args()
|
| 162 |
|
|
|
|
| 16 |
|
| 17 |
from qwenimage.training import run_training
|
| 18 |
REQUIREMENTS_PATH = os.path.abspath("requirements.txt")
|
| 19 |
+
WAND_REQUIREMENTS_PATH = os.path.abspath("scripts/wand_requirements.txt")
|
| 20 |
|
| 21 |
local_modules = ["qwenimage","wandml","scripts"]
|
| 22 |
|
| 23 |
## Fal zone
|
| 24 |
@fal.function(
|
| 25 |
machine_type="GPU-H100",
|
| 26 |
+
requirements=get_requirements(REQUIREMENTS_PATH, WAND_REQUIREMENTS_PATH),
|
| 27 |
local_python_modules = local_modules,
|
| 28 |
max_concurrency=16,
|
| 29 |
request_timeout=6*60*60,
|
|
|
|
| 55 |
modal.Image.debian_slim(python_version="3.10")
|
| 56 |
.apt_install("git", "ffmpeg", "libsm6", "libxext6")
|
| 57 |
.pip_install_from_requirements(REQUIREMENTS_PATH)
|
| 58 |
+
.pip_install_from_requirements(WAND_REQUIREMENTS_PATH)
|
| 59 |
+
.add_local_python_source(*local_modules)
|
| 60 |
)
|
| 61 |
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
@modalapp.function(
|
| 64 |
+
gpu="B200",
|
| 65 |
+
max_containers=1,
|
| 66 |
+
timeout=4 * 60 * 60,
|
| 67 |
volumes={
|
| 68 |
"/data/wand_cache": modal.Volume.from_name("FLUX_MODELS"),
|
|
|
|
|
|
|
| 69 |
"/data/checkpoints": modal.Volume.from_name("training_checkpoints", create_if_missing=True),
|
| 70 |
"/root/.cache/torch/hub/checkpoints": modal.Volume.from_name("torch_hub_checkpoints", create_if_missing=True),
|
| 71 |
+
|
| 72 |
+
"/root/.cache/huggingface/hub": modal.Volume.from_name("hf_cache", create_if_missing=True),
|
| 73 |
+
|
| 74 |
+
"/data/regression_data": modal.Volume.from_name("regression_data"),
|
| 75 |
+
"/data/edit_data": modal.Volume.from_name("edit_data"),
|
| 76 |
},
|
| 77 |
secrets=[
|
| 78 |
modal.Secret.from_name("wand-modal-gcloud-keyfile"),
|
|
|
|
| 159 |
return args
|
| 160 |
|
| 161 |
if __name__ == "__main__":
|
| 162 |
+
WandAuth()
|
| 163 |
|
| 164 |
args = parse_args()
|
| 165 |
|
scripts/train_multi.sh
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# nohup python scripts/train.py configs/base.yaml --where modal \
|
| 4 |
+
# --update configs/regression/base.yaml \
|
| 5 |
+
# --update configs/regression/modal-datadirs.yaml \
|
| 6 |
+
# --update configs/regression/mse.yaml \
|
| 7 |
+
# --update configs/regression/val_metrics.yaml \
|
| 8 |
+
# --update configs/compare/5k_steps.yaml \
|
| 9 |
+
# --update configs/optim/cosine.yaml \
|
| 10 |
+
# --update configs/regression/lo_mse.yaml \
|
| 11 |
+
# > logs/mse.log 2>&1 &
|
| 12 |
+
|
| 13 |
+
nohup python scripts/train.py configs/base.yaml --where modal \
|
| 14 |
+
--update configs/regression/base.yaml \
|
| 15 |
+
--update configs/regression/modal-datadirs.yaml \
|
| 16 |
+
--update configs/regression/mse-triplet.yaml \
|
| 17 |
+
--update configs/regression/val_metrics.yaml \
|
| 18 |
+
--update configs/compare/5k_steps.yaml \
|
| 19 |
+
--update configs/optim/cosine.yaml \
|
| 20 |
+
--update configs/regression/lo_mse.yaml \
|
| 21 |
+
> logs/mse-triplet.log 2>&1 &
|
| 22 |
+
|
| 23 |
+
# nohup python scripts/train.py configs/base.yaml --where modal \
|
| 24 |
+
# --update configs/regression/base.yaml \
|
| 25 |
+
# --update configs/regression/modal-datadirs.yaml \
|
| 26 |
+
# --update configs/regression/mse-neg-mse.yaml \
|
| 27 |
+
# --update configs/regression/val_metrics.yaml \
|
| 28 |
+
# --update configs/compare/5k_steps.yaml \
|
| 29 |
+
# --update configs/optim/cosine.yaml \
|
| 30 |
+
# --update configs/regression/lo_mse.yaml \
|
| 31 |
+
# > logs/mse-neg-mse.log 2>&1 &
|
| 32 |
+
|
| 33 |
+
nohup python scripts/train.py configs/base.yaml --where modal \
|
| 34 |
+
--update configs/regression/base.yaml \
|
| 35 |
+
--update configs/regression/modal-datadirs.yaml \
|
| 36 |
+
--update configs/regression/mse-pixel-mse.yaml \
|
| 37 |
+
--update configs/regression/val_metrics.yaml \
|
| 38 |
+
--update configs/compare/5k_steps.yaml \
|
| 39 |
+
--update configs/optim/cosine.yaml \
|
| 40 |
+
--update configs/regression/lo_mse.yaml \
|
| 41 |
+
> logs/mse-pixel-mse.log 2>&1 &
|
| 42 |
+
|
| 43 |
+
nohup python scripts/train.py configs/base.yaml --where modal \
|
| 44 |
+
--update configs/regression/base.yaml \
|
| 45 |
+
--update configs/regression/modal-datadirs.yaml \
|
| 46 |
+
--update configs/regression/mse-pixel-lpips.yaml \
|
| 47 |
+
--update configs/regression/val_metrics.yaml \
|
| 48 |
+
--update configs/compare/5k_steps.yaml \
|
| 49 |
+
--update configs/optim/cosine.yaml \
|
| 50 |
+
--update configs/regression/lo_mse.yaml \
|
| 51 |
+
> logs/mse-pixel-lpips.log 2>&1 &
|
| 52 |
+
|
| 53 |
+
nohup python scripts/train.py configs/base.yaml --where modal \
|
| 54 |
+
--update configs/regression/base.yaml \
|
| 55 |
+
--update configs/regression/modal-datadirs.yaml \
|
| 56 |
+
--update configs/regression/mse-dm.yaml \
|
| 57 |
+
--update configs/regression/val_metrics.yaml \
|
| 58 |
+
--update configs/compare/5k_steps.yaml \
|
| 59 |
+
--update configs/optim/cosine.yaml \
|
| 60 |
+
--update configs/regression/lo_mse.yaml \
|
| 61 |
+
> logs/mse-pixel-lpips.log 2>&1 &
|
scripts/wand_requirements.txt
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
torch
|
| 2 |
+
torchvision
|
| 3 |
+
torchaudio
|
| 4 |
+
accelerate>=1.0
|
| 5 |
+
django>=4.2
|
| 6 |
+
einops>=0.6.1
|
| 7 |
+
ftfy>=6.1.1
|
| 8 |
+
google-api-python-client>=2.86.0
|
| 9 |
+
google-cloud-storage>=2.10.0
|
| 10 |
+
google-cloud-pubsub>=2.16.0
|
| 11 |
+
invisible-watermark
|
| 12 |
+
modal-client
|
| 13 |
+
modal>=0.73
|
| 14 |
+
onnxruntime
|
| 15 |
+
opencv-python>=4.1.0.25
|
| 16 |
+
pillow
|
| 17 |
+
PyWavelets>=1.1.1
|
| 18 |
+
safetensors>=0.4.1
|
| 19 |
+
scipy>=1.15
|
| 20 |
+
sentry-sdk>=1.21.0
|
| 21 |
+
lion_pytorch
|
| 22 |
+
transformers>=4.43.2
|
| 23 |
+
diffusers>=0.35.0
|
| 24 |
+
ddtrace
|
| 25 |
+
fastapi>=0.111.0
|
| 26 |
+
msgpack
|
| 27 |
+
numpy>=1.24.3,<2
|
| 28 |
+
peft>=0.17.0
|
| 29 |
+
pydantic>=2.7.4
|
| 30 |
+
uvicorn>=0.25.0
|
| 31 |
+
websockets
|
| 32 |
+
timm
|
| 33 |
+
wandb>=0.17.1
|
| 34 |
+
sentencepiece
|
| 35 |
+
Jinja2
|
| 36 |
+
python-dotenv
|
| 37 |
+
prodigyopt
|
| 38 |
+
bitsandbytes
|
| 39 |
+
datasets
|
| 40 |
+
optimum-quanto
|
| 41 |
+
# triton
|
| 42 |
+
torchao
|
| 43 |
+
python-multipart
|
| 44 |
+
fal>=1.30.0
|
| 45 |
+
openai>=1.76.0
|
| 46 |
+
ruamel.yaml
|
| 47 |
+
PyYAML
|
| 48 |
+
scikit-image
|
| 49 |
+
lpips
|
| 50 |
+
pandas
|
| 51 |
+
matplotlib
|
| 52 |
+
clearml
|