Coder Social home page Coder Social logo

Comments (27)

ArtsiomWB avatar ArtsiomWB commented on September 26, 2024

Hi @bdytx5, thank you for writing in. Can you send me your whole error stack that you are seeing when running the code above. Just ran the code myself and would love to see if we are seeing a similar behavior.

from wandb.

bdytx5 avatar bdytx5 commented on September 26, 2024

when I get a chance, I will run it again. I had created a few different versions of the script (1 of which did have a wandb"init" error of some sort). But I was able to somehow get rid of that error, with the issue still being that no media was being uploaded to wandb. Can you confirm it was an error related to wandb.init ?

from wandb.

ArtsiomWB avatar ArtsiomWB commented on September 26, 2024

Not sure if this error is fully related to wandb. Are you still not able to see any media in wandb, or have you been able to resolve this already as well?

from wandb.

ArtsiomWB avatar ArtsiomWB commented on September 26, 2024

Hi there, I wanted to follow up on this request. Please let us know if we can be of further assistance or if your issue has been resolved.

from wandb.

bdytx5 avatar bdytx5 commented on September 26, 2024

As far as I know the logger simply does not log the videos. Can you confirm that you have tested this? I tried several variations of the script, and videos are not logged.

from wandb.

ArtsiomWB avatar ArtsiomWB commented on September 26, 2024

Testing the script on my side right now and getting a:
RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling cublasSgemm( handle, opa, opb, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc) on my side. Are you seeing any errors when executing the script?

from wandb.

bdytx5 avatar bdytx5 commented on September 26, 2024
Screenshot 2024-06-12 at 3 24 35 PM That seems to be a cuda error. heres my cuda information that should work if you can obtain a system running similar specs and the newest versions of the packages. Additionally, here is a run I did https://wandb.ai/byyoung3/uncategorized/runs/8pwsl8ca?nw=nwuserbyyoung3 --- Note I added wandb.init() to the script as well

from wandb.

ArtsiomWB avatar ArtsiomWB commented on September 26, 2024

Thank you so much for sending your setup over, have sent the last couple of days this week trying to repro, will keep you posted

from wandb.

bdytx5 avatar bdytx5 commented on September 26, 2024

Ok. I used an A5000 on Jarvis labs specifically which I'm guessing you should be able to gain access to

from wandb.

ArtsiomWB avatar ArtsiomWB commented on September 26, 2024

Apologies for the delay in response. Finally got my hands on a Nvidia GPU via Sagemaker, but still see the CUDA error regardless. I do see what you are talking about though. Even though the run is done, no video got recorded to wandb at all which is strange. Lets look into it.

from wandb.

ArtsiomWB avatar ArtsiomWB commented on September 26, 2024

If possible, could you try to rerun into this issue one more time and then send me another workspace? This time with wandb code saving activated so i can send this behavior straight to our eng team

from wandb.

ArtsiomWB avatar ArtsiomWB commented on September 26, 2024

Hi there, I wanted to follow up on this request.

from wandb.

bdytx5 avatar bdytx5 commented on September 26, 2024

Hey, yeah sorry I've been pretty busy lately. I'll try to get to it as soon as I can

from wandb.

ArtsiomWB avatar ArtsiomWB commented on September 26, 2024

Sounds like a plan, @bdytx5!

from wandb.

ArtsiomWB avatar ArtsiomWB commented on September 26, 2024

Hi @bdytx5, We will close this ticket on our side for tracking purposes, but when you do follow up here we will go ahead and resume the conversation.

from wandb.

exalate-issue-sync avatar exalate-issue-sync commented on September 26, 2024

WandB Internal User commented:
bdytx5 commented:
when I get a chance, I will run it again. I had created a few different versions of the script (1 of which did have a wandb"init" error of some sort). But I was able to somehow get rid of that error, with the issue still being that no media was being uploaded to wandb. Can you confirm it was an error related to wandb.init ?

from wandb.

exalate-issue-sync avatar exalate-issue-sync commented on September 26, 2024

WandB Internal User commented:
bdytx5 commented:
As far as I know the logger simply does not log the videos. Can you confirm that you have tested this? I tried several variations of the script, and videos are not logged.

from wandb.

exalate-issue-sync avatar exalate-issue-sync commented on September 26, 2024

WandB Internal User commented:
bdytx5 commented:
Screenshot 2024-06-12 at 3 24 35 PM
That seems to be a cuda error. heres my cuda information that should work if you can obtain a system running similar specs and the newest versions of the packages. Additionally, here is a run I did https://wandb.ai/byyoung3/uncategorized/runs/8pwsl8ca?nw=nwuserbyyoung3 --- Note I added wandb.init() to the script as well

from wandb.

exalate-issue-sync avatar exalate-issue-sync commented on September 26, 2024

WandB Internal User commented:
bdytx5 commented:
Ok. I used an A5000 on Jarvis labs specifically which I'm guessing you should be able to gain access to

from wandb.

bdytx5 avatar bdytx5 commented on September 26, 2024

sorry for the delay: https://wandb.ai/byyoung3/uncategorized/runs/iaqp8pde?nw=nwuserbyyoung3

from wandb.

ArtsiomWB avatar ArtsiomWB commented on September 26, 2024

No worries!

Could you try running something like this?

import wandb
import torch
from diffusers import StableVideoDiffusionPipeline
from diffusers.utils import load_image
import numpy as np
from wandb.integration.diffusers import autolog

# Initialize W&B autologging
autolog(init=dict(project="stable_video_diffusion_example", entity="<your_entity>"))

# Initialize the video diffusion pipeline
pipe = StableVideoDiffusionPipeline.from_pretrained(
    "stabilityai/stable-video-diffusion-img2vid", torch_dtype=torch.float16, variant="fp16"
)
pipe.enable_model_cpu_offload()

# List of image URLs
image_urls = [
    "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/svd/rocket.png",
]

# Set a random seed for reproducibility
generator = torch.manual_seed(42)

# Example motion bucket IDs
motion_buckets = [120, 180, 240, 300, 360]
noise_aug_strength = 0.1  # Noise augmentation strength

# Iterate over each motion bucket
for bucket in motion_buckets:
    # Initialize Weights & Biases run for each bucket
    run = wandb.init(project='stable_video_diffusion_example', name=f'bucket_{bucket}', reinit=True, group='exp_1')

    # Process each image for the current motion bucket
    for i, url in enumerate(image_urls):
        # Load the conditioning image
        image = load_image(url).convert("RGB")  # Ensure image is in RGB format
        image = image.resize((1024, 576))

        # Generate video frames with the current motion bucket
        result = pipe(image, decode_chunk_size=8, generator=generator, motion_bucket_id=bucket, noise_aug_strength=noise_aug_strength)

        # Convert frames to numpy array and transpose the axes to (time, channel, height, width)
        frames_np = np.stack([np.array(frame) for frame in result.frames[0]])
        frames_np = frames_np.transpose((0, 3, 1, 2))  # Transpose to (time, channels, height, width)

        # Log video to wandb with specific motion bucket ID
        wandb.log({f"video_{i}_bucket_{bucket}": wandb.Video(frames_np, fps=7, format="mp4")})

    # Finish the wandb run for the current motion bucket
    wandb.finish()

# Finish the final W&B run
wandb.finish()

from wandb.

ArtsiomWB avatar ArtsiomWB commented on September 26, 2024

Hi there, I wanted to follow up on this request!

from wandb.

bdytx5 avatar bdytx5 commented on September 26, 2024

Hey, yeah I will try this out when I get a chance.

from wandb.

ArtsiomWB avatar ArtsiomWB commented on September 26, 2024

Hi! Have you had a chance to try it out?

from wandb.

ArtsiomWB avatar ArtsiomWB commented on September 26, 2024

Hi, since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!

from wandb.

bdytx5 avatar bdytx5 commented on September 26, 2024

Yes, I can confirm your script does work for logging videos.

from wandb.

exalate-issue-sync avatar exalate-issue-sync commented on September 26, 2024

WandB Internal User commented:
bdytx5 commented:
Yes, I can confirm your script does work for logging videos.

from wandb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.