Run this model with HF Jobs
Run daydreamlive/TemporalNet2-stable-diffusion-xl-base-1.0 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/daydreamlive/TemporalNet2-stable-diffusion-xl-base-1.0. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/daydreamlive/TemporalNet2-stable-diffusion-xl-base-1.0 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use daydreamlive/TemporalNet2-stable-diffusion-xl-base-1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use daydreamlive/TemporalNet2-stable-diffusion-xl-base-1.0 with Diffusers:
pip install -U diffusers transformers accelerate
from diffusers import ControlNetModel, StableDiffusionControlNetPipeline controlnet = ControlNetModel.from_pretrained("daydreamlive/TemporalNet2-stable-diffusion-xl-base-1.0") pipe = StableDiffusionControlNetPipeline.from_pretrained( "stabilityai/stable-diffusion-xl-base-1.0", controlnet=controlnet ) - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse filesFiles changed (5)
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586---license: openrail++base_model: stabilityai/stable-diffusion-xl-base-1.0tags: - stable-diffusion-xl - controlnet - temporal - video - diffusersinference: true---
# TemporalNet2 ControlNet for SDXL
This is a TemporalNet2 ControlNet model trained on SDXL (Stable Diffusion XL base 1.0).
## Model Description
TemporalNet2 is a ControlNet variant designed for temporal coherence in video generation. It takes two conditioning inputs:- **Previous Frame**: The previous frame in the video sequence (3 channels)- **Optical Flow**: The optical flow between the previous and current frame (3 channels)
Total conditioning channels: **6 channels**
This model was trained to generate temporally coherent frames by learning from both the visual content of the previous frame and the motion information encoded in optical flow.
## Usage
```pythonfrom diffusers import StableDiffusionXLControlNetPipeline, ControlNetModel, EulerDiscreteSchedulerfrom PIL import Imageimport torch
# Load the ControlNet modelcontrolnet = ControlNetModel.from_pretrained( "YOUR_USERNAME/temporalnet2-sdxl-controlnet", torch_dtype=torch.float16)
# Create the pipelinepipe = StableDiffusionXLControlNetPipeline.from_pretrained( "stabilityai/stable-diffusion-xl-base-1.0", controlnet=controlnet, torch_dtype=torch.float16)pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config)pipe.to("cuda")
# Load your conditioning imagesprev_frame = Image.open("previous_frame.jpg")optical_flow = Image.open("optical_flow.jpg")
# Concatenate conditioning images (they will be concatenated in the pipeline)# Note: You'll need to prepare the 6-channel input by concatenating prev_frame and optical_flowprompt = "your prompt describing the scene"
# Generateimage = pipe( prompt=prompt, image=[prev_frame, optical_flow], # The pipeline will handle concatenation num_inference_steps=20, guidance_scale=7.5).images[0]
image.save("output.jpg")```
## Training Details
- **Base Model**: stabilityai/stable-diffusion-xl-base-1.0- **Training Resolution**: Multi-resolution (512, 640, 768, 896, 1024px)- **Conditioning Channels**: 6 (3 for previous frame + 3 for optical flow)- **Training Steps**: 25,000- **Mixed Precision**: bfloat16
## Limitations
This model requires specific conditioning inputs:1. The previous frame from your video sequence2. The optical flow computed between frames
For best results, ensure your optical flow visualization uses a consistent color scheme and magnitude representation.
## License
This model is released under the same license as SDXL (OpenRAIL++).123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657{ "_class_name": "ControlNetModel", "_diffusers_version": "0.35.2", "act_fn": "silu", "addition_embed_type": "text_time", "addition_embed_type_num_heads": 64, "addition_time_embed_dim": 256, "attention_head_dim": [ 5, 10, 20 ], "block_out_channels": [ 320, 640, 1280 ], "class_embed_type": null, "conditioning_channels": 6, "conditioning_embedding_out_channels": [ 16, 32, 96, 256 ], "controlnet_conditioning_channel_order": "rgb", "cross_attention_dim": 2048, "down_block_types": [ "DownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D" ], "downsample_padding": 1, "encoder_hid_dim": null, "encoder_hid_dim_type": null, "flip_sin_to_cos": true, "freq_shift": 0, "global_pool_conditions": false, "in_channels": 4, "layers_per_block": 2, "mid_block_scale_factor": 1, "mid_block_type": "UNetMidBlock2DCrossAttn", "norm_eps": 1e-05, "norm_num_groups": 32, "num_attention_heads": null, "num_class_embeds": null, "only_cross_attention": false, "projection_class_embeddings_input_dim": 2816, "resnet_time_scale_shift": "default", "transformer_layers_per_block": [ 1, 2, 10 ], "upcast_attention": null, "use_linear_projection": true}123version https://git-lfs.github.com/spec/v1oid sha256:4135665db5d337ae9d0d4bc7534c0ee848036c940e91eb324cec1afcd0e6a06csize 4251097880123version https://git-lfs.github.com/spec/v1oid sha256:a80245fd51004b5fac04055100eb5ee80d51cdbf06a72367a37331b318c47524size 753071536README.mdAdded+86
config.jsonAdded+57
diffusion_pytorch_model-00001-of-00002.safetensorsAdded+3
diffusion_pytorch_model-00002-of-00002.safetensorsAdded+3
diffusion_pytorch_model.safetensors.index.jsonAdded