Image-to-Image
Diffusers
qwen-image-2.1
lora
next-scene
storyboard
cinematic
image-editing
scene-continuation
ai-video
Instructions to use akhaliq/Qwen-Image-2.1-Next-Scene-LoRA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use akhaliq/Qwen-Image-2.1-Next-Scene-LoRA with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-2.1", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("akhaliq/Qwen-Image-2.1-Next-Scene-LoRA") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
Upload folder using huggingface_hub
Browse files- checkpoints/config.yaml +64 -0
- checkpoints/optimizer.pt +3 -0
- checkpoints/qwen21_next_scene_v1.safetensors +3 -0
- checkpoints/samples/.thumbs/1791419300504__000000000_0.jpg.jpg +0 -0
- checkpoints/samples/.thumbs/1791419364011__000000000_1.jpg.jpg +0 -0
- checkpoints/samples/.thumbs/1791419804659__000000100_0.jpg.jpg +0 -0
- checkpoints/samples/.thumbs/1791419868128__000000100_1.jpg.jpg +0 -0
- checkpoints/samples/1791419300504__000000000_0.jpg +0 -0
- checkpoints/samples/1791419364011__000000000_1.jpg +0 -0
- checkpoints/samples/1791419804659__000000100_0.jpg +0 -0
- checkpoints/samples/1791419868128__000000100_1.jpg +0 -0
checkpoints/config.yaml
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
job: extension
|
| 2 |
+
config:
|
| 3 |
+
name: qwen21_next_scene_v1
|
| 4 |
+
process:
|
| 5 |
+
- type: sd_trainer
|
| 6 |
+
training_folder: /data/output
|
| 7 |
+
device: cuda:0
|
| 8 |
+
network:
|
| 9 |
+
type: lora
|
| 10 |
+
linear: 64
|
| 11 |
+
linear_alpha: 64
|
| 12 |
+
save:
|
| 13 |
+
dtype: float16
|
| 14 |
+
save_every: 250
|
| 15 |
+
max_step_saves_to_keep: 12
|
| 16 |
+
push_to_hub: false
|
| 17 |
+
datasets:
|
| 18 |
+
- folder_path: /data/train/target
|
| 19 |
+
control_path: /data/train/control
|
| 20 |
+
caption_ext: txt
|
| 21 |
+
caption_dropout_rate: 0.05
|
| 22 |
+
resolution:
|
| 23 |
+
- 512
|
| 24 |
+
train:
|
| 25 |
+
batch_size: 1
|
| 26 |
+
cache_text_embeddings: true
|
| 27 |
+
steps: 100
|
| 28 |
+
gradient_accumulation: 1
|
| 29 |
+
timestep_type: weighted
|
| 30 |
+
train_unet: true
|
| 31 |
+
train_text_encoder: false
|
| 32 |
+
gradient_checkpointing: true
|
| 33 |
+
noise_scheduler: flowmatch
|
| 34 |
+
optimizer: adamw8bit
|
| 35 |
+
lr: 0.0001
|
| 36 |
+
dtype: bf16
|
| 37 |
+
model:
|
| 38 |
+
name_or_path: Qwen/Qwen-Image-2.1
|
| 39 |
+
arch: qwen_image_2
|
| 40 |
+
quantize: true
|
| 41 |
+
qtype: uint3
|
| 42 |
+
quantize_te: true
|
| 43 |
+
low_vram: true
|
| 44 |
+
sample:
|
| 45 |
+
sampler: flowmatch
|
| 46 |
+
sample_every: 250
|
| 47 |
+
sample_start_step: 0
|
| 48 |
+
width: 512
|
| 49 |
+
height: 512
|
| 50 |
+
samples:
|
| 51 |
+
- prompt: 'Next Scene: The camera pulls back from the character to a wide shot
|
| 52 |
+
revealing the burning village behind them.'
|
| 53 |
+
ctrl_img: /data/samples/ctrl0.jpg
|
| 54 |
+
- prompt: 'Next Scene: The camera pushes in slowly on the doorway as rain begins
|
| 55 |
+
to streak across the frame.'
|
| 56 |
+
ctrl_img: /data/samples/ctrl1.jpg
|
| 57 |
+
neg: ''
|
| 58 |
+
seed: 42
|
| 59 |
+
walk_seed: true
|
| 60 |
+
guidance_scale: 3
|
| 61 |
+
sample_steps: 25
|
| 62 |
+
meta:
|
| 63 |
+
name: qwen21_next_scene_v1
|
| 64 |
+
version: '1.0'
|
checkpoints/optimizer.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e5be283fd2fda3fadd25edc6e2f7e8444cb58c32bc4f5b739c0ace26a45e361b
|
| 3 |
+
size 324203813
|
checkpoints/qwen21_next_scene_v1.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7f0be3b84cdb89b3938e37436021eb70810f9747c75048f826213e6cca505c22
|
| 3 |
+
size 318819832
|
checkpoints/samples/.thumbs/1791419300504__000000000_0.jpg.jpg
ADDED
|
|
checkpoints/samples/.thumbs/1791419364011__000000000_1.jpg.jpg
ADDED
|
|
checkpoints/samples/.thumbs/1791419804659__000000100_0.jpg.jpg
ADDED
|
|
checkpoints/samples/.thumbs/1791419868128__000000100_1.jpg.jpg
ADDED
|
|
checkpoints/samples/1791419300504__000000000_0.jpg
ADDED
|
checkpoints/samples/1791419364011__000000000_1.jpg
ADDED
|
checkpoints/samples/1791419804659__000000100_0.jpg
ADDED
|
checkpoints/samples/1791419868128__000000100_1.jpg
ADDED
|